Class ResourceNode

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.TreeNode, com.fasterxml.jackson.databind.JsonSerializable, com.fasterxml.jackson.databind.node.JsonNodeCreator, ScimNode, Serializable, Iterable<com.fasterxml.jackson.databind.JsonNode>
    Direct Known Subclasses:
    Group, Schema, ServiceProvider, User

    public abstract class ResourceNode
    extends AbstractSchemasHolder
    author Pascal Knueppel
    created at: 11.10.2019 - 11:23

    Each SCIM resource (Users, Groups, etc.) includes the following common attributes. With the exception of the "ServiceProviderConfig" and "ResourceType" server discovery endpoints and their associated resources, these attributes MUST be defined for all resources, including any extended resource types. When accepted by a service provider (e.g., after a SCIM create), the attributes "id" and "meta" (and its associated sub-attributes) MUST be assigned values by the service provider. Common attributes are considered to be part of every base resource schema and do not use their own "schemas" URI. For backward compatibility, some existing schema definitions MAY list common attributes as part of the schema. The attribute characteristics (see Section 2.2) listed here SHALL take precedence over older definitions that may be included in existing schemas.
    See Also:
    Serialized Form
    • Constructor Detail

      • ResourceNode

        public ResourceNode()
    • Method Detail

      • getId

        public Optional<String> getId()
        A unique identifier for a SCIM resource as defined by the service provider. Each representation of the resource MUST include a non-empty "id" value. This identifier MUST be unique across the SCIM service provider's entire set of resources. It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests. The value of the "id" attribute is always issued by the service provider and MUST NOT be specified by the client. The string "bulkId" is a reserved keyword and MUST NOT be used within any unique identifier value. The attribute characteristics are "caseExact" as "true", a mutability of "readOnly", and a "returned" characteristic of "always". See Section 9 for additional considerations regarding privacy.
      • setId

        public void setId​(String id)
        A unique identifier for a SCIM resource as defined by the service provider. Each representation of the resource MUST include a non-empty "id" value. This identifier MUST be unique across the SCIM service provider's entire set of resources. It MUST be a stable, non-reassignable identifier that does not change when the same resource is returned in subsequent requests. The value of the "id" attribute is always issued by the service provider and MUST NOT be specified by the client. The string "bulkId" is a reserved keyword and MUST NOT be used within any unique identifier value. The attribute characteristics are "caseExact" as "true", a mutability of "readOnly", and a "returned" characteristic of "always". See Section 9 for additional considerations regarding privacy.
      • getExternalId

        public Optional<String> getExternalId()
        A String that is an identifier for the resource as defined by the provisioning client. The "externalId" may simplify identification of a resource between the provisioning client and the service provider by allowing the client to use a filter to locate the resource with an identifier from the provisioning domain, obviating the need to store a local mapping between the provisioning domain's identifier of the resource and the identifier used by the service provider. Each resource MAY include a non-empty "externalId" value. The value of the "externalId" attribute is always issued by the provisioning client and MUST NOT be specified by the service provider. The service provider MUST always interpret the externalId as scoped to the provisioning domain. While the server does not enforce uniqueness, it is assumed that the value's uniqueness is controlled by the client setting the value. See Section 9 for additional considerations regarding privacy. This attribute has "caseExact" as "true" and a mutability of "readWrite". This attribute is OPTIONAL.
      • setExternalId

        public void setExternalId​(String externalId)
        A String that is an identifier for the resource as defined by the provisioning client. The "externalId" may simplify identification of a resource between the provisioning client and the service provider by allowing the client to use a filter to locate the resource with an identifier from the provisioning domain, obviating the need to store a local mapping between the provisioning domain's identifier of the resource and the identifier used by the service provider. Each resource MAY include a non-empty "externalId" value. The value of the "externalId" attribute is always issued by the provisioning client and MUST NOT be specified by the service provider. The service provider MUST always interpret the externalId as scoped to the provisioning domain. While the server does not enforce uniqueness, it is assumed that the value's uniqueness is controlled by the client setting the value. See Section 9 for additional considerations regarding privacy. This attribute has "caseExact" as "true" and a mutability of "readWrite". This attribute is OPTIONAL.
      • getMeta

        public Optional<Meta> getMeta()
        A complex attribute containing resource metadata. All "meta" sub-attributes are assigned by the service provider (have a "mutability" of "readOnly"), and all of these sub-attributes have a "returned" characteristic of "default". This attribute SHALL be ignored when provided by clients. "meta" contains the following sub-attributes:
      • setMeta

        public void setMeta​(Meta meta)
        A complex attribute containing resource metadata. All "meta" sub-attributes are assigned by the service provider (have a "mutability" of "readOnly"), and all of these sub-attributes have a "returned" characteristic of "default". This attribute SHALL be ignored when provided by clients. "meta" contains the following sub-attributes:
      • getSortingAttribute

        public Optional<com.fasterxml.jackson.databind.JsonNode> getSortingAttribute​(SchemaAttribute sortBy)
        this method is specifically for sorting and applies to the following rules for the "sortBy" attribute defined by RFC7644

           The "sortBy" parameter specifies the attribute whose value
           SHALL be used to order the returned responses.  If the "sortBy"
           attribute corresponds to a singular attribute, resources are
           sorted according to that attribute's value; if it's a multi-valued
           attribute, resources are sorted by the value of the primary
           attribute (see Section 2.4 of [RFC7643]), if any, or else the
           first value in the list, if any.  If the attribute is complex, the
           attribute name must be a path to a sub-attribute in standard
           attribute notation (Section 3.10), e.g., "sortBy=name.givenName".
           For all attribute types, if there is no data for the specified
           "sortBy" value, they are sorted via the "sortOrder" parameter,
           i.e., they are ordered last if ascending and first if descending.
         
        Parameters:
        sortBy - the sortBy attribute definition
        Returns:
        the json node that represents the specified attribute