Class Schema
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.resources.AbstractSchemasHolder
de.captaingoldfish.scim.sdk.common.resources.ResourceNode
de.captaingoldfish.scim.sdk.common.schemas.Schema
- 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>
author Pascal Knueppel
created at: 03.10.2019 - 13:24
this class will represent a SCIM schema definition
created at: 03.10.2019 - 13:24
this class will represent a SCIM schema definition
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonNode
com.fasterxml.jackson.databind.JsonNode.OverwriteModeNested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable
com.fasterxml.jackson.databind.JsonSerializable.Base -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SchemaAttributethe attribute definition for the schemas-attribute that is part of each schemaFields inherited from class com.fasterxml.jackson.databind.node.ObjectNode
_childrenFields inherited from class com.fasterxml.jackson.databind.node.ContainerNode
_nodeFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(com.fasterxml.jackson.databind.JsonNode schemaAttribute) adds a new attribute definition to this schemavoidaddSchemaAttribute(SchemaAttribute schemaAttribute) allows the childSchemaAttributes to add themselves to this schema into theattributeRegisterthe names of the attributes of this schema inclusive the subattribute names.this register shall be a simple reference map that is used for scim filter expressions to find the attributes fast without iterating again and again of the attributes list.
All attributes will be added with the value output of the methodSchemaAttribute.getScimNodeName()in lowercasegets the schema attributes of this schemathis list will hold references to all schema attributes that might be used to set bulkId references in a bulk request.a reference map that contains all non-multivalued complex attributes of this schemaThe schema's human-readable description.a reference map that contains all immutable attributesa reference map that contains all multivalued complex attributes of this schemagetName()The schema's human-readable name.used explicitly for schema validation for easier code readinga reference map that contains all readOnly attributesgetSchemaAttribute(String scimNodeName) gets aSchemaAttributedefinition by its scimNodeName e.g.this list will hold references to all schema attributes that define itself as type 'reference' with 'referenceType=resource'.voidremoveAttribute(SchemaAttribute schemaAttribute) removes an attribute definition from this schemaMethods inherited from class de.captaingoldfish.scim.sdk.common.resources.ResourceNode
getExternalId, getId, getMeta, getSortingAttribute, remove, setExternalId, setId, setMetaMethods inherited from class de.captaingoldfish.scim.sdk.common.resources.AbstractSchemasHolder
addSchema, getSchemas, removeSchema, setSchemas, setSchemasMethods inherited from class de.captaingoldfish.scim.sdk.common.resources.base.ScimObjectNode
addAttribute, equals, getArrayAttribute, getBinaryAttribute, getBooleanAttribute, getDateTimeAttribute, getDoubleAttribute, getIntegerAttribute, getLongAttribute, getObjectAttribute, getSchemaAttribute, getSimpleArrayAttribute, getSimpleArrayAttribute, getSimpleArrayAttributeSet, getSimpleArrayAttributeSet, getStringAttribute, getStringAttribute, isEmpty, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeList, setDateTimeAttribute, setDateTimeAttribute, setDateTimeAttribute, setDateTimeAttribute, setStringAttributeList, setStringAttributeList, toPrettyString, toStringMethods inherited from class com.fasterxml.jackson.databind.node.ObjectNode
_at, _childrenEqual, _contentsToSerialize, _put, _withArray, _withArrayAddTailProperty, _withObject, _withObjectAddTailProperty, asToken, deepCopy, elements, equals, fieldNames, fields, findParent, findParents, findValue, findValues, findValuesAsText, forEachEntry, get, get, getNodeType, hashCode, isEmpty, isObject, optional, path, path, properties, propertyStream, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, putArray, putIfAbsent, putNull, putObject, putPOJO, putRawValue, remove, remove, removeAll, removeIf, replace, required, retain, retain, serialize, serializeFilteredContents, serializeWithType, set, setAll, setAll, size, values, valueStream, with, withArray, withArrayProperty, withObject, withObjectProperty, without, withoutMethods 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, removeNulls, textNodeMethods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode
_bigIntFromBigDec, _jsonPointerIfValid, _reportWrongNodeOperation, _reportWrongNodeType, _withXxxMayReplace, _withXxxVerifyReplace, findPath, numberType, required, traverse, traverse, withArray, withObjectMethods inherited from class com.fasterxml.jackson.databind.JsonNode
_reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asOptional, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToExactIntegral, 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, optional, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue, withArray, withArray, withObject, withObjectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface de.captaingoldfish.scim.sdk.common.resources.base.ScimNode
getAttributeDescription, getAttributeName, getCanonicalValues, getMutability, getReferenceTypes, getReturned, getScimNodeName, getUniqueness, getValueType, isCaseExact, isMultiValued, isRequired
-
Field Details
-
SCHEMAS_ATTRIBUTE
the attribute definition for the schemas-attribute that is part of each schema
-
-
Constructor Details
-
Schema
-
Schema
public Schema(com.fasterxml.jackson.databind.JsonNode jsonNode) -
Schema
public Schema()
-
-
Method Details
-
getNonNullId
used explicitly for schema validation for easier code reading -
getName
The schema's human-readable name. When applicable, service providers MUST specify the name, e.g., "User" or "Group". OPTIONAL. -
getDescription
The schema's human-readable description. When applicable, service providers MUST specify the description. OPTIONAL. -
getAttributes
gets the schema attributes of this schema -
addAttribute
public void addAttribute(com.fasterxml.jackson.databind.JsonNode schemaAttribute) adds a new attribute definition to this schema -
getAttributeNames
the names of the attributes of this schema inclusive the subattribute names. Subattributes will be displayed in their scimNodeName notation separated with a dot e.g. "name.givenName"- Returns:
- a set of attributes that belongs to this schema
-
removeAttribute
removes an attribute definition from this schema -
getSchemaAttribute
gets aSchemaAttributedefinition by its scimNodeName e.g. "userName" or "name.givenName".
This method is for resolving filter expressions and therefore thescimNodeNamevalues are evaluated as case-insensitive. It is also allowed to use the complete schema-uri as prefix before the attributes name
Attribute names and attribute operators used in filters are case insensitive. For example, the following two expressions will evaluate to the same logical value: filter=userName Eq "john" filter=Username eq "john" -
addSchemaAttribute
allows the childSchemaAttributes to add themselves to this schema into theattributeRegister -
getAttributeRegister
this register shall be a simple reference map that is used for scim filter expressions to find the attributes fast without iterating again and again of the attributes list.
All attributes will be added with the value output of the methodSchemaAttribute.getScimNodeName()in lowercase -
getComplexRegister
a reference map that contains all non-multivalued complex attributes of this schema -
getMultivaluedComplexRegister
a reference map that contains all multivalued complex attributes of this schema -
getComplexBulkIdCandidates
this list will hold references to all schema attributes that might be used to set bulkId references in a bulk request. The condition to get added into this list for an attribute is: be of typeType.COMPLEX, mutability of other thanMutability.READ_ONLYand define the following three attributes:AttributeNames.RFC7643.VALUE,AttributeNames.RFC7643.TYPEandAttributeNames.RFC7643.REFas a resource-reference -
getReadOnlyAttributeRegister
a reference map that contains all readOnly attributes -
getImmutableAttributeRegister
a reference map that contains all immutable attributes -
getSimpleBulkIdCandidates
this list will hold references to all schema attributes that define itself as type 'reference' with 'referenceType=resource'. Such reference fields will then also be usable for bulkId-resolving and such fields must possess an additional attribute 'resourceType=${resourceName}' (name of the resourceType not resource) in order to make the resource accessible by the bulk endpoint.
The condition to get added into this list for an attribute is: be of type other thanType.COMPLEX, mutability of other thanMutability.READ_ONLYand by of typeType.REFERENCEand of referenceTypeReferenceTypes.RESOURCEand define the custom-attributeAttributeNames.Custom.RESOURCE_TYPE_REFERENCE_NAME{ "name": "userId", "type": "reference", "referenceTypes": [ "resource" ] "resourceType": "User" }
-