|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.mitosis.operation.OperationFactory
public class OperationFactory
Creates an Operation instance for a JNDI operation. The
Operation instance returned by the provided factory methods are
mostly a CompositeOperation, which consists smaller JNDI
operations. The elements of the CompositeOperation differs from
the original JNDI operation to make the operation more robust to
replication conflict. All Operations created by
OperationFactory whould be robust to the replication conflict and
should be able to recover from the conflict.
"Add" (or "bind") is the only operation that doesn't return a
CompositeOperation but returns an AddEntryOperation.
It is because all other operations needs to update its related entry's
Constants.ENTRY_CSN or Constants.ENTRY_DELETED attribute
with additional sub-operations. In contrast, "add" operation doesn't need
to create a CompositeOperation because those attributes can be
added just modifying an AddEntryOperation rather than creating
a parent operation and add sub-operations there.
Please note that all operations update Constants.ENTRY_CSN and
documentation for each method won't explain this behavior.
| Constructor Summary | |
|---|---|
OperationFactory(DirectoryService directoryService,
ReplicationConfiguration cfg)
|
|
| Method Summary | |
|---|---|
Operation |
newAdd(org.apache.directory.shared.ldap.name.LdapDN normalizedName,
ServerEntry entry)
Creates a new Operation that performs LDAP "add" operation
with a newly generated CSN. |
Operation |
newDelete(org.apache.directory.shared.ldap.name.LdapDN normalizedName)
Creates a new Operation that performs "delete" operation. |
Operation |
newModify(ModifyOperationContext opContext)
Returns a new Operation that performs "modify" operation. |
Operation |
newModifyRn(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRn)
Returns a new Operation that performs "modifyRN" operation. |
Operation |
newMove(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.LdapDN newParentName)
Returns a new Operation that performs "move" operation. |
Operation |
newMove(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.LdapDN newParentName,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRn)
Returns a new Operation that performs "move" operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationFactory(DirectoryService directoryService,
ReplicationConfiguration cfg)
| Method Detail |
|---|
public Operation newAdd(org.apache.directory.shared.ldap.name.LdapDN normalizedName,
ServerEntry entry)
throws java.lang.Exception
Operation that performs LDAP "add" operation
with a newly generated CSN.
java.lang.Exception
public Operation newDelete(org.apache.directory.shared.ldap.name.LdapDN normalizedName)
throws javax.naming.NamingException
Operation that performs "delete" operation.
The created Operation doesn't actually delete the entry.
Instead, it sets Constants.ENTRY_DELETED to "TRUE".
javax.naming.NamingException
public Operation newModify(ModifyOperationContext opContext)
throws javax.naming.NamingException
Operation that performs "modify" operation.
CompositeOperation that consists of one or more
AttributeOperations and one additional operation that
sets Constants.ENTRY_DELETED to "FALSE" to resurrect the
entry the modified attributes belong to.
javax.naming.NamingException
public Operation newModifyRn(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRn)
throws java.lang.Exception
Operation that performs "modifyRN" operation.
This operation is a subset of "move" operation.
Calling this method actually forwards the call to
newMove(LdapDN, LdapDN, Rdn, boolean) with unchanged
newParentName.
java.lang.Exception
public Operation newMove(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.LdapDN newParentName)
throws java.lang.Exception
Operation that performs "move" operation.
Calling this method actually forwards the call to
newMove(LdapDN, LdapDN, Rdn, boolean) with unchanged
newRdn and 'true' deleteOldRn.
java.lang.Exception
public Operation newMove(org.apache.directory.shared.ldap.name.LdapDN oldName,
org.apache.directory.shared.ldap.name.LdapDN newParentName,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRn)
throws java.lang.Exception
Operation that performs "move" operation.
Please note this operation is the most fragile operation I've written
so it should be reviewed completely again.
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||