org.apache.directory.server.core.entry
Class ClonedServerEntry

java.lang.Object
  extended by org.apache.directory.server.core.entry.ClonedServerEntry
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<org.apache.directory.shared.ldap.entry.EntryAttribute>, org.apache.directory.shared.ldap.entry.Entry, org.apache.directory.shared.ldap.entry.ServerEntry

public class ClonedServerEntry
extends java.lang.Object
implements org.apache.directory.shared.ldap.entry.ServerEntry

A ServerEntry refers to the original entry before being modified by EntryFilters or operations.

Version:
$Rev$, $Date$
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
ClonedServerEntry(org.apache.directory.shared.ldap.entry.ServerEntry originalEntry)
          Creates a new instance of ClonedServerEntry.
 
Method Summary
 void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 void add(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
           
 void add(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 void add(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 void add(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 void add(java.lang.String upId, byte[]... values)
           
 void add(java.lang.String upId, java.lang.String... values)
           
 void add(java.lang.String upId, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 void clear()
           
 org.apache.directory.shared.ldap.entry.ServerEntry clone()
           
 boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 boolean contains(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
           
 boolean contains(java.lang.String upId, byte[]... values)
           
 boolean contains(java.lang.String upId, java.lang.String... values)
           
 boolean contains(java.lang.String upId, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 boolean containsAttribute(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
           
 boolean containsAttribute(java.lang.String... attributes)
           
 boolean equals(java.lang.Object obj)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute get(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute get(java.lang.String alias)
           
 java.util.Set<org.apache.directory.shared.ldap.schema.AttributeType> getAttributeTypes()
           
 org.apache.directory.shared.ldap.entry.Entry getClonedEntry()
           
 org.apache.directory.shared.ldap.name.DN getDn()
           
 org.apache.directory.shared.ldap.entry.ServerEntry getOriginalEntry()
           
 boolean hasObjectClass(org.apache.directory.shared.ldap.entry.EntryAttribute objectClass)
           
 boolean hasObjectClass(java.lang.String objectClass)
           
 boolean isValid()
           
 boolean isValid(org.apache.directory.shared.ldap.entry.EntryAttribute objectClass)
           
 boolean isValid(java.lang.String objectClass)
           
 java.util.Iterator<org.apache.directory.shared.ldap.entry.EntryAttribute> iterator()
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> put(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, byte[]... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, java.lang.String... values)
           
 org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 void readExternal(java.io.ObjectInput in)
           
 boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType, byte[]... values)
           
 boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType, java.lang.String... values)
           
 boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> remove(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
           
 boolean remove(java.lang.String upId, byte[]... values)
           
 boolean remove(java.lang.String upId, java.lang.String... values)
           
 boolean remove(java.lang.String upId, org.apache.directory.shared.ldap.entry.Value<?>... values)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> removeAttributes(org.apache.directory.shared.ldap.schema.AttributeType... attributes)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> removeAttributes(java.lang.String... attributes)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> set(org.apache.directory.shared.ldap.schema.AttributeType... attributeTypes)
           
 java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> set(java.lang.String... upIds)
           
 void setDn(org.apache.directory.shared.ldap.name.DN dn)
           
 int size()
           
 org.apache.directory.shared.ldap.entry.Entry toClientEntry()
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClonedServerEntry

public ClonedServerEntry(org.apache.directory.shared.ldap.entry.ServerEntry originalEntry)
Creates a new instance of ClonedServerEntry. The original entry is cloned in order to protect its content.

Parameters:
originalEntry - The original entry
Method Detail

getOriginalEntry

public org.apache.directory.shared.ldap.entry.ServerEntry getOriginalEntry()
Returns:
the originalEntry

getClonedEntry

public org.apache.directory.shared.ldap.entry.Entry getClonedEntry()
Returns:
the cloned Entry

add

public void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                byte[]... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                java.lang.String... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                org.apache.directory.shared.ldap.entry.Value<?>... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                byte[]... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                java.lang.String... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                org.apache.directory.shared.ldap.entry.Value<?>... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

contains

public boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                        byte[]... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.ServerEntry

contains

public boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                        java.lang.String... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.ServerEntry

contains

public boolean contains(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                        org.apache.directory.shared.ldap.entry.Value<?>... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.ServerEntry

containsAttribute

public boolean containsAttribute(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Specified by:
containsAttribute in interface org.apache.directory.shared.ldap.entry.ServerEntry

get

public org.apache.directory.shared.ldap.entry.EntryAttribute get(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Specified by:
get in interface org.apache.directory.shared.ldap.entry.ServerEntry

getAttributeTypes

public java.util.Set<org.apache.directory.shared.ldap.schema.AttributeType> getAttributeTypes()
Specified by:
getAttributeTypes in interface org.apache.directory.shared.ldap.entry.ServerEntry

hasObjectClass

public boolean hasObjectClass(org.apache.directory.shared.ldap.entry.EntryAttribute objectClass)
Specified by:
hasObjectClass in interface org.apache.directory.shared.ldap.entry.ServerEntry

isValid

public boolean isValid()
Specified by:
isValid in interface org.apache.directory.shared.ldap.entry.ServerEntry

isValid

public boolean isValid(java.lang.String objectClass)
Specified by:
isValid in interface org.apache.directory.shared.ldap.entry.ServerEntry

isValid

public boolean isValid(org.apache.directory.shared.ldap.entry.EntryAttribute objectClass)
Specified by:
isValid in interface org.apache.directory.shared.ldap.entry.ServerEntry

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 byte[]... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 java.lang.String... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 org.apache.directory.shared.ldap.entry.Value<?>... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 byte[]... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 java.lang.String... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                                                                 org.apache.directory.shared.ldap.entry.Value<?>... values)
                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                      byte[]... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                      java.lang.String... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public boolean remove(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                      org.apache.directory.shared.ldap.entry.Value<?>... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> remove(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
                                                                             throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.Entry
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

removeAttributes

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> removeAttributes(org.apache.directory.shared.ldap.schema.AttributeType... attributes)
Specified by:
removeAttributes in interface org.apache.directory.shared.ldap.entry.ServerEntry

set

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> set(org.apache.directory.shared.ldap.schema.AttributeType... attributeTypes)
Specified by:
set in interface org.apache.directory.shared.ldap.entry.ServerEntry

add

public void add(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                java.lang.String... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                byte[]... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

add

public void add(java.lang.String upId,
                org.apache.directory.shared.ldap.entry.Value<?>... values)
         throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
add in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

clear

public void clear()
Specified by:
clear in interface org.apache.directory.shared.ldap.entry.Entry

contains

public boolean contains(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
                 throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

contains

public boolean contains(java.lang.String upId,
                        byte[]... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.Entry

contains

public boolean contains(java.lang.String upId,
                        java.lang.String... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.Entry

contains

public boolean contains(java.lang.String upId,
                        org.apache.directory.shared.ldap.entry.Value<?>... values)
Specified by:
contains in interface org.apache.directory.shared.ldap.entry.Entry

containsAttribute

public boolean containsAttribute(java.lang.String... attributes)
Specified by:
containsAttribute in interface org.apache.directory.shared.ldap.entry.Entry

get

public org.apache.directory.shared.ldap.entry.EntryAttribute get(java.lang.String alias)
Specified by:
get in interface org.apache.directory.shared.ldap.entry.Entry

getDn

public org.apache.directory.shared.ldap.name.DN getDn()
Specified by:
getDn in interface org.apache.directory.shared.ldap.entry.Entry

hasObjectClass

public boolean hasObjectClass(java.lang.String objectClass)
Specified by:
hasObjectClass in interface org.apache.directory.shared.ldap.entry.Entry

iterator

public java.util.Iterator<org.apache.directory.shared.ldap.entry.EntryAttribute> iterator()
Specified by:
iterator in interface java.lang.Iterable<org.apache.directory.shared.ldap.entry.EntryAttribute>
Specified by:
iterator in interface org.apache.directory.shared.ldap.entry.Entry

put

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> put(org.apache.directory.shared.ldap.entry.EntryAttribute... attributes)
                                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
put in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 byte[]... values)
Specified by:
put in interface org.apache.directory.shared.ldap.entry.Entry

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 java.lang.String... values)
Specified by:
put in interface org.apache.directory.shared.ldap.entry.Entry

put

public org.apache.directory.shared.ldap.entry.EntryAttribute put(java.lang.String upId,
                                                                 org.apache.directory.shared.ldap.entry.Value<?>... values)
Specified by:
put in interface org.apache.directory.shared.ldap.entry.Entry

remove

public boolean remove(java.lang.String upId,
                      byte[]... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public boolean remove(java.lang.String upId,
                      java.lang.String... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

remove

public boolean remove(java.lang.String upId,
                      org.apache.directory.shared.ldap.entry.Value<?>... values)
               throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
remove in interface org.apache.directory.shared.ldap.entry.Entry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

removeAttributes

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> removeAttributes(java.lang.String... attributes)
Specified by:
removeAttributes in interface org.apache.directory.shared.ldap.entry.Entry

set

public java.util.List<org.apache.directory.shared.ldap.entry.EntryAttribute> set(java.lang.String... upIds)
Specified by:
set in interface org.apache.directory.shared.ldap.entry.Entry

setDn

public void setDn(org.apache.directory.shared.ldap.name.DN dn)
Specified by:
setDn in interface org.apache.directory.shared.ldap.entry.Entry

size

public int size()
Specified by:
size in interface org.apache.directory.shared.ldap.entry.Entry

toClientEntry

public org.apache.directory.shared.ldap.entry.Entry toClientEntry()
                                                           throws org.apache.directory.shared.ldap.exception.LdapException
Specified by:
toClientEntry in interface org.apache.directory.shared.ldap.entry.ServerEntry
Throws:
org.apache.directory.shared.ldap.exception.LdapException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
We can't use this method for a ServerEntry

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
See Also:
We can't use this method for a ServerEntry

clone

public org.apache.directory.shared.ldap.entry.ServerEntry clone()
Specified by:
clone in interface org.apache.directory.shared.ldap.entry.Entry
Specified by:
clone in interface org.apache.directory.shared.ldap.entry.ServerEntry
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object);

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.