Package org.nuxeo.scim.v2.api
Interface ScimV2Mapping
- All Known Implementing Classes:
DefaultScimV2Mapping
public interface ScimV2Mapping
Interface for mapping
ScimResource
to Nuxeo DocumentModel
and vice versa.- Since:
- 2023.14
-
Method Summary
Modifier and TypeMethodDescriptionafterCreateGroup
(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) Hook to be executed after a group is created.afterCreateUser
(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) Hook to be executed after a user is created.afterUpdateGroup
(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) Hook to be executed after a group is updated.afterUpdateUser
(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) Hook to be executed after a user is updated.beforeCreateGroup
(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) Hook to be executed before a group is created.beforeCreateUser
(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) Hook to be executed before a user is created.beforeUpdateGroup
(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) Hook to be executed before a group is updated.beforeUpdateUser
(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) Hook to be executed before a user is updated.getGroupAttributeName
(String scimAttribute, Object filterValue) Gets the Nuxeo group model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.getGroupMemberAttributeName
(String scimAttribute, Object filterValue) Gets the Nuxeo group model attribute name matching the SCIM attribute name used in SCIM patch request path filtering.com.unboundid.scim2.common.types.GroupResource
getGroupResourceFromNuxeoGroup
(DocumentModel groupModel, String baseURL) Gets a group resource representation of a group model.getUserAttributeName
(String scimAttribute, Object filterValue) Gets the Nuxeo user model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.getUserMemberAttributeName
(String scimAttribute, Object filterValue) Gets the Nuxeo user model attribute name matching the SCIM attribute name used in SCIM patch request path filtering.com.unboundid.scim2.common.types.UserResource
getUserResourceFromNuxeoUser
(DocumentModel userModel, String baseURL) Gets a user resource representation of a user model.patchGroup
(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) Hook to be executed when a group is patched using JSON patch.
-
Method Details
-
afterCreateGroup
DocumentModel afterCreateGroup(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed after a group is created.- Parameters:
groupModel
- the created group modelgroupResource
- the group resource from which the group model is created- Returns:
- the created group model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
afterCreateUser
DocumentModel afterCreateUser(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed after a user is created.- Parameters:
userModel
- the created user modeluserResource
- the user resource from which the user model is created- Returns:
- the created user model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
afterUpdateGroup
DocumentModel afterUpdateGroup(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed after a group is updated.- Parameters:
groupModel
- the updated group modelgroupResource
- the group resource from which the group model is updated- Returns:
- the updated group model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
afterUpdateUser
DocumentModel afterUpdateUser(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed after a user is updated.- Parameters:
userModel
- the created user modeluserResource
- the user resource from which the user model is updated- Returns:
- the updated user model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
beforeCreateGroup
DocumentModel beforeCreateGroup(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed before a group is created.- Parameters:
groupModel
- the group model about to be createdgroupResource
- the group resource from which the group model is created- Returns:
- the created group model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
beforeCreateUser
DocumentModel beforeCreateUser(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed before a user is created.- Parameters:
userModel
- the user model about to be createduserResource
- the user resource from which the user model is created- Returns:
- the created user model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
beforeUpdateGroup
DocumentModel beforeUpdateGroup(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed before a group is updated.- Parameters:
groupModel
- the group model about to be updatedgroupResource
- the group resource from which the group model is updated- Returns:
- the updated group model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
beforeUpdateUser
DocumentModel beforeUpdateUser(DocumentModel userModel, com.unboundid.scim2.common.types.UserResource userResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed before a user is updated.- Parameters:
userModel
- the user model about to be updateduserResource
- the user resource from which the user model is updated- Returns:
- the updated user model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
getGroupAttributeName
Gets the Nuxeo group model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.- Parameters:
scimAttribute
- the SCIM attribute namefilterValue
- the value of a filter expression to be converted if any- Returns:
- the matching group model attribute
-
getGroupMemberAttributeName
Gets the Nuxeo group model attribute name matching the SCIM attribute name used in SCIM patch request path filtering. E.g. in this case, the SCIM attribute to map is "value":{ "schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations":[{ "op":"remove", "path":"members[value eq \"someGroupId\"]" }] }
- Parameters:
scimAttribute
- the SCIM attribute namefilterValue
- the value of a filter expression to be converted if any- Returns:
- the matching group model attribute
-
getGroupResourceFromNuxeoGroup
com.unboundid.scim2.common.types.GroupResource getGroupResourceFromNuxeoGroup(DocumentModel groupModel, String baseURL) throws com.unboundid.scim2.common.exceptions.ScimException Gets a group resource representation of a group model.- Parameters:
groupModel
- the group modelbaseURL
- the location base URL of the SCIM group object- Returns:
- the group resource
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
getUserAttributeName
Gets the Nuxeo user model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.- Parameters:
scimAttribute
- the SCIM attribute namefilterValue
- the value of a filter expression to be converted if any- Returns:
- the matching group model attribute
-
getUserMemberAttributeName
Gets the Nuxeo user model attribute name matching the SCIM attribute name used in SCIM patch request path filtering. E.g. in this case, the SCIM attribute to map is "value":{ "schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations":[{ "op":"remove", "path":"members[value eq \"someUserId\"]" }] }
- Parameters:
scimAttribute
- the SCIM attribute namefilterValue
- the value of a filter expression to be converted if any- Returns:
- the matching user model attribute
-
getUserResourceFromNuxeoUser
com.unboundid.scim2.common.types.UserResource getUserResourceFromNuxeoUser(DocumentModel userModel, String baseURL) throws com.unboundid.scim2.common.exceptions.ScimException Gets a user resource representation of a user model.- Parameters:
userModel
- the user modelbaseURL
- the location base URL of the SCIM user object- Returns:
- the user resource
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-
patchGroup
DocumentModel patchGroup(DocumentModel groupModel, com.unboundid.scim2.common.types.GroupResource groupResource) throws com.unboundid.scim2.common.exceptions.ScimException Hook to be executed when a group is patched using JSON patch.This is called when handling the attributes othen than "members" in a patch request operation.
- Parameters:
groupModel
- the group model to patchgroupResource
- the group resource from which the group model is patched- Returns:
- the patched group model
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurred
-