Package com.unboundid.ldap.sdk
Class ReadOnlyEntry
java.lang.Object
com.unboundid.ldap.sdk.Entry
com.unboundid.ldap.sdk.ReadOnlyEntry
- All Implemented Interfaces:
LDIFRecord,Serializable
- Direct Known Subclasses:
AlarmEntry,AlertEntry,ChangeLogEntry,DraftChuLDAPLogSchema00Entry,EffectiveRightsEntry,JoinedEntry,RootDSE,SearchResultEntry,SoftDeletedEntry
@NotExtensible
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public class ReadOnlyEntry
extends Entry
This class defines an
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.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyEntry(DN dn, 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, Collection<Attribute> attributes) Creates a new read-only entry with the provided DN and set of attributes.ReadOnlyEntry(DN dn, 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 providedEntry.ReadOnlyEntry(Schema schema, String... ldifLines) Creates a new read-only entry from the provided LDIF representation.ReadOnlyEntry(String... ldifLines) Creates a new read-only entry from the provided LDIF representation.ReadOnlyEntry(String dn, Attribute... attributes) Creates a new read-only entry with the provided DN and set of attributes.ReadOnlyEntry(String dn, Schema schema, Attribute... attributes) Creates a new read-only entry with the provided DN and set of attributes.ReadOnlyEntry(String dn, Schema schema, Collection<Attribute> attributes) Creates a new read-only entry with the provided DN and set of attributes.ReadOnlyEntry(String dn, Collection<Attribute> attributes) Creates a new read-only entry with the provided DN and set of attributes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAttribute(Attribute attribute) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanaddAttribute(String attributeName, byte[] attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanaddAttribute(String attributeName, byte[]... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanaddAttribute(String attributeName, String attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanaddAttribute(String attributeName, String... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanremoveAttribute(String attributeName) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanremoveAttributeValue(String attributeName, byte[] attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanremoveAttributeValue(String attributeName, String attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanremoveAttributeValues(String attributeName, byte[]... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.booleanremoveAttributeValues(String attributeName, String... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidsetAttribute(Attribute attribute) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidsetAttribute(String attributeName, byte[] attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidsetAttribute(String attributeName, byte[]... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidsetAttribute(String attributeName, String attributeValue) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidsetAttribute(String attributeName, String... attributeValues) Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidThrows anUnsupportedOperationExceptionto indicate that this is a read-only entry.voidThrows anUnsupportedOperationExceptionto indicate that this is a read-only entry.Methods inherited from class com.unboundid.ldap.sdk.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
-
Constructor Details
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
public ReadOnlyEntry(@NotNull String dn, @Nullable Schema schema, @NotNull Collection<Attribute> attributes) Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
public ReadOnlyEntry(@NotNull DN dn, @Nullable Schema schema, @NotNull Collection<Attribute> attributes) Creates a new read-only entry with the provided DN and set of attributes.- Parameters:
dn- The DN for this entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes for this entry. It must not benull.
-
ReadOnlyEntry
Creates a new read-only entry from the providedEntry.- Parameters:
entry- The entry to use to create this read-only entry.
-
ReadOnlyEntry
Creates a new read-only entry from the provided LDIF representation.- Parameters:
ldifLines- The set of lines that comprise an LDIF representation of the entry. It must not benullor empty.- Throws:
LDIFException- If the provided lines cannot be decoded as an entry in LDIF format.
-
ReadOnlyEntry
Creates a new read-only entry from the provided LDIF representation.- Parameters:
schema- The schema to use for operations involving this entry. It may benullif no schema is available.ldifLines- The set of lines that comprise an LDIF representation of the entry. It must not benullor empty.- Throws:
LDIFException- If the provided lines cannot be decoded as an entry in LDIF format.
-
-
Method Details
-
setDN
Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setDNin classEntry- Parameters:
dn- The DN for this entry. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setDN
Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setDNin classEntry- Parameters:
dn- The DN for this entry. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
addAttribute
Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
addAttributein classEntry- Parameters:
attribute- The attribute to be added. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(@NotNull String attributeName, @NotNull String attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
addAttributein classEntry- Parameters:
attributeName- The name for the attribute to be added. It must not benull.attributeValue- The value for the attribute to be added. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(@NotNull String attributeName, @NotNull byte[] attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
addAttributein classEntry- Parameters:
attributeName- The name for the attribute to be added. It must not benull.attributeValue- The value for the attribute to be added. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(@NotNull String attributeName, @NotNull String... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
addAttributein classEntry- Parameters:
attributeName- The name for the attribute to be added. It must not benull.attributeValues- The set of values for the attribute to be added. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(@NotNull String attributeName, @NotNull byte[]... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
addAttributein classEntry- Parameters:
attributeName- The name for the attribute to be added. It must not benull.attributeValues- The set of values for the attribute to be added. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
removeAttribute
Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
removeAttributein classEntry- Parameters:
attributeName- The name of the attribute to remove. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
removeAttributeValue
public boolean removeAttributeValue(@NotNull String attributeName, @NotNull String attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
removeAttributeValuein classEntry- Parameters:
attributeName- The name of the attribute to remove. It must not benull.attributeValue- The value of the attribute to remove. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
removeAttributeValue
public boolean removeAttributeValue(@NotNull String attributeName, @NotNull byte[] attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
removeAttributeValuein classEntry- Parameters:
attributeName- The name of the attribute to remove. It must not benull.attributeValue- The value of the attribute to remove. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
removeAttributeValues
public boolean removeAttributeValues(@NotNull String attributeName, @NotNull String... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
removeAttributeValuesin classEntry- Parameters:
attributeName- The name of the attribute to remove. It must not benull.attributeValues- The values of the attribute to remove. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
removeAttributeValues
public boolean removeAttributeValues(@NotNull String attributeName, @NotNull byte[]... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
removeAttributeValuesin classEntry- Parameters:
attributeName- The name of the attribute to remove. It must not benull.attributeValues- The values of the attribute to remove. It must not benull.- Returns:
- This method will never return successfully.
- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setAttribute
Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setAttributein classEntry- Parameters:
attribute- The attribute to be included in this entry. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(@NotNull String attributeName, @NotNull String attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setAttributein classEntry- Parameters:
attributeName- The name to use for the attribute. It must not benull.attributeValue- The value to use for the attribute. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(@NotNull String attributeName, @NotNull byte[] attributeValue) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setAttributein classEntry- Parameters:
attributeName- The name to use for the attribute. It must not benull.attributeValue- The value to use for the attribute. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(@NotNull String attributeName, @NotNull String... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setAttributein classEntry- Parameters:
attributeName- The name to use for the attribute. It must not benull.attributeValues- The set of values to use for the attribute. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(@NotNull String attributeName, @NotNull byte[]... attributeValues) throws UnsupportedOperationException Throws anUnsupportedOperationExceptionto indicate that this is a read-only entry.- Overrides:
setAttributein classEntry- Parameters:
attributeName- The name to use for the attribute. It must not benull.attributeValues- The set of values to use for the attribute. It must not benull.- Throws:
UnsupportedOperationException- To indicate that this is a read-only entry.
-