/** * Removes values of the extension attribute at the provided path. Equivalent * to using the {@link JsonUtils#removeValues(Path, ObjectNode)} method: * JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values). * * @param path The path to the attribute whose values to remove. * @return Whether one or more values where removed. * @throws ScimException If the path is invalid. */ public boolean removeExtensionValues(final String path) throws ScimException { return removeExtensionValues(Path.fromString(path)); }
/** * Removes values at the provided path. Equivalent * to using the {@link JsonUtils#removeValues(Path, ObjectNode)} method: * JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values). * * @param path The path to the attribute whose values to remove. * @return Whether one or more values where removed. * @throws ScimException If the path is invalid. */ public boolean removeValues(final String path) throws ScimException { return removeValues(Path.fromString(path)); }
/** * {@inheritDoc} */ @Override public int hashCode() { return filterAttribute.hashCode(); } }
/** * Add new values at the provided path. Equivalent to using the * {@link JsonUtils#addValue(Path, ObjectNode, JsonNode)} method: * JsonUtils.addValue(Path.fromString(path), getObjectNode(), values). * <p> * * The {@link JsonUtils#valueToNode(Object)} method may be used to convert * the given value instance to a JSON node. * <p> * * @param path The path to the attribute whose values to add. * @param values The value(s) to add. * @return This object. * @throws ScimException If the path is invalid. */ public GenericScimResource addValues(final String path, final ArrayNode values) throws ScimException { addValues(Path.fromString(path), values); return this; }
/** * Add new values for the extension attribute at the provided path. Equivalent * to using the {@link JsonUtils#addValue(Path, ObjectNode, JsonNode)} method: * JsonUtils.addValue(Path.fromString(path), getExtensionObjectNode(), * values). * * The {@link JsonUtils#valueToNode(Object)} method may be used to convert * the given value instance to a JSON node. * * @param path The path to the attribute whose values to add. * @param values The value(s) to add. * @throws ScimException If the path is invalid. */ public void addExtensionValue(final String path, final ArrayNode values) throws ScimException { addExtensionValue(Path.fromString(path), values); }
/** * Update the value of the extension attribute at the provided path. * Equivalent to using the {@link JsonUtils#replaceValue(Path, ObjectNode, * JsonNode)} method: JsonUtils.replaceValues(Path.fromString(path), * getExtensionObjectNode(), value). * * The {@link JsonUtils#valueToNode(Object)} method may be used to convert * the given value instance to a JSON node. * * @param path The path to the attribute whose value to set. * @param value The value(s) to set. * @throws ScimException If the path is invalid. */ public void replaceExtensionValue(final String path, final JsonNode value) throws ScimException { replaceExtensionValue(Path.fromString(path), value); }
/** * Retrieve all JSON nodes of the extension attribute referenced by the * provided path. Equivalent to using the * {@link JsonUtils#findMatchingPaths(Path, ObjectNode)} * method: JsonUtils.getValues(Path.fromString(path), * getExtensionObjectNode()). * * The {@link JsonUtils#nodeToValue(JsonNode, Class)} method may be used to * bind the retrieved JSON node into specific value type instances. * * @param path The path to the attribute whose value to retrieve. * * @return List of all JSON nodes referenced by the provided path. * @throws ScimException If the path is invalid. */ public List<JsonNode> getExtensionValues(final String path) throws ScimException { return getExtensionValues(Path.fromString(path)); }
/** * {@inheritDoc} */ @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + operations.hashCode(); return result; } }
/** * Constructs a new BaseScimResource object, and sets the urn if * the class extending this one is annotated. * * @param id The ID fo the object. */ public BaseScimResource(final String id) { this.id = id; addMyUrn(); }
/** * Creates a path to the root of the JSON object that represents the * SCIM resource. * * @return The path to the root of the JSON object that represents the * SCIM resource. */ public static Path root() { return new Path(null, Collections.<Element>emptyList()); }
/** * {@inheritDoc} */ @Override public String toString() { final StringBuilder builder = new StringBuilder(); toString(builder); return builder.toString(); }
/** * Gets a JsonNode that represents the supplied date. * * @param date the date to represent as a JsonNode. * @return the JsonNode representing the date. * @throws ScimException thrown if an error occurs. */ public static TextNode getDateJsonNode(final Date date) throws ScimException { return new TextNode(getStringForDate(date)); }
/** * Removes values at the provided path. Equivalent * to using the {@link JsonUtils#removeValues(Path, ObjectNode)} method: * JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values). * * @param path The path to the attribute whose values to remove. * @return Whether one or more values where removed. * @throws ScimException If the path is invalid. */ public boolean removeValues(final String path) throws ScimException { return removeValues(Path.fromString(path)); }
/** * Removes values of the extension attribute at the provided path. Equivalent * to using the {@link JsonUtils#removeValues(Path, ObjectNode)} method: * JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values). * * @param path The path to the attribute whose values to remove. * @return Whether one or more values where removed. * @throws ScimException If the path is invalid. */ public boolean removeExtensionValues(final String path) throws ScimException { return removeExtensionValues(Path.fromString(path)); }
/** * Add new values for the extension attribute at the provided path. Equivalent * to using the {@link JsonUtils#addValue(Path, ObjectNode, JsonNode)} method: * JsonUtils.addValue(Path.fromString(path), getExtensionObjectNode(), * values). * * The {@link JsonUtils#valueToNode(Object)} method may be used to convert * the given value instance to a JSON node. * * @param path The path to the attribute whose values to add. * @param values The value(s) to add. * @throws ScimException If the path is invalid. */ public void addExtensionValue(final String path, final ArrayNode values) throws ScimException { addExtensionValue(Path.fromString(path), values); }
/** * Update the value of the extension attribute at the provided path. * Equivalent to using the {@link JsonUtils#replaceValue(Path, ObjectNode, * JsonNode)} method: JsonUtils.replaceValues(Path.fromString(path), * getExtensionObjectNode(), value). * * The {@link JsonUtils#valueToNode(Object)} method may be used to convert * the given value instance to a JSON node. * * @param path The path to the attribute whose value to set. * @param value The value(s) to set. * @throws ScimException If the path is invalid. */ public void replaceExtensionValue(final String path, final JsonNode value) throws ScimException { replaceExtensionValue(Path.fromString(path), value); }
/** * Retrieve all JSON nodes of the extension attribute referenced by the * provided path. Equivalent to using the * {@link JsonUtils#findMatchingPaths(Path, ObjectNode)} * method: JsonUtils.getValues(Path.fromString(path), * getExtensionObjectNode()). * * The {@link JsonUtils#nodeToValue(JsonNode, Class)} method may be used to * bind the retrieved JSON node into specific value type instances. * * @param path The path to the attribute whose value to retrieve. * * @return List of all JSON nodes referenced by the provided path. * @throws ScimException If the path is invalid. */ public List<JsonNode> getExtensionValues(final String path) throws ScimException { return getExtensionValues(Path.fromString(path)); }
/** * {@inheritDoc} */ @Override public int hashCode() { return filterAttribute.hashCode(); } }
/** * Constructs a new BaseScimResource object, and sets the urn if * the class extending this one is annotated. * * @param id The ID fo the object. */ public BaseScimResource(final String id) { this.id = id; addMyUrn(); }