Object
se.curity.identityserver.sdk.attribute.MapAttributeValue
se.curity.identityserver.sdk.attribute.scim.v2.Meta
All Implemented Interfaces:
Iterable<Attribute>, AttributeContainer<MapAttributeValue>, AttributeOrAttributeValue<AttributeValue>, AttributeValue

public final class Meta extends MapAttributeValue
The meta object of SCIM.

Example:

 "meta": {
     "resourceType": "User",
     "created": "2010-01-23T04:56:22Z",
     "lastModified": "2011-05-13T04:42:34Z",
     "version": "W\/\"3694e05e9dff591\"",
     "location": "https://example.com/v2/Users/2819c223-7f76-453a-413861904646"
 }
 
  • Field Details

  • Method Details

    • of

      public static Meta of(String resourceType)
      Create a Meta object with the given resource type.
      Parameters:
      resourceType - the resource type
      Returns:
      a Meta object with the resourceType and defult values set.
      See Also:
    • of

      public static Meta of(MapAttributeValue mapAttributeValue)
      Create a Meta object from attributes.
      Parameters:
      mapAttributeValue - to create the object from
      Returns:
      a Meta object with the attributes set
    • getResourceType

      public String getResourceType()
      The name of the resource type of the resource. For instance "User"
      Returns:
      the resourceType set
      Throws:
      NoSuchElementException - if this attribute is not set
    • getCreated

      public Instant getCreated()
      The timestamp that the resource was added to the service provider.
      Returns:
      the timestamp
      Throws:
      NoSuchElementException - if this attribute is not set
      DateTimeParseException - if the String is not valid
    • getLastModified

      public Instant getLastModified()
      The most recent DateTime that the details of this resource were updated at the service provider.

      If this resource has never been modified since its initial creation, the value is the same as the value of getCreated().

      Returns:
      the timestamp of the last modification
      Throws:
      NoSuchElementException - if this attribute is not set
      DateTimeParseException - if the String is not valid
    • getTimezone

      public ZoneId getTimezone()
    • getLocation

      @Nullable public @Nullable String getLocation()
      The URI of the resource being returned.

      Example: "location": "https://example.com/v2/Users/2819c223-7f76-453a-413861904646"

      Returns:
      the uri to the resource
    • getVersion

      @Nullable public @Nullable String getVersion()
      The version of the resource being returned.

      This is matching the value of the entity-tag (ETag) HTTP response header

      Returns:
      the version of the resource
    • withLastModified

      public Meta withLastModified(Instant lastModified)
    • withCreated

      public Meta withCreated(Instant created)
    • withLocation

      public Meta withLocation(String location)
    • with

      public Meta with(Attribute attribute)
      Description copied from interface: AttributeContainer
      Add the given attribute if not present, or replace the attribute if it already exists. Note that two attributes with the same name and different authorities are considered distinct.
      Specified by:
      with in interface AttributeContainer<MapAttributeValue>
      Overrides:
      with in class MapAttributeValue
      Parameters:
      attribute - attribute to add or to override
      Returns:
      a copy of this which contains the given Attribute
    • with

      public Meta with(Iterable<Attribute> attributes)
      Description copied from interface: AttributeContainer
      Add the given attributes if not present, or replace the attribute if it already exists. Note that two attributes with the same name and different authorities are considered distinct.
      Specified by:
      with in interface AttributeContainer<MapAttributeValue>
      Overrides:
      with in class MapAttributeValue
      Parameters:
      attributes - attribute to add or to override
      Returns:
      a copy of this which contains the given Attributes
    • adaptToTimezone

      public Meta adaptToTimezone(ZoneId zoneId)