Package io.jans.scim.service.scim2
Class Scim2UserService
- java.lang.Object
-
- io.jans.scim.service.scim2.Scim2UserService
-
- All Implemented Interfaces:
Serializable
@ApplicationScoped public class Scim2UserService extends Object implements Serializable
This class holds the most important business logic of the SCIM service for the resource type "User". It's devoted to taking objects of class UserResource, feeding instances of ScimCustomPerson, and do persistence to LDAP. The converse is also done: querying LDAP, and transforming ScimCustomPerson into UserResource- Author:
- jgomer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Scim2UserService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserResource
buildUserResource(ScimCustomPerson person, String url)
void
createUser(ScimCustomPerson gluuPerson, UserResource user, String url)
Inserts a new user in LDAP based on the SCIM Resource passedvoid
deleteUser(ScimCustomPerson gluuPerson)
boolean
passwordValidationPassed(String password)
ScimCustomPerson
preCreateUser(UserResource user)
void
removePPIDsBranch(String dn)
void
replacePersonInfo(ScimCustomPerson gluuPerson, UserResource user, String url)
io.jans.orm.model.PagedResult<BaseScimResource>
searchUsers(String filter, String sortBy, io.jans.orm.model.SortOrder sortOrder, int startIndex, int count, String url, int maxCount)
void
transferAttributesToUserResource(ScimCustomPerson person, UserResource res, String url)
UserResource
updateUser(ScimCustomPerson gluuPerson, UserResource user, String url)
-
-
-
Method Detail
-
transferAttributesToUserResource
public void transferAttributesToUserResource(ScimCustomPerson person, UserResource res, String url)
-
preCreateUser
public ScimCustomPerson preCreateUser(UserResource user)
-
createUser
public void createUser(ScimCustomPerson gluuPerson, UserResource user, String url) throws Exception
Inserts a new user in LDAP based on the SCIM Resource passed- Parameters:
user
- A UserResource object with all info as received by the web serviceurl
- Base URL associated to user resources in SCIM (eg. .../scim/v2/Users)- Throws:
Exception
- In case of unexpected error
-
buildUserResource
public UserResource buildUserResource(ScimCustomPerson person, String url)
-
updateUser
public UserResource updateUser(ScimCustomPerson gluuPerson, UserResource user, String url) throws InvalidAttributeValueException
- Throws:
InvalidAttributeValueException
-
replacePersonInfo
public void replacePersonInfo(ScimCustomPerson gluuPerson, UserResource user, String url)
-
deleteUser
public void deleteUser(ScimCustomPerson gluuPerson) throws Exception
- Throws:
Exception
-
searchUsers
public io.jans.orm.model.PagedResult<BaseScimResource> searchUsers(String filter, String sortBy, io.jans.orm.model.SortOrder sortOrder, int startIndex, int count, String url, int maxCount) throws Exception
- Throws:
Exception
-
removePPIDsBranch
public void removePPIDsBranch(String dn)
-
passwordValidationPassed
public boolean passwordValidationPassed(String password)
-
-