Interface ScimV2Mapping

All Known Implementing Classes:
DefaultScimV2Mapping

public interface ScimV2Mapping
Interface for mapping ScimResource to Nuxeo DocumentModel and vice versa.
Since:
2023.14
  • 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 model
      groupResource - 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 model
      userResource - 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 model
      groupResource - 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 model
      userResource - 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 created
      groupResource - 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 created
      userResource - 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 updated
      groupResource - 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 updated
      userResource - 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

      String getGroupAttributeName(String scimAttribute, Object filterValue)
      Gets the Nuxeo group model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.
      Parameters:
      scimAttribute - the SCIM attribute name
      filterValue - the value of a filter expression to be converted if any
      Returns:
      the matching group model attribute
    • getGroupMemberAttributeName

      String getGroupMemberAttributeName(String scimAttribute, Object filterValue)
      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 name
      filterValue - 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 model
      baseURL - 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

      String getUserAttributeName(String scimAttribute, Object filterValue)
      Gets the Nuxeo user model attribute name matching the SCIM attribute name used in SCIM Search filtering and sorting.
      Parameters:
      scimAttribute - the SCIM attribute name
      filterValue - the value of a filter expression to be converted if any
      Returns:
      the matching group model attribute
    • getUserMemberAttributeName

      String getUserMemberAttributeName(String scimAttribute, Object filterValue)
      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 name
      filterValue - 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 model
      baseURL - 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 patch
      groupResource - 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