com.unboundid.directory.sdk.common.types
Interface UpdatableEntry

All Superinterfaces:
Entry

@NotExtensible
@ThreadSafety(level=INTERFACE_NOT_THREADSAFE)
public interface UpdatableEntry
extends Entry

This interface defines a set of methods which may be used to update the contents of an entry.


Method Summary
 void addAttribute(com.unboundid.ldap.sdk.Attribute attribute)
          Adds the provided attribute to the entry.
 void removeAttribute(AttributeType type)
          Removes all occurrences of the specified attribute from the entry.
 void removeAttribute(AttributeType type, java.util.Set<java.lang.String> options)
          Removes the attribute with the specified name and exact set of options from the entry.
 void removeAttribute(java.lang.String name)
          Removes all occurrences of the attribute with the specified name from the entry.
 void removeAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
          Removes the attribute with the specified name and exact set of options from the entry.
 void setAttribute(com.unboundid.ldap.sdk.Attribute attribute)
          Replaces the specified attribute in the entry, or adds the attribute if it does not exist.
 void setDN(com.unboundid.ldap.sdk.DN dn)
          Specifies the DN for the entry.
 void setDN(java.lang.String dn)
          Specifies the DN for the entry.
 
Methods inherited from interface com.unboundid.directory.sdk.common.types.Entry
getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getDN, getParsedDN, hasAttribute, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, matchesBaseAndScope, matchesFilter, matchesFilter, toLDAPSDKEntry
 

Method Detail

setDN

void setDN(java.lang.String dn)
           throws com.unboundid.ldap.sdk.LDAPException
Specifies the DN for the entry.

Parameters:
dn - The DN for the entry. It must not be null.
Throws:
com.unboundid.ldap.sdk.LDAPException - If the provided DN is not valid.

setDN

void setDN(com.unboundid.ldap.sdk.DN dn)
           throws com.unboundid.ldap.sdk.LDAPException
Specifies the DN for the entry.

Parameters:
dn - The DN for the entry. It must not be null.
Throws:
com.unboundid.ldap.sdk.LDAPException - If the provided DN is not valid.

setAttribute

void setAttribute(com.unboundid.ldap.sdk.Attribute attribute)
Replaces the specified attribute in the entry, or adds the attribute if it does not exist.

Parameters:
attribute - The attribute to be stored in the entry. It must not be null.

addAttribute

void addAttribute(com.unboundid.ldap.sdk.Attribute attribute)
Adds the provided attribute to the entry. If an attribute already exists with the same name and set of options, then the values will be merged.

Parameters:
attribute - The attribute to be added. It must not be null.

removeAttribute

void removeAttribute(AttributeType type)
Removes all occurrences of the specified attribute from the entry.

Parameters:
type - The attribute type for the attribute to remove from the entry. It must not be null.

removeAttribute

void removeAttribute(java.lang.String name)
Removes all occurrences of the attribute with the specified name from the entry.

Parameters:
name - The name or OID of the attribute to remove from the entry. It must not be null.

removeAttribute

void removeAttribute(AttributeType type,
                     java.util.Set<java.lang.String> options)
Removes the attribute with the specified name and exact set of options from the entry.

Parameters:
type - The attribute type for the attribute to remove from the entry. It must not be null.
options - The set of attribute options for the attribute to remove from the entry. It may be null or empty if there are no options.

removeAttribute

void removeAttribute(java.lang.String name,
                     java.util.Set<java.lang.String> options)
Removes the attribute with the specified name and exact set of options from the entry.

Parameters:
name - The name or OID of the attribute to remove from the entry. It must not be null.
options - The set of attribute options for the attribute to remove from the entry. It may be null or empty if there are no options.