|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.Modification
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class Modification
This class provides a data structure for holding information about an LDAP modification, which describes a change to apply to an attribute. A modification includes the following elements:
Constructor Summary | |
---|---|
Modification(ModificationType modificationType,
java.lang.String attributeName)
Creates a new LDAP modification with the provided modification type and attribute name. |
|
Modification(ModificationType modificationType,
java.lang.String attributeName,
ASN1OctetString[] attributeValues)
Creates a new LDAP modification with the provided information. |
|
Modification(ModificationType modificationType,
java.lang.String attributeName,
byte[]... attributeValues)
Creates a new LDAP modification with the provided information. |
|
Modification(ModificationType modificationType,
java.lang.String attributeName,
byte[] attributeValue)
Creates a new LDAP modification with the provided information. |
|
Modification(ModificationType modificationType,
java.lang.String attributeName,
java.lang.String... attributeValues)
Creates a new LDAP modification with the provided information. |
|
Modification(ModificationType modificationType,
java.lang.String attributeName,
java.lang.String attributeValue)
Creates a new LDAP modification with the provided information. |
Method Summary | |
---|---|
static Modification |
decode(ASN1Sequence modificationSequence)
Decodes the provided ASN.1 sequence as an LDAP modification. |
ASN1Sequence |
encode()
Encodes this modification to an ASN.1 sequence suitable for use in the LDAP protocol. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this LDAP modification. |
Attribute |
getAttribute()
Retrieves the attribute for this modification. |
java.lang.String |
getAttributeName()
Retrieves the name of the attribute to target with this modification. |
ModificationType |
getModificationType()
Retrieves the modification type for this modification. |
ASN1OctetString[] |
getRawValues()
Retrieves the set of values for this modification as an array of ASN.1 octet strings. |
byte[][] |
getValueByteArrays()
Retrieves the set of values for this modification as an array of byte arrays. |
java.lang.String[] |
getValues()
Retrieves the set of values for this modification as an array of strings. |
int |
hashCode()
Calculates a hash code for this LDAP modification. |
boolean |
hasValue()
Indicates whether this modification has at least one value. |
static Modification |
readFrom(ASN1StreamReader reader)
Reads and decodes an LDAP modification from the provided ASN.1 stream reader. |
java.lang.String |
toString()
Retrieves a string representation of this LDAP modification. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP modification to the provided buffer. |
void |
writeTo(ASN1Buffer buffer)
Writes an ASN.1-encoded representation of this modification to the provided ASN.1 buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Modification(ModificationType modificationType, java.lang.String attributeName)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.public Modification(ModificationType modificationType, java.lang.String attributeName, java.lang.String attributeValue)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.attributeValue
- The attribute value for this modification. It
must not be null
.public Modification(ModificationType modificationType, java.lang.String attributeName, byte[] attributeValue)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.attributeValue
- The attribute value for this modification. It
must not be null
.public Modification(ModificationType modificationType, java.lang.String attributeName, java.lang.String... attributeValues)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.attributeValues
- The set of attribute value for this modification.
It must not be null
.public Modification(ModificationType modificationType, java.lang.String attributeName, byte[]... attributeValues)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.attributeValues
- The set of attribute value for this modification.
It must not be null
.public Modification(ModificationType modificationType, java.lang.String attributeName, ASN1OctetString[] attributeValues)
modificationType
- The modification type for this modification.attributeName
- The name of the attribute to target with this
modification. It must not be null
.attributeValues
- The set of attribute value for this modification.
It must not be null
.Method Detail |
---|
public ModificationType getModificationType()
public Attribute getAttribute()
public java.lang.String getAttributeName()
public boolean hasValue()
true
if this modification has one or more values, or
false
if not.public java.lang.String[] getValues()
public byte[][] getValueByteArrays()
public ASN1OctetString[] getRawValues()
public void writeTo(ASN1Buffer buffer)
buffer
- The ASN.1 buffer to which the encoded representation should
be written.public ASN1Sequence encode()
public static Modification readFrom(ASN1StreamReader reader) throws LDAPException
reader
- The ASN.1 stream reader from which to read the
modification.
LDAPException
- If a problem occurs while trying to read or decode
the modification.public static Modification decode(ASN1Sequence modificationSequence) throws LDAPException
modificationSequence
- The ASN.1 sequence to decode as an LDAP
modification. It must not be null
.
LDAPException
- If a problem occurs while trying to decode the
provided ASN.1 sequence as an LDAP modification.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object is equal to this modification,
or false
if not.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which to append the string representation of
this LDAP modification.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |