Package com.unboundid.ldap.sdk
Class ReadOnlyEntry
- java.lang.Object
-
- com.unboundid.ldap.sdk.Entry
-
- com.unboundid.ldap.sdk.ReadOnlyEntry
-
- All Implemented Interfaces:
LDIFRecord
,java.io.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 anEntry
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 anUnsupportedOperationException
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyEntry(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, java.util.Collection<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(Entry entry)
Creates a new read-only entry from the providedEntry
.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, 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.ReadOnlyEntry(java.lang.String dn, java.util.Collection<Attribute> attributes)
Creates a new read-only entry with the provided DN and set of attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAttribute(Attribute attribute)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
addAttribute(java.lang.String attributeName, byte[] attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
addAttribute(java.lang.String attributeName, byte[]... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
addAttribute(java.lang.String attributeName, java.lang.String... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
removeAttribute(java.lang.String attributeName)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
removeAttributeValue(java.lang.String attributeName, byte[] attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
removeAttributeValue(java.lang.String attributeName, java.lang.String attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
removeAttributeValues(java.lang.String attributeName, byte[]... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.boolean
removeAttributeValues(java.lang.String attributeName, java.lang.String... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setAttribute(Attribute attribute)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setAttribute(java.lang.String attributeName, byte[] attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setAttribute(java.lang.String attributeName, byte[]... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setAttribute(java.lang.String attributeName, java.lang.String... attributeValues)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setDN(DN dn)
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.void
setDN(java.lang.String dn)
Throws anUnsupportedOperationException
to 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 Detail
-
ReadOnlyEntry
public ReadOnlyEntry(java.lang.String dn, 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
.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(java.lang.String dn, Schema schema, 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 benull
if no schema is available.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(DN dn, 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
.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(DN dn, Schema schema, 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 benull
if no schema is available.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(java.lang.String dn, java.util.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
.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public 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.- Parameters:
dn
- The DN for this entry. It must not benull
.schema
- The schema to use for operations involving this entry. It may benull
if no schema is available.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(DN dn, java.util.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
.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(DN dn, Schema schema, java.util.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 benull
if no schema is available.attributes
- The set of attributes for this entry. It must not benull
.
-
ReadOnlyEntry
public ReadOnlyEntry(Entry entry)
Creates a new read-only entry from the providedEntry
.- Parameters:
entry
- The entry to use to create this read-only entry.
-
ReadOnlyEntry
public ReadOnlyEntry(java.lang.String... ldifLines) throws LDIFException
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 benull
or empty.- Throws:
LDIFException
- If the provided lines cannot be decoded as an entry in LDIF format.
-
ReadOnlyEntry
public ReadOnlyEntry(Schema schema, java.lang.String... ldifLines) throws LDIFException
Creates a new read-only entry from the provided LDIF representation.- Parameters:
schema
- The schema to use for operations involving this entry. It may benull
if no schema is available.ldifLines
- The set of lines that comprise an LDIF representation of the entry. It must not benull
or empty.- Throws:
LDIFException
- If the provided lines cannot be decoded as an entry in LDIF format.
-
-
Method Detail
-
setDN
public void setDN(java.lang.String dn) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.
-
setDN
public void setDN(DN dn) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(Attribute attribute) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
addAttribute
in classEntry
- Parameters:
attribute
- The attribute to be added. It must not benull
.- Returns:
- This method will never return successfully.
- Throws:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
addAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(java.lang.String attributeName, byte[] attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
addAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(java.lang.String attributeName, java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
addAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
addAttribute
public boolean addAttribute(java.lang.String attributeName, byte[]... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
addAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
removeAttribute
public boolean removeAttribute(java.lang.String attributeName) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
removeAttribute
in classEntry
- Parameters:
attributeName
- The name of the attribute to remove. It must not benull
.- Returns:
- This method will never return successfully.
- Throws:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
removeAttributeValue
public boolean removeAttributeValue(java.lang.String attributeName, java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
removeAttributeValue
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
removeAttributeValue
public boolean removeAttributeValue(java.lang.String attributeName, byte[] attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
removeAttributeValue
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
removeAttributeValues
public boolean removeAttributeValues(java.lang.String attributeName, java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
removeAttributeValues
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
removeAttributeValues
public boolean removeAttributeValues(java.lang.String attributeName, byte[]... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
removeAttributeValues
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(Attribute attribute) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
setAttribute
in classEntry
- Parameters:
attribute
- The attribute to be included in this entry. It must not benull
.- Throws:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
setAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(java.lang.String attributeName, byte[] attributeValue) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
setAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(java.lang.String attributeName, java.lang.String... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
setAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
setAttribute
public void setAttribute(java.lang.String attributeName, byte[]... attributeValues) throws java.lang.UnsupportedOperationException
Throws anUnsupportedOperationException
to indicate that this is a read-only entry.- Overrides:
setAttribute
in 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:
java.lang.UnsupportedOperationException
- To indicate that this is a read-only entry.
-
-