final Path path, final Date value) throws ScimException return replaceValue(path, GenericScimResource.getDateJsonNode(value));
final Path path, final Date value) throws ScimException return replaceValue(path, GenericScimResource.getDateJsonNode(value));
/** * Create a new replace patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * @param value The value(s) to replace. The value(s) must not be {@code null}. * * @return The new replace patch operation. * @throws ScimException if an error occurs. */ public static PatchOperation replace( final Path path, final Date value) throws ScimException { String valueString = GenericScimResource.getDateJsonNode(value).textValue(); return replace(path, valueString); }
/** * Create a new replace patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * @param value The value(s) to replace. The value(s) must not be {@code null}. * * @return The new replace patch operation. * @throws ScimException if an error occurs. */ public static PatchOperation replace( final Path path, final Date value) throws ScimException { String valueString = GenericScimResource.getDateJsonNode(value).textValue(); return replace(path, valueString); }
/** * Create a new replace patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * Path string examples: * "{@code userName eq 'bjensen'}" * "{@code userName}" * @param value The value(s) to replace. The value(s) must not be {@code null}. * * @return The new replace patch operation. * @throws ScimException If the path is invalid. */ public static PatchOperation replace( final String path, final Date value) throws ScimException { String valueString = GenericScimResource.getDateJsonNode(value).textValue(); return replace(path, valueString); }
/** * Create a new replace patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * Path string examples: * "{@code userName eq 'bjensen'}" * "{@code userName}" * @param value The value(s) to replace. The value(s) must not be {@code null}. * * @return The new replace patch operation. * @throws ScimException If the path is invalid. */ public static PatchOperation replace( final String path, final Date value) throws ScimException { String valueString = GenericScimResource.getDateJsonNode(value).textValue(); return replace(path, valueString); }
/** * Create a new add patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * @param values The values to add. * * @return The new add patch operation. * @throws ScimException if an error occurs. */ public static PatchOperation addDateValues( final Path path, final List<Date> values) throws ScimException { ArrayNode arrayNode = JsonUtils.getJsonNodeFactory().arrayNode(); for(Date value : values) { arrayNode.add(GenericScimResource.getDateJsonNode(value).textValue()); } return add(path, arrayNode); }
/** * Create a new add patch operation. * * @param path The path targeted by this patch operation. The path * must not be {@code null}. * @param values The values to add. * * @return The new add patch operation. * @throws ScimException if an error occurs. */ public static PatchOperation addDateValues( final Path path, final List<Date> values) throws ScimException { ArrayNode arrayNode = JsonUtils.getJsonNodeFactory().arrayNode(); for(Date value : values) { arrayNode.add(GenericScimResource.getDateJsonNode(value).textValue()); } return add(path, arrayNode); }
for (Date value : values) valuesArrayNode.add(GenericScimResource.getDateJsonNode(value));
for (Date value : values) valuesArrayNode.add(GenericScimResource.getDateJsonNode(value));
Assert.assertEquals(patchOp.getOpType(), PatchOpType.REPLACE); Assert.assertEquals(patchOp.getValue(String.class), GenericScimResource.getDateJsonNode(d5).textValue()); Assert.assertEquals(patchOp.getPath(), Path.fromString("path1")); Assert.assertEquals(patchOp.getOpType(), PatchOpType.REPLACE); Assert.assertEquals(patchOp.getValue(String.class), GenericScimResource.getDateJsonNode(d6).textValue()); Assert.assertEquals(patchOp.getPath(), Path.fromString("path1"));