public final class Modification extends Object
Constructor and Description |
---|
Modification(ModificationType modificationType,
Attribute attribute)
Creates a new modification having the provided modification type and
attribute values to be updated.
|
Modifier and Type | Method and Description |
---|---|
static Modification |
add(String attributeDescription,
Object... values)
Returns a new modification for adding an attribute with the provided description and values.
|
static Modification |
delete(String attributeDescription,
Object... values)
Returns a new DELETE modification.
|
boolean |
equals(Object obj) |
Attribute |
getAttribute()
Returns the attribute containing the values to be modified.
|
ModificationType |
getModificationType()
Returns the type of modification to be performed.
|
int |
hashCode() |
static Modification |
replace(String attributeDescription,
Object... values)
Returns a new modification for replacing all the values of the provided attribute with the provided values.
|
String |
toString() |
Modification |
withValues(Object... values)
Adds values to this modification's attribute.
|
public Modification(ModificationType modificationType, Attribute attribute)
Modification
is immutable, the underlying attribute may not be.
The following code ensures that the returned Modification
is
fully immutable:
Modification change = new Modification(modificationType, Attributes .unmodifiableAttribute(attribute));
modificationType
- The type of modification to be performed.attribute
- The the attribute containing the values to be modified.public static Modification add(String attributeDescription, Object... values)
attributeDescription
- The description of the attribute to be added.values
- The values of the attribute to be added.public static Modification delete(String attributeDescription, Object... values)
attributeDescription
- The description of the attribute targeted by the modification.values
- An optional list of attribute values, if specified, the returned modification will be intended to delete
these values only.public static Modification replace(String attributeDescription, Object... values)
attributeDescription
- The description of the attribute whose values should be replaced.values
- The new values for the attribute.public Modification withValues(Object... values)
values
- The values to be added to this modification's attribute.public Attribute getAttribute()
public ModificationType getModificationType()
Copyright © 2010-2018, ForgeRock All Rights Reserved.