com.unboundid.ldap.sdk
Class ReadOnlyEntry

java.lang.Object
  extended by com.unboundid.ldap.sdk.Entry
      extended by com.unboundid.ldap.sdk.ReadOnlyEntry
All Implemented Interfaces:
LDIFRecord, java.io.Serializable
Direct Known Subclasses:
RootDSE, SearchResultEntry

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:
Serialized Form

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class com.unboundid.ldap.sdk.Entry
addAttribute, applyModifications, applyModifications, 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 be null.
attributes - The set of attributes for this entry. It must not be null.

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 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.

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 be null.
attributes - The set of attributes for this entry. It must not be null.

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 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.

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 be null.
attributes - The set of attributes for this entry. It must not be null.

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 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.

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 be null.
attributes - The set of attributes for this entry. It must not be null.

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 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.

ReadOnlyEntry

public ReadOnlyEntry(Entry entry)
Creates a new read-only entry from the provided Entry.

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 be null 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 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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setDN in class Entry
Parameters:
dn - The DN for this entry. It must not be null.
Throws:
java.lang.UnsupportedOperationException - To indicate that this is a read-only entry.

setDN

public void setDN(DN dn)
           throws java.lang.UnsupportedOperationException
Throws an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setDN in class Entry
Parameters:
dn - The DN for this entry. It must not be null.
Throws:
java.lang.UnsupportedOperationException - To indicate that this is a read-only entry.

addAttribute

public boolean addAttribute(Attribute attribute)
                     throws java.lang.UnsupportedOperationException
Throws an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
addAttribute in class Entry
Parameters:
attribute - The attribute to be added. It must not be null.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
addAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
addAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
addAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
addAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
removeAttribute in class Entry
Parameters:
attributeName - The name of the attribute to remove. It must not be null.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
removeAttributeValue in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
removeAttributeValue in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
removeAttributeValues in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
removeAttributeValues in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setAttribute in class Entry
Parameters:
attribute - The attribute to be included in this entry. It must not be null.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setAttribute in class Entry
Parameters:
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.
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 an UnsupportedOperationException to indicate that this is a read-only entry.

Overrides:
setAttribute in class Entry
Parameters:
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.
Throws:
java.lang.UnsupportedOperationException - To indicate that this is a read-only entry.