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(GluuGroup gluuGroup, boolean fillMembersDisplay, String endpointUrl, String usersUrl)
void
createGroup(GluuGroup 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(GluuGroup gluuGroup)
boolean
membersDisplayInPath(String strPath)
GluuGroup
preCreateGroup(GroupResource group, boolean skipMembersValidation, boolean fillDisplay, String usersUrl)
void
replaceGroupInfo(GluuGroup 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(GluuGroup gluuGroup, GroupResource res, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
GroupResource
updateGroup(GluuGroup 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(GluuGroup gluuGroup, GroupResource res, boolean fillMembersDisplay, String groupsUrl, String usersUrl)
-
preCreateGroup
public GluuGroup preCreateGroup(GroupResource group, boolean skipMembersValidation, boolean fillDisplay, String usersUrl) throws Exception
- Throws:
Exception
-
createGroup
public void createGroup(GluuGroup 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(GluuGroup gluuGroup, boolean fillMembersDisplay, String endpointUrl, String usersUrl)
-
updateGroup
public GroupResource updateGroup(GluuGroup gluuGroup, GroupResource group, boolean skipMembersValidation, boolean fillMembersDisplay, String groupsUrl, String usersUrl) throws Exception
- Throws:
Exception
-
replaceGroupInfo
public void replaceGroupInfo(GluuGroup 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)
-
-