/** * Sets a SCIM extension to the given value based on the annotations * of the class provided. The value will be set for an extension named * based on the annotations of the class supplied. * * @param extension The value to set. This also is used to determine what * the extension's urn is. * @param <T> the type of object. */ @JsonIgnore public <T> void setExtension(final T extension) { String schemaUrn = getSchemaUrnOrThrowException(extension.getClass()); extensionObjectNode.set(schemaUrn, JsonUtils.valueToNode(extension)); schemaUrns.add(schemaUrn); }
/** * Sets a SCIM extension to the given value based on the annotations * of the class provided. The value will be set for an extension named * based on the annotations of the class supplied. * * @param extension The value to set. This also is used to determine what * the extension's urn is. * @param <T> the type of object. */ @JsonIgnore public <T> void setExtension(final T extension) { String schemaUrn = getSchemaUrnOrThrowException(extension.getClass()); extensionObjectNode.set(schemaUrn, JsonUtils.valueToNode(extension)); schemaUrns.add(schemaUrn); }
/** * Removes a SCIM extension. The extension urn is based on the annotations * of the class provided. * * @param clazz the class used to determine the schema urn. * @param <T> the type of the class object. * * @return true if the extension was removed, or false if the extension * was not present. */ public <T> boolean removeExtension(final Class<T> clazz) { String schemaUrn = getSchemaUrnOrThrowException(clazz); if(extensionObjectNode.remove(schemaUrn) == null) { return false; } else { schemaUrns.remove(schemaUrn); return true; } }
/** * Removes a SCIM extension. The extension urn is based on the annotations * of the class provided. * * @param clazz the class used to determine the schema urn. * @param <T> the type of the class object. * * @return true if the extension was removed, or false if the extension * was not present. */ public <T> boolean removeExtension(final Class<T> clazz) { String schemaUrn = getSchemaUrnOrThrowException(clazz); if(extensionObjectNode.remove(schemaUrn) == null) { return false; } else { schemaUrns.remove(schemaUrn); return true; } }
extensionObjectNode.path(getSchemaUrnOrThrowException(clazz)); if(extensionNode.isMissingNode())
extensionObjectNode.path(getSchemaUrnOrThrowException(clazz)); if(extensionNode.isMissingNode())