@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class ReadOnlyEntry extends Entry
Entry
subclass in which the contents of the
entry cannot be modified. Any attempt to call a method which could be used
to alter the contents of the entry will result in an
UnsupportedOperationException
.Constructor and Description |
---|
ReadOnlyEntry(DN dn,
Attribute... attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(DN dn,
java.util.Collection<Attribute> attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(DN dn,
Schema schema,
Attribute... attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(DN dn,
Schema schema,
java.util.Collection<Attribute> attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(Entry entry)
Creates a new read-only entry from the provided
Entry . |
ReadOnlyEntry(Schema schema,
java.lang.String... ldifLines)
Creates a new read-only entry from the provided LDIF representation.
|
ReadOnlyEntry(java.lang.String... ldifLines)
Creates a new read-only entry from the provided LDIF representation.
|
ReadOnlyEntry(java.lang.String dn,
Attribute... attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(java.lang.String dn,
java.util.Collection<Attribute> attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(java.lang.String dn,
Schema schema,
Attribute... attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
ReadOnlyEntry(java.lang.String dn,
Schema schema,
java.util.Collection<Attribute> attributes)
Creates a new read-only entry with the provided DN and set of attributes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAttribute(Attribute attribute)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
addAttribute(java.lang.String attributeName,
byte[]... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
addAttribute(java.lang.String attributeName,
byte[] attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
addAttribute(java.lang.String attributeName,
java.lang.String... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
addAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
removeAttribute(java.lang.String attributeName)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
removeAttributeValue(java.lang.String attributeName,
byte[] attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
removeAttributeValue(java.lang.String attributeName,
java.lang.String attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
removeAttributeValues(java.lang.String attributeName,
byte[]... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
boolean |
removeAttributeValues(java.lang.String attributeName,
java.lang.String... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setAttribute(Attribute attribute)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setAttribute(java.lang.String attributeName,
byte[]... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setAttribute(java.lang.String attributeName,
byte[] attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setAttribute(java.lang.String attributeName,
java.lang.String... attributeValues)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setDN(DN dn)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
void |
setDN(java.lang.String dn)
Throws an
UnsupportedOperationException to indicate that this is a
read-only entry. |
addAttribute, applyModifications, applyModifications, applyModifyDN, applyModifyDN, diff, diff, diff, duplicate, equals, getAttribute, getAttribute, getAttributes, getAttributesWithOptions, getAttributeValue, getAttributeValueAsBoolean, getAttributeValueAsDate, getAttributeValueAsDN, getAttributeValueAsInteger, getAttributeValueAsLong, getAttributeValueByteArrays, getAttributeValueBytes, getAttributeValues, getDN, getObjectClassAttribute, getObjectClassValues, getParentDN, getParentDNString, getParsedDN, getRDN, getSchema, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, hashCode, hasObjectClass, intersectEntries, matchesBaseAndScope, matchesBaseAndScope, mergeEntries, removeAttributeValue, removeAttributeValue, setAttribute, toLDIF, toLDIF, toLDIF, toLDIF, toLDIFString, toLDIFString, toLDIFString, toLDIFString, toString, toString
public ReadOnlyEntry(@NotNull java.lang.String dn, @NotNull Attribute... attributes)
dn
- The DN for this entry. It must not be null
.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull java.lang.String dn, @Nullable Schema schema, @NotNull Attribute... attributes)
dn
- The DN for this entry. It must not be null
.schema
- The schema to use for operations involving this entry.
It may be null
if no schema is available.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull DN dn, @NotNull Attribute... attributes)
dn
- The DN for this entry. It must not be null
.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull DN dn, @Nullable Schema schema, @NotNull Attribute... attributes)
dn
- The DN for this entry. It must not be null
.schema
- The schema to use for operations involving this entry.
It may be null
if no schema is available.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull java.lang.String dn, @NotNull java.util.Collection<Attribute> attributes)
dn
- The DN for this entry. It must not be null
.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull java.lang.String dn, @Nullable Schema schema, @NotNull java.util.Collection<Attribute> attributes)
dn
- The DN for this entry. It must not be null
.schema
- The schema to use for operations involving this entry.
It may be null
if no schema is available.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull DN dn, @NotNull java.util.Collection<Attribute> attributes)
dn
- The DN for this entry. It must not be null
.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull DN dn, @Nullable Schema schema, @NotNull java.util.Collection<Attribute> attributes)
dn
- The DN for this entry. It must not be null
.schema
- The schema to use for operations involving this entry.
It may be null
if no schema is available.attributes
- The set of attributes for this entry. It must not be
null
.public ReadOnlyEntry(@NotNull Entry entry)
Entry
.entry
- The entry to use to create this read-only entry.public ReadOnlyEntry(@NotNull java.lang.String... ldifLines) throws LDIFException
ldifLines
- The set of lines that comprise an LDIF representation
of the entry. It must not be null
or empty.LDIFException
- If the provided lines cannot be decoded as an entry
in LDIF format.public ReadOnlyEntry(@Nullable Schema schema, @NotNull java.lang.String... ldifLines) throws LDIFException
schema
- The schema to use for operations involving this entry.
It may be null
if no schema is available.ldifLines
- The set of lines that comprise an LDIF representation
of the entry. It must not be null
or empty.LDIFException
- If the provided lines cannot be decoded as an entry
in LDIF format.public void setDN(@NotNull java.lang.String dn) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.public void setDN(@NotNull DN dn) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.public boolean addAttribute(@NotNull Attribute attribute) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.addAttribute
in class Entry
attribute
- The attribute to be added. It must not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean addAttribute(@NotNull java.lang.String attributeName, @NotNull java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.addAttribute
in class Entry
attributeName
- The name for the attribute to be added. It must
not be null
.attributeValue
- The value for the attribute to be added. It must
not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean addAttribute(@NotNull java.lang.String attributeName, @NotNull byte[] attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.addAttribute
in class Entry
attributeName
- The name for the attribute to be added. It must
not be null
.attributeValue
- The value for the attribute to be added. It must
not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean addAttribute(@NotNull java.lang.String attributeName, @NotNull java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.addAttribute
in class Entry
attributeName
- The name for the attribute to be added. It must
not be null
.attributeValues
- The set of values for the attribute to be added.
It must not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean addAttribute(@NotNull java.lang.String attributeName, @NotNull byte[]... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.addAttribute
in class Entry
attributeName
- The name for the attribute to be added. It must
not be null
.attributeValues
- The set of values for the attribute to be added.
It must not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean removeAttribute(@NotNull java.lang.String attributeName) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.removeAttribute
in class Entry
attributeName
- The name of the attribute to remove. It must not be
null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean removeAttributeValue(@NotNull java.lang.String attributeName, @NotNull java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.removeAttributeValue
in class Entry
attributeName
- The name of the attribute to remove. It must not
be null
.attributeValue
- The value of the attribute to remove. It must not
be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean removeAttributeValue(@NotNull java.lang.String attributeName, @NotNull byte[] attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.removeAttributeValue
in class Entry
attributeName
- The name of the attribute to remove. It must not
be null
.attributeValue
- The value of the attribute to remove. It must not
be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean removeAttributeValues(@NotNull java.lang.String attributeName, @NotNull java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.removeAttributeValues
in class Entry
attributeName
- The name of the attribute to remove. It must not
be null
.attributeValues
- The values of the attribute to remove. It must
not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public boolean removeAttributeValues(@NotNull java.lang.String attributeName, @NotNull byte[]... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.removeAttributeValues
in class Entry
attributeName
- The name of the attribute to remove. It must not
be null
.attributeValues
- The values of the attribute to remove. It must
not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public void setAttribute(@NotNull Attribute attribute) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.setAttribute
in class Entry
attribute
- The attribute to be included in this entry. It must not
be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public void setAttribute(@NotNull java.lang.String attributeName, @NotNull java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.setAttribute
in class Entry
attributeName
- The name to use for the attribute. It must not be
null
.attributeValue
- The value to use for the attribute. It must not be
null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public void setAttribute(@NotNull java.lang.String attributeName, @NotNull byte[] attributeValue) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.setAttribute
in class Entry
attributeName
- The name to use for the attribute. It must not be
null
.attributeValue
- The value to use for the attribute. It must not be
null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public void setAttribute(@NotNull java.lang.String attributeName, @NotNull java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.setAttribute
in class Entry
attributeName
- The name to use for the attribute. It must not be
null
.attributeValues
- The set of values to use for the attribute. It
must not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.public void setAttribute(@NotNull java.lang.String attributeName, @NotNull byte[]... attributeValues) throws java.lang.UnsupportedOperationException
UnsupportedOperationException
to indicate that this is a
read-only entry.setAttribute
in class Entry
attributeName
- The name to use for the attribute. It must not be
null
.attributeValues
- The set of values to use for the attribute. It
must not be null
.java.lang.UnsupportedOperationException
- To indicate that this is a
read-only entry.