Package io.jans.scim.service.scim2
Class Scim2GroupService
- java.lang.Object
-
- io.jans.scim.service.scim2.Scim2GroupService
-
- All Implemented Interfaces:
Serializable
@ApplicationScoped public class Scim2GroupService extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Scim2GroupService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupResource
buildGroupResource(JansGroup gluuGroup, boolean fillMembersDisplay, String endpointUrl, String usersUrl)
void
createGroup(JansGroup gluuGroup, GroupResource group, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
Inserts a new group in LDAP based on the SCIM Resource passed There is no need to check attributes mutability in this case as there are no original attributes (the resource does not exist yet)void
deleteGroup(JansGroup gluuGroup)
boolean
membersDisplayInPath(String strPath)
JansGroup
preCreateGroup(GroupResource group, boolean skipMembersValidation, boolean fillDisplay, String usersUrl)
void
replaceGroupInfo(JansGroup gluuGroup, GroupResource group, boolean skipMembersValidation, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
void
restoreMembersDisplay(GroupResource trusted, GroupResource altered)
Takes two GroupResource objects and attempts to fill the members' display names in the second object when missing based on the data existing in the first object.io.jans.orm.model.PagedResult<BaseScimResource>
searchGroups(String filter, String sortBy, io.jans.orm.model.SortOrder sortOrder, int startIndex, int count, String groupsUrl, String usersUrl, int maxCount, boolean fillMembersDisplay)
void
transferAttributesToGroupResource(JansGroup gluuGroup, GroupResource res, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
GroupResource
updateGroup(JansGroup gluuGroup, GroupResource group, boolean skipMembersValidation, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
-
-
-
Method Detail
-
restoreMembersDisplay
public void restoreMembersDisplay(GroupResource trusted, GroupResource altered)
Takes two GroupResource objects and attempts to fill the members' display names in the second object when missing based on the data existing in the first object. In practice the first object represents an already stored group while the second is the result of modifications applied upon the first. In the course of modifications some display names may have removed. This method tries to recover some of this lost data- Parameters:
trusted
- Object containing valid group dataaltered
- Modified object
-
transferAttributesToGroupResource
public void transferAttributesToGroupResource(JansGroup gluuGroup, GroupResource res, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
-
preCreateGroup
public JansGroup preCreateGroup(GroupResource group, boolean skipMembersValidation, boolean fillDisplay, String usersUrl) throws Exception
- Throws:
Exception
-
createGroup
public void createGroup(JansGroup gluuGroup, GroupResource group, boolean fillMembersDisplay, String groupsUrl, String usersUrl) throws Exception
Inserts a new group in LDAP based on the SCIM Resource passed There is no need to check attributes mutability in this case as there are no original attributes (the resource does not exist yet)- Parameters:
group
- A GroupResource object with all info as received by the web servicegroupsUrl
- Base URL associated to group resources in SCIM (eg. .../scim/v2/Groups)usersUrl
- Base URL associated to user resources in SCIM (eg. .../scim/v2/Users)- Throws:
Exception
- In case of unexpected error
-
buildGroupResource
public GroupResource buildGroupResource(JansGroup gluuGroup, boolean fillMembersDisplay, String endpointUrl, String usersUrl)
-
updateGroup
public GroupResource updateGroup(JansGroup gluuGroup, GroupResource group, boolean skipMembersValidation, boolean fillMembersDisplay, String groupsUrl, String usersUrl) throws Exception
- Throws:
Exception
-
replaceGroupInfo
public void replaceGroupInfo(JansGroup gluuGroup, GroupResource group, boolean skipMembersValidation, boolean fillMembersDisplay, String groupsUrl, String usersUrl) throws Exception
- Throws:
Exception
-
searchGroups
public io.jans.orm.model.PagedResult<BaseScimResource> searchGroups(String filter, String sortBy, io.jans.orm.model.SortOrder sortOrder, int startIndex, int count, String groupsUrl, String usersUrl, int maxCount, boolean fillMembersDisplay) throws Exception
- Throws:
Exception
-
membersDisplayInPath
public boolean membersDisplayInPath(String strPath)
-
-