/** * {@inheritDoc} */ public GenericScimResource asGenericScimResource() { ObjectNode object = JsonUtils.valueToNode(this); return new GenericScimResource(object); }
/** * {@inheritDoc} */ public GenericScimResource asGenericScimResource() { ObjectNode object = JsonUtils.valueToNode(this); return new GenericScimResource(object); }
/** * {@inheritDoc} */ @Override public void setExternalId(final String externalId) { try { JsonUtils.replaceValue(EXTERNAL_ID, objectNode, JsonUtils.valueToNode(externalId)); } catch (ScimException e) { // This should never happen. throw new RuntimeException(e); } }
/** * {@inheritDoc} */ public void setSchemaUrns(final Collection<String> schemaUrns) { try { JsonUtils.replaceValue(SCHEMAS, objectNode, JsonUtils.valueToNode(schemaUrns)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * {@inheritDoc} */ @Override public void setMeta(final Meta meta) { try { JsonUtils.replaceValue(META, objectNode, JsonUtils.valueToNode(meta)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * {@inheritDoc} */ @Override public void setId(final String id) { try { JsonUtils.replaceValue(ID, objectNode, JsonUtils.valueToNode(id)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * {@inheritDoc} */ @Override public void setMeta(final Meta meta) { try { JsonUtils.replaceValue(META, objectNode, JsonUtils.valueToNode(meta)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * 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); }
/** * {@inheritDoc} */ @Override public void setId(final String id) { try { JsonUtils.replaceValue(ID, objectNode, JsonUtils.valueToNode(id)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * {@inheritDoc} */ public void setSchemaUrns(final Collection<String> schemaUrns) { try { JsonUtils.replaceValue(SCHEMAS, objectNode, JsonUtils.valueToNode(schemaUrns)); } catch (Exception e) { // This should never happen. throw new RuntimeException(e); } }
/** * Add values to the multi-valued attribute specified by the path. * * @param path The path to the multi-valued attribute. * @param objects The values to add. * * @return This patch operation request. */ public T addValues(final Path path, final Object... objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.add(path, newObjectNode)); }
/** * Add values to the multi-valued attribute specified by the path. * * @param path The path to the multi-valued attribute. * @param objects The values to add. * * @return This patch operation request. */ public T addValues(final Path path, final Collection<?> objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.add(path, newObjectNode)); }
/** * Set value of the attribute specified by the path, replacing any existing * value(s). * * @param path The path to the attribute whose value to set. * @param object The value to set. * * @return This patch operation request. */ public T replaceValue(final Path path, final Object object) { JsonNode newObjectNode = JsonUtils.valueToNode(object); return addOperation(PatchOperation.replace(path, newObjectNode)); }
/** * Set values of the attribute specified by the path, replacing any existing * values. * * @param path The path to the attribute whose value to set. * @param objects The value(s) to set. * * @return This patch operation request. */ public T replaceValues(final Path path, final Collection<Object> objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.replace(path, newObjectNode)); }
/** * Add values to the multi-valued attribute specified by the path. * * @param path The path to the multi-valued attribute. * @param objects The values to add. * * @return This patch operation request. */ public T addValues(final Path path, final Collection<?> objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.add(path, newObjectNode)); }
/** * Add values to the multi-valued attribute specified by the path. * * @param path The path to the multi-valued attribute. * @param objects The values to add. * * @return This patch operation request. */ public T addValues(final Path path, final Object... objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.add(path, newObjectNode)); }
/** * Set values of the attribute specified by the path, replacing any existing * values. * * @param path The path to the attribute whose value to set. * @param objects The value(s) to set. * * @return This patch operation request. */ public T replaceValues(final Path path, final Collection<Object> objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.replace(path, newObjectNode)); }
/** * Set values of the attribute specified by the path, replacing any existing * values. * * @param path The path to the attribute whose value to set. * @param objects The value(s) to set. * * @return This patch operation request. */ public T replaceValues(final Path path, final Object... objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.replace(path, newObjectNode)); }
/** * Set values of the attribute specified by the path, replacing any existing * values. * * @param path The path to the attribute whose value to set. * @param objects The value(s) to set. * * @return This patch operation request. */ public T replaceValues(final Path path, final Object... objects) { JsonNode newObjectNode = JsonUtils.valueToNode(objects); return addOperation(PatchOperation.replace(path, newObjectNode)); }
/** * Set value of the attribute specified by the path, replacing any existing * value(s). * * @param path The path to the attribute whose value to set. * @param object The value to set. * * @return This patch operation request. */ public T replaceValue(final Path path, final Object object) { JsonNode newObjectNode = JsonUtils.valueToNode(object); return addOperation(PatchOperation.replace(path, newObjectNode)); }