Class UserMgmtService
java.lang.Object
io.jans.configapi.plugin.mgt.service.UserMgmtService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.jans.as.common.model.common.UseraddUser(io.jans.as.common.model.common.User user, boolean active) checkMandatoryFields(io.jans.as.common.model.common.User user, List<String> excludeAttributes) io.jans.as.common.model.common.UserexcludeAttributes(io.jans.as.common.model.common.User user, String commaSeparatedString) List<io.jans.as.common.model.common.User>excludeAttributes(List<io.jans.as.common.model.common.User> users, String commaSeparatedString) List<io.jans.model.JansAttribute>findAttributeByName(String name) getAttributeType(String attributeName) getJansAttributeName(List<io.jans.model.JansAttribute> jansAttributeList) Obtain the base Distinguished Name (DN) under which people (user) entries are stored.List<io.jans.model.JansAttribute>io.jans.as.common.model.common.UsergetUserBasedOnInum(String inum) List<io.jans.as.common.model.common.User>getUserByEmail(String email) List<io.jans.as.common.model.common.User>getUserByName(String name) Retrieve users matching the specified uid that are marked active.io.jans.as.common.model.common.UserignoreCustomObjectClassesForNonLDAP(io.jans.as.common.model.common.User user) booleanisLDAP()io.jans.as.common.model.common.UserparseBirthDateAttribute(io.jans.as.common.model.common.User user) io.jans.as.common.model.common.UserpatchUser(String inum, UserPatchRequest userPatchRequest) List<io.jans.orm.model.base.CustomObjectAttribute>removeInActiveCustomAttribute(List<io.jans.orm.model.base.CustomObjectAttribute> customAttributes) voidremoveUser(io.jans.as.common.model.common.User user) io.jans.orm.model.PagedResult<io.jans.as.common.model.common.User>searchUsers(io.jans.model.SearchRequest searchRequest) Builds and executes a paged user search based on the provided SearchRequest.io.jans.as.common.model.common.UserupdateUser(io.jans.as.common.model.common.User user) voidvalidateAttributes(List<io.jans.orm.model.base.CustomObjectAttribute> customAttributes) List<io.jans.as.common.model.common.User>verifyCustomAttributes(List<io.jans.as.common.model.common.User> users)
-
Constructor Details
-
UserMgmtService
public UserMgmtService()
-
-
Method Details
-
getPeopleBaseDn
Obtain the base Distinguished Name (DN) under which people (user) entries are stored.- Returns:
- the base DN for people entries
-
searchUsers
public io.jans.orm.model.PagedResult<io.jans.as.common.model.common.User> searchUsers(io.jans.model.SearchRequest searchRequest) Builds and executes a paged user search based on the provided SearchRequest. Constructs substring OR-filters from assertion values across displayName, description, mail, uid, givenName, middleName, nickname, sn, inum and mobile (mobile is treated as a multi-valued attribute), and combines them with per-field filters from the request's fieldValueMap (fields typed as `jsonb` and the mobile field are treated as multi-valued). The search is executed under the people base DN using the requested sorting and pagination. Inactive custom attributes are removed from resulting users before returning.- Parameters:
searchRequest- the search parameters including assertion values, field-value map, sorting and pagination- Returns:
- a paged result of User objects whose custom attributes have been filtered to exclude inactive attributes
-
getUserByName
Retrieve users matching the specified uid that are marked active.- Parameters:
name- the uid (login name) to search for- Returns:
- the list of matching active User objects, or `null` if an error occurs
-
getUserByEmail
-
removeUser
public void removeUser(io.jans.as.common.model.common.User user) -
patchUser
public io.jans.as.common.model.common.User patchUser(String inum, UserPatchRequest userPatchRequest) throws com.github.fge.jsonpatch.JsonPatchException, IOException - Throws:
com.github.fge.jsonpatch.JsonPatchExceptionIOException
-
getUserBasedOnInum
-
excludeAttributes
public List<io.jans.as.common.model.common.User> excludeAttributes(List<io.jans.as.common.model.common.User> users, String commaSeparatedString) throws IllegalAccessException, InvocationTargetException -
excludeAttributes
public io.jans.as.common.model.common.User excludeAttributes(io.jans.as.common.model.common.User user, String commaSeparatedString) throws IllegalAccessException, InvocationTargetException -
getUserExclusionAttributesAsString
-
checkMandatoryFields
public String checkMandatoryFields(io.jans.as.common.model.common.User user, List<String> excludeAttributes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException -
parseBirthDateAttribute
public io.jans.as.common.model.common.User parseBirthDateAttribute(io.jans.as.common.model.common.User user) -
ignoreCustomObjectClassesForNonLDAP
public io.jans.as.common.model.common.User ignoreCustomObjectClassesForNonLDAP(io.jans.as.common.model.common.User user) -
isLDAP
public boolean isLDAP() -
getPersistenceType
-
addUser
public io.jans.as.common.model.common.User addUser(io.jans.as.common.model.common.User user, boolean active) -
updateUser
public io.jans.as.common.model.common.User updateUser(io.jans.as.common.model.common.User user) -
verifyCustomAttributes
-
removeInActiveCustomAttribute
-
findAttributeByName
-
getRequiredAttributes
-
getJansAttributeName
-
validateAttributes
-
getAttributeType
-