Class SchemaAttribute
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializable.Base
-
- com.fasterxml.jackson.databind.JsonNode
-
- com.fasterxml.jackson.databind.node.BaseJsonNode
-
- com.fasterxml.jackson.databind.node.ContainerNode<com.fasterxml.jackson.databind.node.ObjectNode>
-
- com.fasterxml.jackson.databind.node.ObjectNode
-
- de.captaingoldfish.scim.sdk.common.resources.base.ScimObjectNode
-
- de.captaingoldfish.scim.sdk.common.schemas.SchemaAttribute
-
- 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>
public final class SchemaAttribute extends ScimObjectNode
holds the data of an attribute definition from a schema type document- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description SchemaAttribute(Schema schema, String resourceUri, SchemaAttribute parent, com.fasterxml.jackson.databind.JsonNode jsonNode)
protected
SchemaAttribute(Schema schema, String resourceUri, SchemaAttribute parent, com.fasterxml.jackson.databind.JsonNode jsonNode, String namePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCanonicalValues()
A collection of suggested canonical values that MAY be used (e.g., "work" and "home").String
getDescription()
The attribute's human-readable description.String
getFullResourceName()
Optional<Double>
getMaximum()
The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance.Optional<Integer>
getMaxItems()
The value of this keyword MUST be a non-negative integer.Optional<Long>
getMaxLength()
The value of this keyword MUST be a non-negative integer.Optional<Double>
getMinimum()
The value of "minimum" MUST be a number, representing an inclusive lower limit for a numeric instance.Optional<Integer>
getMinItems()
The value of this keyword MUST be a non-negative integer.Optional<Long>
getMinLength()
The value of this keyword MUST be a non-negative integer.Optional<Double>
getMultipleOf()
The value of "multipleOf" MUST be a number, strictly greater than 0.Mutability
getMutability()
A single keyword indicating the circumstances under which the value of the attribute can be (re)defined: readOnly The attribute SHALL NOT be modified.String
getName()
The attribute's name.String
getNamePrefix()
Optional<Instant>
getNotAfter()
a dateTime validation attribute that must not be after the value of this attributeOptional<Instant>
getNotBefore()
a dateTime validation attribute that must not be before the value of this attributeOptional<Pattern>
getPattern()
The value of this keyword MUST be a string.List<ReferenceTypes>
getReferenceTypes()
A multi-valued array of JSON strings that indicate the SCIM resource types that may be referenced.Returned
getReturned()
A single keyword that indicates when an attribute and associated values are returned in response to a GET request or in response to a PUT, POST, or PATCH request.String
getScimNodeName()
List<SchemaAttribute>
getSubAttributes()
When an attribute is of type "complex", "subAttributes" defines a set of sub-attributes.Type
getType()
The attribute's data type.Uniqueness
getUniqueness()
A single keyword value that specifies how the service provider enforces uniqueness of attribute values.boolean
isCaseExact()
A Boolean value that specifies whether or not a string attribute is case sensitive.boolean
isMultiValued()
A Boolean value indicating the attribute's plurality.boolean
isRequired()
A Boolean value that specifies whether or not the attribute is required.void
setMaximum(double maximum)
The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance.void
setMaxItems(Integer maxItems)
The value of this keyword MUST be a non-negative integer.void
setMaxLength(Long maxLength)
The value of this keyword MUST be a non-negative integer.void
setMinimum(double minimum)
The value of "minimum" MUST be a number, representing an inclusive lower limit for a numeric instance.void
setMinItems(Integer minItems)
The value of this keyword MUST be a non-negative integer.void
setMinLength(Long minLength)
The value of this keyword MUST be a non-negative integer.void
setMultipleOf(double multipleOf)
The value of "multipleOf" MUST be a number, strictly greater than 0.void
setNotAfter(String notAfter)
a dateTime validation attribute that must not be after the value of this attributevoid
setNotAfter(Instant notAfter)
a dateTime validation attribute that must not be after the value of this attributevoid
setNotAfter(LocalDateTime notAfter)
a dateTime validation attribute that must not be after the value of this attributevoid
setNotAfter(OffsetDateTime notAfter)
a dateTime validation attribute that must not be after the value of this attributevoid
setNotBefore(String notBefore)
a dateTime validation attribute that must not be before the value of this attributevoid
setNotBefore(Instant notBefore)
a dateTime validation attribute that must not be before the value of this attributevoid
setNotBefore(LocalDateTime notBefore)
a dateTime validation attribute that must not be before the value of this attributevoid
setNotBefore(OffsetDateTime notBefore)
a dateTime validation attribute that must not be before the value of this attributevoid
setPattern(String pattern)
The value of this keyword MUST be a string.-
Methods inherited from class de.captaingoldfish.scim.sdk.common.resources.base.ScimObjectNode
addAttribute, getArrayAttribute, getBooleanAttribute, getDateTimeAttribute, getDoubleAttribute, getIntegerAttribute, getLongAttribute, getObjectAttribute, getSimpleArrayAttribute, getSimpleArrayAttribute, getSimpleArrayAttributeSet, getSimpleArrayAttributeSet, getStringAttribute, getStringAttribute, isEmpty, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeList, setDateTimeAttribute, setDateTimeAttribute, setDateTimeAttribute, setDateTimeAttribute, setStringAttributeList, setStringAttributeList, toPrettyString, toString
-
Methods inherited from class com.fasterxml.jackson.databind.node.ObjectNode
_at, _childrenEqual, _put, asToken, deepCopy, elements, equals, equals, fieldNames, fields, findParent, findParents, findValue, findValues, findValuesAsText, get, get, getNodeType, hashCode, isEmpty, isObject, path, path, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, putArray, putNull, putObject, putPOJO, putRawValue, remove, remove, removeAll, replace, required, retain, retain, serialize, serializeWithType, set, setAll, setAll, size, with, withArray, without, without
-
Methods inherited from class com.fasterxml.jackson.databind.node.ContainerNode
arrayNode, arrayNode, asText, binaryNode, binaryNode, booleanNode, missingNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, textNode
-
Methods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode
findPath, numberType, required, traverse, traverse
-
Methods inherited from class com.fasterxml.jackson.databind.JsonNode
_reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToInt, canConvertToLong, decimalValue, doubleValue, findParents, findValues, findValuesAsText, floatValue, has, has, hasNonNull, hasNonNull, intValue, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isPojo, isShort, isTextual, isValueNode, iterator, longValue, numberValue, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface de.captaingoldfish.scim.sdk.common.resources.base.ScimNode
getAttributeDescription, getAttributeName, getSchemaAttribute, getValueType
-
-
-
-
Constructor Detail
-
SchemaAttribute
protected SchemaAttribute(Schema schema, String resourceUri, SchemaAttribute parent, com.fasterxml.jackson.databind.JsonNode jsonNode, String namePrefix)
-
SchemaAttribute
public SchemaAttribute(Schema schema, String resourceUri, SchemaAttribute parent, com.fasterxml.jackson.databind.JsonNode jsonNode)
-
-
Method Detail
-
getFullResourceName
public String getFullResourceName()
- Returns:
- the full resource node name e.g. User.name.givenName or Group.member.value
-
getScimNodeName
public String getScimNodeName()
- Returns:
- the name scim node name of this attribute e.g. "name.givenName"
-
getNamePrefix
public String getNamePrefix()
- See Also:
namePrefix
-
getName
public String getName()
The attribute's name.
-
getType
public Type getType()
The attribute's data type. Valid values are "string", "boolean", "decimal", "integer", "dateTime", "reference", and "complex". When an attribute is of type "complex", there SHOULD be a corresponding schema attribute "subAttributes" defined, listing the sub-attributes of the attribute.
-
getDescription
public String getDescription()
The attribute's human-readable description. When applicable, service providers MUST specify the description.
-
getMutability
public Mutability getMutability()
A single keyword indicating the circumstances under which the value of the attribute can be (re)defined: readOnly The attribute SHALL NOT be modified. readWrite The attribute MAY be updated and read at any time. This is the default value. immutable The attribute MAY be defined at resource creation (e.g., POST) or at record replacement via a request (e.g., a PUT). The attribute SHALL NOT be updated. writeOnly The attribute MAY be updated at any time. Attribute values SHALL NOT be returned (e.g., because the value is a stored hash). Note: An attribute with a mutability of "writeOnly" usually also has a returned setting of "never".- Returns:
- the mutability value of this node
-
getReturned
public Returned getReturned()
A single keyword that indicates when an attribute and associated values are returned in response to a GET request or in response to a PUT, POST, or PATCH request. Valid keywords are as follows: always The attribute is always returned, regardless of the contents of the "attributes" parameter. For example, "id" is always returned to identify a SCIM resource. never The attribute is never returned. This may occur because the original attribute value (e.g., a hashed value) is not retained by the service provider. A service provider MAY allow attributes to be used in a search filter. default The attribute is returned by default in all SCIM operation responses where attribute values are returned. If the GET request "attributes" parameter is specified, attribute values are only returned if the attribute is named in the "attributes" parameter. DEFAULT. request The attribute is returned in response to any PUT, POST, or PATCH operations if the attribute was specified by the client (for example, the attribute was modified). The attribute is returned in a SCIM query operation only if specified in the "attributes" parameter.- Returns:
- the returned value of this node
-
getUniqueness
public Uniqueness getUniqueness()
A single keyword value that specifies how the service provider enforces uniqueness of attribute values. A server MAY reject an invalid value based on uniqueness by returning HTTP response code 400 (Bad Request). A client MAY enforce uniqueness on the client side to a greater degree than the service provider enforces. For example, a client could make a value unique while the server has uniqueness of "none". Valid keywords are as follows: none The values are not intended to be unique in any way. DEFAULT. server The value SHOULD be unique within the context of the current SCIM endpoint (or tenancy) and MAY be globally unique (e.g., a "username", email address, or other server-generated key or counter). No two resources on the same server SHOULD possess the same value. global The value SHOULD be globally unique (e.g., an email address, a GUID, or other value). No two resources on any server SHOULD possess the same value.- Returns:
- the uniqueness value of this node
-
isMultiValued
public boolean isMultiValued()
A Boolean value indicating the attribute's plurality.- Returns:
- if this node is an
ArrayNode
or not
-
isRequired
public boolean isRequired()
A Boolean value that specifies whether or not the attribute is required.- Returns:
- if this node is a required value in the resource
-
isCaseExact
public boolean isCaseExact()
A Boolean value that specifies whether or not a string attribute is case sensitive. The server SHALL use case sensitivity when evaluating filters. For attributes that are case exact, the server SHALL preserve case for any value submitted. If the attribute is case insensitive, the server MAY alter case for a submitted value. Case sensitivity also impacts how attribute values MAY be compared against filter values (see Section 3.4.2.2 of [RFC7644]).- Returns:
- if the value of this node must be handled case exact or case insensitive
-
getCanonicalValues
public List<String> getCanonicalValues()
A collection of suggested canonical values that MAY be used (e.g., "work" and "home"). In some cases, service providers MAY choose to ignore unsupported values. OPTIONAL.- Returns:
- the canonical values of this node
-
getReferenceTypes
public List<ReferenceTypes> getReferenceTypes()
A multi-valued array of JSON strings that indicate the SCIM resource types that may be referenced. Valid values are as follows: + A SCIM resource type (e.g., "User" or "Group"), + "external" - indicating that the resource is an external resource (e.g., a photo), or + "uri" - indicating that the reference is to a service endpoint or an identifier (e.g., a schema URN). This attribute is only applicable for attributes that are of type "reference" (Section 2.3.7).- Returns:
- the reference types that are valid for this node. Only important if the
ScimNode.getValueType()
method returns the valueType.REFERENCE
-
getMultipleOf
public Optional<Double> getMultipleOf()
The value of "multipleOf" MUST be a number, strictly greater than 0. A numeric instance is valid only if division by this keyword's value results in an integer.
-
setMultipleOf
public void setMultipleOf(double multipleOf)
The value of "multipleOf" MUST be a number, strictly greater than 0. A numeric instance is valid only if division by this keyword's value results in an integer.
-
getMinimum
public Optional<Double> getMinimum()
The value of "minimum" MUST be a number, representing an inclusive lower limit for a numeric instance. If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum".
-
setMinimum
public void setMinimum(double minimum)
The value of "minimum" MUST be a number, representing an inclusive lower limit for a numeric instance. If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum".
-
getMaximum
public Optional<Double> getMaximum()
The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance. If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum".
-
setMaximum
public void setMaximum(double maximum)
The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance. If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum".
-
getMaxLength
public Optional<Long> getMaxLength()
The value of this keyword MUST be a non-negative integer. A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. The length of a string instance is defined as the number of its characters as defined by RFC 8259 [RFC8259].
-
setMaxLength
public void setMaxLength(Long maxLength)
The value of this keyword MUST be a non-negative integer. A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. The length of a string instance is defined as the number of its characters as defined by RFC 8259 [RFC8259].
-
getMinLength
public Optional<Long> getMinLength()
The value of this keyword MUST be a non-negative integer. A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. The length of a string instance is defined as the number of its characters as defined by RFC 8259 [RFC8259]. Omitting this keyword has the same behavior as a value of 0.
-
setMinLength
public void setMinLength(Long minLength)
The value of this keyword MUST be a non-negative integer. A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. The length of a string instance is defined as the number of its characters as defined by RFC 8259 [RFC8259]. Omitting this keyword has the same behavior as a value of 0.
-
getPattern
public Optional<Pattern> getPattern()
The value of this keyword MUST be a string. This string SHOULD be a valid regular expression, according to the Java regular expression dialect. A string instance is considered valid if the regular expression matches the instance successfully. Recall: regular expressions are not implicitly anchored.
-
setPattern
public void setPattern(String pattern)
The value of this keyword MUST be a string. This string SHOULD be a valid regular expression, according to the Java regular expression dialect. A string instance is considered valid if the regular expression matches the instance successfully. Recall: regular expressions are not implicitly anchored.
-
getMinItems
public Optional<Integer> getMinItems()
The value of this keyword MUST be a non-negative integer. An array instance is valid against "minItems" if its size is greater than, or equal to, the value of this keyword. Omitting this keyword has the same behavior as a value of 0.
-
setMinItems
public void setMinItems(Integer minItems)
The value of this keyword MUST be a non-negative integer. An array instance is valid against "minItems" if its size is greater than, or equal to, the value of this keyword. Omitting this keyword has the same behavior as a value of 0.
-
getMaxItems
public Optional<Integer> getMaxItems()
The value of this keyword MUST be a non-negative integer. An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
-
setMaxItems
public void setMaxItems(Integer maxItems)
The value of this keyword MUST be a non-negative integer. An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
-
getNotBefore
public Optional<Instant> getNotBefore()
a dateTime validation attribute that must not be before the value of this attribute
-
setNotBefore
public void setNotBefore(String notBefore)
a dateTime validation attribute that must not be before the value of this attribute
-
setNotBefore
public void setNotBefore(Instant notBefore)
a dateTime validation attribute that must not be before the value of this attribute
-
setNotBefore
public void setNotBefore(LocalDateTime notBefore)
a dateTime validation attribute that must not be before the value of this attribute
-
setNotBefore
public void setNotBefore(OffsetDateTime notBefore)
a dateTime validation attribute that must not be before the value of this attribute
-
getNotAfter
public Optional<Instant> getNotAfter()
a dateTime validation attribute that must not be after the value of this attribute
-
setNotAfter
public void setNotAfter(String notAfter)
a dateTime validation attribute that must not be after the value of this attribute
-
setNotAfter
public void setNotAfter(Instant notAfter)
a dateTime validation attribute that must not be after the value of this attribute
-
setNotAfter
public void setNotAfter(LocalDateTime notAfter)
a dateTime validation attribute that must not be after the value of this attribute
-
setNotAfter
public void setNotAfter(OffsetDateTime notAfter)
a dateTime validation attribute that must not be after the value of this attribute
-
getSubAttributes
public List<SchemaAttribute> getSubAttributes()
When an attribute is of type "complex", "subAttributes" defines a set of sub-attributes. "subAttributes" has the same schema sub-attributes as "attributes".
-
-