You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/04/15 21:08:15 UTC
svn commit: r529046 [4/5] - in /directory/apacheds/trunk/core/src:
main/java/org/apache/directory/server/core/
main/java/org/apache/directory/server/core/authn/
main/java/org/apache/directory/server/core/authz/
main/java/org/apache/directory/server/cor...
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java Sun Apr 15 12:08:12 2007
@@ -30,8 +30,7 @@
import javax.naming.directory.Attributes;
import javax.naming.ldap.LdapContext;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
@@ -182,7 +181,7 @@
*
* @return the attributes of the RootDSE
*/
- public abstract Attributes getRootDSE( ServiceContext getRootDSEContext ) throws NamingException;
+ public abstract Attributes getRootDSE( OperationContext opContext ) throws NamingException;
/**
@@ -193,13 +192,13 @@
* @return true if the entry contains an attribute with the value, false otherwise
* @throws NamingException if there is a problem accessing the entry and its values
*/
- public abstract boolean compare( ServiceContext compareContext ) throws NamingException;
+ public abstract boolean compare( OperationContext opContext ) throws NamingException;
- public abstract void addContextPartition( ServiceContext addContextPartitionContext ) throws NamingException;
+ public abstract void addContextPartition( OperationContext opContext ) throws NamingException;
- public abstract void removeContextPartition( ServiceContext removeContextPartition ) throws NamingException;
+ public abstract void removeContextPartition( OperationContext opContext ) throws NamingException;
public abstract Partition getSystemPartition();
@@ -228,7 +227,7 @@
* the empty string distinguished name if no match was found.
* @throws NamingException if there are any problems
*/
- public abstract LdapDN getMatchedName ( ServiceContext getMatchedNameContext ) throws NamingException;
+ public abstract LdapDN getMatchedName ( OperationContext opContext ) throws NamingException;
/**
@@ -242,7 +241,7 @@
* naming context was found for dn.
* @throws NamingException if there are any problems
*/
- public abstract LdapDN getSuffix ( ServiceContext getSuffixContext ) throws NamingException;
+ public abstract LdapDN getSuffix ( OperationContext opContext ) throws NamingException;
/**
@@ -252,7 +251,7 @@
* @return Iteration over ContextPartition suffix names as Names.
* @throws NamingException if there are any problems
*/
- public abstract Iterator listSuffixes( ServiceContext emptyContext ) throws NamingException;
+ public abstract Iterator listSuffixes( OperationContext opContext ) throws NamingException;
/**
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Sun Apr 15 12:08:12 2007
@@ -47,8 +47,8 @@
import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
import org.apache.directory.server.core.event.EventService;
import org.apache.directory.server.core.interceptor.InterceptorChain;
-import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.invocation.Invocation;
import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.shared.ldap.exception.LdapSizeLimitExceededException;
@@ -208,22 +208,22 @@
}
- public LdapDN getMatchedName ( ServiceContext getMatchedNameContext ) throws NamingException
+ public LdapDN getMatchedName ( OperationContext opContext ) throws NamingException
{
- return getMatchedName( getMatchedNameContext, null );
+ return getMatchedName( opContext, null );
}
- public LdapDN getMatchedName( ServiceContext getMatchedNameContext, Collection bypass ) throws NamingException
+ public LdapDN getMatchedName( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
- Object[] args = new Object[] { getMatchedNameContext };
+ Object[] args = new Object[] { opContext };
stack.push( new Invocation( this, caller, "getMatchedName", args, bypass ) );
try
{
- return this.configuration.getInterceptorChain().getMatchedName( getMatchedNameContext );
+ return this.configuration.getInterceptorChain().getMatchedName( opContext );
}
finally
{
@@ -232,21 +232,21 @@
}
- public LdapDN getSuffix ( ServiceContext getSuffixContext ) throws NamingException
+ public LdapDN getSuffix ( OperationContext opContext ) throws NamingException
{
- return getSuffix( getSuffixContext, null );
+ return getSuffix( opContext, null );
}
- public LdapDN getSuffix( ServiceContext getSuffixContext, Collection bypass ) throws NamingException
+ public LdapDN getSuffix( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
- Object[] args = new Object[] { getSuffixContext };
+ Object[] args = new Object[] { opContext };
stack.push( new Invocation( this, caller, "getSuffix", args, bypass ) );
try
{
- return this.configuration.getInterceptorChain().getSuffix( getSuffixContext );
+ return this.configuration.getInterceptorChain().getSuffix( opContext );
}
finally
{
@@ -255,13 +255,13 @@
}
- public Iterator listSuffixes( ServiceContext emptyContext ) throws NamingException
+ public Iterator listSuffixes( OperationContext opContext ) throws NamingException
{
- return listSuffixes( emptyContext );
+ return listSuffixes( opContext );
}
- public Iterator listSuffixes( ServiceContext emptyContext, Collection bypass ) throws NamingException
+ public Iterator listSuffixes( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
@@ -269,7 +269,7 @@
stack.push( new Invocation( this, caller, "listSuffixes", args, bypass ) );
try
{
- return this.configuration.getInterceptorChain().listSuffixes( emptyContext );
+ return this.configuration.getInterceptorChain().listSuffixes( opContext );
}
finally
{
@@ -278,21 +278,21 @@
}
- public boolean compare( ServiceContext compareContext ) throws NamingException
+ public boolean compare( OperationContext opContext ) throws NamingException
{
- return compare( compareContext, null );
+ return compare( opContext, null );
}
- public boolean compare( ServiceContext compareContext, Collection bypass ) throws NamingException
+ public boolean compare( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "compare", new Object[]
- { compareContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- return this.configuration.getInterceptorChain().compare( compareContext );
+ return this.configuration.getInterceptorChain().compare( opContext );
}
finally
{
@@ -301,21 +301,21 @@
}
- public void delete( ServiceContext deleteContext ) throws NamingException
+ public void delete( OperationContext opContext ) throws NamingException
{
- delete( deleteContext, null );
+ delete( opContext, null );
}
- public void delete( ServiceContext deleteContext, Collection bypass ) throws NamingException
+ public void delete( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "delete", new Object[]
- { deleteContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().delete( deleteContext );
+ this.configuration.getInterceptorChain().delete( opContext );
}
finally
{
@@ -324,21 +324,21 @@
}
- public void add( ServiceContext addContext ) throws NamingException
+ public void add( OperationContext opContext ) throws NamingException
{
- add( addContext, null );
+ add( opContext, null );
}
- public void add( ServiceContext addContext, Collection bypass ) throws NamingException
+ public void add( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "add", new Object[]
- { addContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().add( addContext );
+ this.configuration.getInterceptorChain().add( opContext );
}
finally
{
@@ -347,19 +347,19 @@
}
- public void modify( ServiceContext modifyContext ) throws NamingException
+ public void modify( OperationContext opContext ) throws NamingException
{
- modify( modifyContext, null );
+ modify( opContext, null );
}
- public void modify( ServiceContext modifyContext, Collection bypass ) throws NamingException
+ public void modify( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
Integer modOpObj;
- int modOp = ((ModifyServiceContext)modifyContext).getModOp();
+ int modOp = ((ModifyOperationContext)opContext).getModOp();
switch ( modOp )
{
@@ -380,10 +380,10 @@
}
stack.push( new Invocation( this, caller, "modify", new Object[]
- { modifyContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().modify( modifyContext );
+ this.configuration.getInterceptorChain().modify( opContext );
}
finally
{
@@ -415,21 +415,21 @@
}
- public NamingEnumeration list( LdapDN base ) throws NamingException
+ public NamingEnumeration list( OperationContext opContext ) throws NamingException
{
- return list( base, null );
+ return list( opContext, null );
}
- public NamingEnumeration list( LdapDN base, Collection bypass ) throws NamingException
+ public NamingEnumeration list( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "list", new Object[]
- { base }, bypass ) );
+ { opContext }, bypass ) );
try
{
- return this.configuration.getInterceptorChain().list( base );
+ return this.configuration.getInterceptorChain().list( opContext );
}
finally
{
@@ -505,21 +505,21 @@
}
- public Attributes lookup( ServiceContext lookupContext ) throws NamingException
+ public Attributes lookup( OperationContext opContext ) throws NamingException
{
- return lookup( lookupContext, ( Collection ) null );
+ return lookup( opContext, ( Collection ) null );
}
- public Attributes lookup( ServiceContext lookupContext, Collection bypass ) throws NamingException
+ public Attributes lookup( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "lookup", new Object[]
- { lookupContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- return this.configuration.getInterceptorChain().lookup( lookupContext );
+ return this.configuration.getInterceptorChain().lookup( opContext );
}
finally
{
@@ -527,21 +527,21 @@
}
}
- public boolean hasEntry( ServiceContext entryContext ) throws NamingException
+ public boolean hasEntry( OperationContext opContext ) throws NamingException
{
- return hasEntry( entryContext, null );
+ return hasEntry( opContext, null );
}
- public boolean hasEntry( ServiceContext entryContext, Collection bypass ) throws NamingException
+ public boolean hasEntry( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "hasEntry", new Object[]
- { entryContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- return this.configuration.getInterceptorChain().hasEntry( entryContext );
+ return this.configuration.getInterceptorChain().hasEntry( opContext );
}
finally
{
@@ -550,22 +550,22 @@
}
- public void rename( ServiceContext renameContext ) throws NamingException
+ public void rename( OperationContext opContext ) throws NamingException
{
- rename( renameContext, null );
+ rename( opContext, null );
}
- public void rename( ServiceContext renameContext, Collection bypass ) throws NamingException
+ public void rename( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
Object[] args = new Object[]
- { renameContext };
+ { opContext };
stack.push( new Invocation( this, caller, "rename", args, bypass ) );
try
{
- this.configuration.getInterceptorChain().rename( renameContext );
+ this.configuration.getInterceptorChain().rename( opContext );
}
finally
{
@@ -574,21 +574,21 @@
}
- public void move( ServiceContext moveContext ) throws NamingException
+ public void move( OperationContext opContext ) throws NamingException
{
- move( moveContext, null );
+ move( opContext, null );
}
- public void move( ServiceContext moveContext, Collection bypass ) throws NamingException
+ public void move( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "move", new Object[]
- { moveContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().move( moveContext );
+ this.configuration.getInterceptorChain().move( opContext );
}
finally
{
@@ -597,23 +597,23 @@
}
- public void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
+ public void moveAndRename( OperationContext opContext ) throws NamingException
{
- moveAndRename( moveAndRenameContext, null );
+ moveAndRename( opContext, null );
}
- public void moveAndRename( ServiceContext moveAndRenameContext, Collection bypass )
+ public void moveAndRename( OperationContext opContext, Collection bypass )
throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
Object[] args = new Object[]
- { moveAndRenameContext };
+ { opContext };
stack.push( new Invocation( this, caller, "moveAndRename", args, bypass ) );
try
{
- this.configuration.getInterceptorChain().moveAndRename( moveAndRenameContext );
+ this.configuration.getInterceptorChain().moveAndRename( opContext );
}
finally
{
@@ -624,26 +624,23 @@
/**
* TODO : check if we can find another way to procect ourselves from recursion.
*
- * @param bindDn
- * @param credentials
- * @param mechanisms
- * @param saslAuthId
+ * @param opContext The operation context
* @param bypass
* @throws NamingException
*/
- public void bind( ServiceContext bindContext, Collection bypass )
+ public void bind( OperationContext opContext, Collection bypass )
throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
Object[] args = new Object[]
- { bindContext };
+ { opContext };
stack.push( new Invocation( this, caller, "bind", args, bypass ) );
try
{
- configuration.getInterceptorChain().bind( bindContext );
+ configuration.getInterceptorChain().bind( opContext );
}
finally
{
@@ -651,16 +648,16 @@
}
}
- public void unbind( ServiceContext unbindContext, Collection bypass ) throws NamingException
+ public void unbind( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
Object[] args = new Object[]
- { unbindContext };
+ { opContext };
stack.push( new Invocation( this, caller, "unbind", args, bypass ) );
try
{
- this.configuration.getInterceptorChain().unbind( unbindContext );
+ this.configuration.getInterceptorChain().unbind( opContext );
}
finally
{
@@ -669,32 +666,32 @@
}
- public void bind( ServiceContext bindContext ) throws NamingException
+ public void bind( OperationContext opContext ) throws NamingException
{
- bind( bindContext, null );
+ bind( opContext, null );
}
- public void unbind( ServiceContext unbindContext ) throws NamingException
+ public void unbind( OperationContext opContext ) throws NamingException
{
- unbind( unbindContext, null );
+ unbind( opContext, null );
}
- public Attributes getRootDSE( ServiceContext getRootDSEContext ) throws NamingException
+ public Attributes getRootDSE( OperationContext opContext ) throws NamingException
{
return getRootDSE( null, null );
}
- public Attributes getRootDSE( ServiceContext getRootDSEContext, Collection bypass ) throws NamingException
+ public Attributes getRootDSE( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "getRootDSE", null, bypass ) );
try
{
- return this.configuration.getInterceptorChain().getRootDSE( getRootDSEContext );
+ return this.configuration.getInterceptorChain().getRootDSE( opContext );
}
finally
{
@@ -703,21 +700,21 @@
}
- public void addContextPartition( ServiceContext addContextPartitionContext ) throws NamingException
+ public void addContextPartition( OperationContext opContext ) throws NamingException
{
- addContextPartition( addContextPartitionContext, null );
+ addContextPartition( opContext, null );
}
- public void addContextPartition( ServiceContext addContextPartitionContext, Collection bypass ) throws NamingException
+ public void addContextPartition( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "addContextPartition", new Object[]
- { addContextPartitionContext }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().addContextPartition( addContextPartitionContext );
+ this.configuration.getInterceptorChain().addContextPartition( opContext );
}
finally
{
@@ -726,21 +723,21 @@
}
- public void removeContextPartition( ServiceContext removeContextPartition ) throws NamingException
+ public void removeContextPartition( OperationContext opContext ) throws NamingException
{
- removeContextPartition( removeContextPartition, null );
+ removeContextPartition( opContext, null );
}
- public void removeContextPartition( ServiceContext removeContextPartition, Collection bypass ) throws NamingException
+ public void removeContextPartition( OperationContext opContext, Collection bypass ) throws NamingException
{
ensureStarted();
InvocationStack stack = InvocationStack.getInstance();
stack.push( new Invocation( this, caller, "removeContextPartition", new Object[]
- { removeContextPartition }, bypass ) );
+ { opContext }, bypass ) );
try
{
- this.configuration.getInterceptorChain().removeContextPartition( removeContextPartition );
+ this.configuration.getInterceptorChain().removeContextPartition( opContext );
}
finally
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Sun Apr 15 12:08:12 2007
@@ -34,9 +34,9 @@
import org.apache.directory.server.core.DirectoryServiceConfiguration;
import org.apache.directory.server.core.configuration.PartitionConfiguration;
import org.apache.directory.server.core.enumeration.SearchResultEnumeration;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.partition.Oid;
import org.apache.directory.server.core.partition.impl.btree.gui.PartitionViewer;
@@ -330,7 +330,7 @@
{
LdapDN dn = new LdapDN( suffix );
LdapDN normalizedSuffix = LdapDN.normalize( dn, attributeTypeRegistry.getNormalizerMapping() );
- add( new AddServiceContext( normalizedSuffix, entry ) );
+ add( new AddOperationContext( normalizedSuffix, entry ) );
}
}
@@ -382,9 +382,9 @@
// ContextPartition Interface Method Implementations
// ------------------------------------------------------------------------
- public void delete( ServiceContext deleteContext ) throws NamingException
+ public void delete( OperationContext opContext ) throws NamingException
{
- LdapDN dn = deleteContext.getDn();
+ LdapDN dn = opContext.getDn();
Long id = getEntryId( dn.toString() );
@@ -406,20 +406,21 @@
}
- public abstract void add( ServiceContext addContext ) throws NamingException;
+ public abstract void add( OperationContext opContext ) throws NamingException;
- public abstract void modify( ServiceContext modifyContext ) throws NamingException;
+ public abstract void modify( OperationContext opContext ) throws NamingException;
public abstract void modify( LdapDN dn, ModificationItemImpl[] mods ) throws NamingException;
private static final String[] ENTRY_DELETED_ATTRS = new String[] { "entrydeleted" };
- public NamingEnumeration list( LdapDN base ) throws NamingException
+
+ public NamingEnumeration list( OperationContext opContext ) throws NamingException
{
SearchResultEnumeration list;
- list = new BTreeSearchResultEnumeration( ENTRY_DELETED_ATTRS, list( getEntryId( base.toString() ) ),
+ list = new BTreeSearchResultEnumeration( ENTRY_DELETED_ATTRS, list( getEntryId( opContext.getDn().getNormName() ) ),
this, attributeTypeRegistry );
return list;
}
@@ -437,9 +438,9 @@
}
- public Attributes lookup( ServiceContext lookupContext ) throws NamingException
+ public Attributes lookup( OperationContext opContext ) throws NamingException
{
- LookupServiceContext ctx = (LookupServiceContext)lookupContext;
+ LookupOperationContext ctx = (LookupOperationContext)opContext;
Attributes entry = lookup( getEntryId( ctx.getDn().getNormName() ) );
@@ -464,19 +465,19 @@
}
- public boolean hasEntry( ServiceContext entryContext ) throws NamingException
+ public boolean hasEntry( OperationContext opContext ) throws NamingException
{
- return null != getEntryId( entryContext.getDn().getNormName() );
+ return null != getEntryId( opContext.getDn().getNormName() );
}
- public abstract void rename( ServiceContext renameContext ) throws NamingException;
+ public abstract void rename( OperationContext opContext ) throws NamingException;
- public abstract void move( ServiceContext moveContext ) throws NamingException;
+ public abstract void move( OperationContext opContext ) throws NamingException;
- public abstract void moveAndRename( ServiceContext moveAndRenameContext )
+ public abstract void moveAndRename( OperationContext opContext )
throws NamingException;
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sun Apr 15 12:08:12 2007
@@ -61,7 +61,7 @@
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
import org.apache.directory.server.core.partition.impl.btree.Index;
import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
@@ -454,7 +454,7 @@
if ( null == partition.getEntryId( ndn.toString() ) )
{
- partition.add( new AddServiceContext( ndn, attrs ) );
+ partition.add( new AddOperationContext( ndn, attrs ) );
load();
}
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sun Apr 15 12:08:12 2007
@@ -30,12 +30,12 @@
import org.apache.directory.server.core.DirectoryServiceConfiguration;
import org.apache.directory.server.core.configuration.PartitionConfiguration;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
import org.apache.directory.server.core.partition.impl.btree.BTreePartitionConfiguration;
@@ -312,9 +312,9 @@
}
- public final void add( ServiceContext addContext ) throws NamingException
+ public final void add( OperationContext addContext ) throws NamingException
{
- store.add( addContext.getDn(), ((AddServiceContext)addContext).getEntry() );
+ store.add( addContext.getDn(), ((AddOperationContext)addContext).getEntry() );
}
@@ -377,9 +377,9 @@
}
- public final void modify( ServiceContext modifyContext ) throws NamingException
+ public final void modify( OperationContext modifyContext ) throws NamingException
{
- ModifyServiceContext ctx = (ModifyServiceContext)modifyContext;
+ ModifyOperationContext ctx = (ModifyOperationContext)modifyContext;
store.modify( ctx.getDn(), ctx.getModOp(), ctx.getMods() );
}
@@ -390,23 +390,23 @@
}
- public final void rename( ServiceContext renameContext ) throws NamingException
+ public final void rename( OperationContext renameContext ) throws NamingException
{
- RenameServiceContext ctx = (RenameServiceContext)renameContext;
+ RenameOperationContext ctx = (RenameOperationContext)renameContext;
store.rename( ctx.getDn(), ctx.getNewRdn(), ctx.getDelOldDn() );
}
- public final void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
+ public final void moveAndRename( OperationContext moveAndRenameContext ) throws NamingException
{
- MoveAndRenameServiceContext ctx = (MoveAndRenameServiceContext)moveAndRenameContext;
+ MoveAndRenameOperationContext ctx = (MoveAndRenameOperationContext)moveAndRenameContext;
store.move( ctx.getDn(), ctx.getParent(), ctx.getNewRdn(), ctx.getDelOldDn() );
}
- public final void move( ServiceContext moveContext ) throws NamingException
+ public final void move( OperationContext moveContext ) throws NamingException
{
- MoveServiceContext ctx = (MoveServiceContext)moveContext;
+ MoveOperationContext ctx = (MoveOperationContext)moveContext;
store.move( ctx.getDn(), ctx.getParent() );
}
@@ -420,7 +420,7 @@
ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED );
}
- public final void bind( ServiceContext bindContext ) throws NamingException
+ public final void bind( OperationContext bindContext ) throws NamingException
{
// does nothing
throw new LdapAuthenticationNotSupportedException(
@@ -430,7 +430,7 @@
}
- public final void unbind( ServiceContext unbindContext ) throws NamingException
+ public final void unbind( OperationContext unbindContext ) throws NamingException
{
}
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Sun Apr 15 12:08:12 2007
@@ -45,14 +45,14 @@
import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
import org.apache.directory.server.core.interceptor.BaseInterceptor;
import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionServiceContext;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.invocation.Invocation;
import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.server.core.jndi.ServerLdapContext;
@@ -267,18 +267,18 @@
}
- public void add(NextInterceptor next, ServiceContext addContext ) throws NamingException
+ public void add(NextInterceptor next, OperationContext opContext ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
- LdapDN name = addContext.getDn();
- Attributes entry = ((AddServiceContext)addContext).getEntry();
+ LdapDN name = opContext.getDn();
+ Attributes entry = ((AddOperationContext)opContext).getEntry();
// handle a normal add without following referrals
if ( ( refval == null ) || refval.equals( IGNORE ) )
{
- next.add( addContext );
+ next.add( opContext );
if ( isReferral( entry ) )
{
@@ -293,7 +293,7 @@
if ( farthest == null )
{
- next.add( addContext );
+ next.add( opContext );
if ( isReferral( entry ) )
{
@@ -302,7 +302,7 @@
return;
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
AttributeType refsType = attrRegistry.lookup( oidRegistry.getOid( REF_ATTR ) );
Attribute refs = AttributeUtils.getAttribute( referral, refsType );
doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
@@ -319,9 +319,9 @@
}
- public boolean compare( NextInterceptor next, ServiceContext compareContext ) throws NamingException
+ public boolean compare( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = compareContext.getDn();
+ LdapDN name = opContext.getDn();
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -330,7 +330,7 @@
// handle a normal add without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- return next.compare( compareContext );
+ return next.compare( opContext );
}
if ( refval.equals( THROW ) )
@@ -338,10 +338,10 @@
LdapDN farthest = lut.getFarthestReferralAncestor( name );
if ( farthest == null )
{
- return next.compare( compareContext );
+ return next.compare( opContext );
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
@@ -360,9 +360,9 @@
}
- public void delete( NextInterceptor next, ServiceContext deleteContext ) throws NamingException
+ public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = deleteContext.getDn();
+ LdapDN name = opContext.getDn();
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
@@ -370,7 +370,7 @@
// handle a normal delete without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- next.delete( deleteContext );
+ next.delete( opContext );
if ( lut.isReferral( name ) )
{
@@ -386,7 +386,7 @@
if ( farthest == null )
{
- next.delete( deleteContext );
+ next.delete( opContext );
if ( lut.isReferral( name ) )
{
@@ -396,7 +396,7 @@
return;
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
}
@@ -427,20 +427,20 @@
* -----------------------------------------------------------------------
*/
- public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
+ public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN oldName = moveContext.getDn();
+ LdapDN oldName = opContext.getDn();
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
- LdapDN newName = ( LdapDN ) ((MoveServiceContext)moveContext).getParent().clone();
+ LdapDN newName = ( LdapDN ) ((MoveOperationContext)opContext).getParent().clone();
newName.add( oldName.get( oldName.size() - 1 ) );
// handle a normal modify without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- next.move( moveContext );
+ next.move( opContext );
if ( lut.isReferral( oldName ) )
{
@@ -456,7 +456,7 @@
LdapDN farthestDst = lut.getFarthestReferralAncestor( newName ); // note will not return newName so safe
if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
{
- next.move( moveContext );
+ next.move( opContext );
if ( lut.isReferral( oldName ) )
{
@@ -467,7 +467,7 @@
}
else if ( farthestSrc != null )
{
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthestSrc ),
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
@@ -499,21 +499,21 @@
}
- public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
+ public void moveAndRename( NextInterceptor next, OperationContext opContext )
throws NamingException
{
- LdapDN oldName = moveAndRenameContext.getDn();
+ LdapDN oldName = opContext.getDn();
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
- LdapDN newName = ( LdapDN ) ((MoveAndRenameServiceContext)moveAndRenameContext).getParent().clone();
- newName.add( ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn() );
+ LdapDN newName = ( LdapDN ) ((MoveAndRenameOperationContext)opContext).getParent().clone();
+ newName.add( ((MoveAndRenameOperationContext)opContext).getNewRdn() );
// handle a normal modify without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- next.moveAndRename( moveAndRenameContext );
+ next.moveAndRename( opContext );
if ( lut.isReferral( oldName ) )
{
lut.referralChanged( oldName, newName );
@@ -527,7 +527,7 @@
LdapDN farthestDst = lut.getFarthestReferralAncestor( newName ); // safe to use - does not return newName
if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
{
- next.moveAndRename( moveAndRenameContext );
+ next.moveAndRename( opContext );
if ( lut.isReferral( oldName ) )
{
lut.referralChanged( oldName, newName );
@@ -536,7 +536,7 @@
}
else if ( farthestSrc != null )
{
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthestSrc ),
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
@@ -568,10 +568,10 @@
}
- public void rename( NextInterceptor next, ServiceContext renameContext )
+ public void rename( NextInterceptor next, OperationContext opContext )
throws NamingException
{
- LdapDN oldName = renameContext.getDn();
+ LdapDN oldName = opContext.getDn();
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -579,14 +579,14 @@
LdapDN newName = ( LdapDN ) oldName.clone();
newName.remove( oldName.size() - 1 );
- LdapDN newRdnName = new LdapDN( ((RenameServiceContext)renameContext).getNewRdn() );
+ LdapDN newRdnName = new LdapDN( ((RenameOperationContext)opContext).getNewRdn() );
newRdnName.normalize( attrRegistry.getNormalizerMapping() );
newName.add( newRdnName.toNormName() );
// handle a normal modify without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- next.rename( renameContext );
+ next.rename( opContext );
if ( lut.isReferral( oldName ) )
{
@@ -603,7 +603,7 @@
if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
{
- next.rename( renameContext );
+ next.rename( opContext );
if ( lut.isReferral( oldName ) )
{
@@ -615,7 +615,7 @@
if ( farthestSrc != null )
{
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthestSrc ),
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
@@ -647,14 +647,14 @@
}
- private void checkModify( ModifyServiceContext modifyContext ) throws NamingException
+ private void checkModify( ModifyOperationContext opContext ) throws NamingException
{
// -------------------------------------------------------------------
// Check and update lut if we change the objectClass
// -------------------------------------------------------------------
- LdapDN name = modifyContext.getDn();
- int modOp = modifyContext.getModOp();
- Attributes mods = modifyContext.getMods();
+ LdapDN name = opContext.getDn();
+ int modOp = opContext.getModOp();
+ Attributes mods = opContext.getMods();
boolean isTargetReferral = lut.isReferral( name );
boolean isOcChange = mods.get( SchemaConstants.OBJECT_CLASS_AT ) != null;
@@ -709,7 +709,7 @@
}
- public void modify( NextInterceptor next, ServiceContext modifyContext ) throws NamingException
+ public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -718,24 +718,25 @@
// handle a normal modify without following referrals
if ( refval == null || refval.equals( IGNORE ) )
{
- next.modify( modifyContext );
- checkModify( (ModifyServiceContext)modifyContext );
+ next.modify( opContext );
+ checkModify( (ModifyOperationContext)opContext );
return;
}
if ( refval.equals( THROW ) )
{
- LdapDN farthest = lut.getFarthestReferralAncestor( modifyContext.getDn() );
+ LdapDN farthest = lut.getFarthestReferralAncestor( opContext.getDn() );
+
if ( farthest == null )
{
- next.modify( modifyContext );
- checkModify( (ModifyServiceContext)modifyContext );
+ next.modify( opContext );
+ checkModify( (ModifyOperationContext)opContext );
return;
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
- doReferralException( farthest, new LdapDN( modifyContext.getDn().getUpName() ), refs );
+ doReferralException( farthest, new LdapDN( opContext.getDn().getUpName() ), refs );
}
else if ( refval.equals( FOLLOW ) )
{
@@ -837,7 +838,7 @@
return;
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
}
@@ -868,12 +869,12 @@
}
- public void addContextPartition( NextInterceptor next, ServiceContext addContextPartitionContext ) throws NamingException
+ public void addContextPartition( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- next.addContextPartition( addContextPartitionContext );
+ next.addContextPartition( opContext );
// add referrals immediately after adding the new partition
- Partition partition = ((AddContextPartitionServiceContext)addContextPartitionContext).getCfg().getContextPartition();
+ Partition partition = ((AddContextPartitionOperationContext)opContext).getCfg().getContextPartition();
LdapDN suffix = partition.getSuffix();
Invocation invocation = InvocationStack.getInstance().peek();
NamingEnumeration list = invocation.getProxy().search( suffix, env, getReferralFilter(), getControls(),
@@ -882,20 +883,20 @@
}
- public void removeContextPartition( NextInterceptor next, ServiceContext removeContextPartition ) throws NamingException
+ public void removeContextPartition( NextInterceptor next, OperationContext opContext ) throws NamingException
{
// remove referrals immediately before removing the partition
Invocation invocation = InvocationStack.getInstance().peek();
NamingEnumeration list = invocation.getProxy().search(
- removeContextPartition.getDn(),
+ opContext.getDn(),
env,
getReferralFilter(),
getControls(),
SEARCH_BYPASS );
- deleteReferrals( list, removeContextPartition.getDn() );
+ deleteReferrals( list, opContext.getDn() );
- next.removeContextPartition( removeContextPartition );
+ next.removeContextPartition( opContext );
}
@@ -971,7 +972,7 @@
{
if ( lut.isReferral( base ) )
{
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralExceptionOnSearchBase( base, refs, controls.getSearchScope() );
}
@@ -982,7 +983,7 @@
return next.search( base, env, filter, controls );
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralExceptionOnSearchBase( farthest, new LdapDN( base.getUpName() ), refs, controls.getSearchScope() );
throw new IllegalStateException( "Should never get here: shutting up compiler" );
@@ -991,7 +992,7 @@
{
if ( lut.isReferral( base ) )
{
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralExceptionOnSearchBase( base, refs, controls.getSearchScope() );
}
@@ -1004,7 +1005,7 @@
return new ReferralHandlingEnumeration( srfe, lut, attrRegistry, nexus, controls.getSearchScope(), true );
}
- Attributes referral = invocation.getProxy().lookup( new LookupServiceContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+ Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
Attribute refs = referral.get( REF_ATTR );
doReferralExceptionOnSearchBase( farthest, new LdapDN( base.getUpName() ), refs, controls.getSearchScope() );
throw new IllegalStateException( "Should never get here: shutting up compiler" );
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Sun Apr 15 12:08:12 2007
@@ -40,8 +40,9 @@
import javax.naming.directory.SearchResult;
import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
-import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.schema.bootstrap.Schema;
import org.apache.directory.server.schema.registries.AbstractSchemaLoader;
@@ -409,20 +410,20 @@
staticObjectClassesDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading objectClasses", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
ObjectClass oc = factory.getObjectClass( attrs, targetRegistries, schema.getSchemaName() );
try
@@ -509,20 +510,20 @@
staticAttributeTypeDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading attributeTypes", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
AttributeType at = factory.getAttributeType( attrs, targetRegistries, schema.getSchemaName() );
try
{
@@ -606,20 +607,20 @@
staticMatchingRulesDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading matchingRules", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
MatchingRule mrule = factory.getMatchingRule( attrs, targetRegistries, schema.getSchemaName() );
targetRegistries.getMatchingRuleRegistry().register( mrule );
@@ -638,20 +639,20 @@
staticSyntaxesDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading syntaxes", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
Syntax syntax = factory.getSyntax( attrs, targetRegistries, schema.getSchemaName() );
targetRegistries.getSyntaxRegistry().register( syntax );
}
@@ -669,20 +670,20 @@
staticSyntaxCheckersDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading syntaxCheckers", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
SyntaxChecker sc = factory.getSyntaxChecker( attrs, targetRegistries );
SyntaxCheckerDescription syntaxCheckerDescription =
getSyntaxCheckerDescription( schema.getSchemaName(), attrs );
@@ -702,20 +703,20 @@
staticNormalizersDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading normalizers", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
Normalizer normalizer = factory.getNormalizer( attrs, targetRegistries );
NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), attrs );
targetRegistries.getNormalizerRegistry().register( normalizerDescription, normalizer );
@@ -771,20 +772,20 @@
staticComparatorsDNs.put( schema.getSchemaName(), dn );
}
- if ( ! partition.hasEntry( new EntryServiceContext( dn ) ) )
+ if ( ! partition.hasEntry( new EntryOperationContext( dn ) ) )
{
return;
}
log.debug( "{} schema: loading comparators", schema.getSchemaName() );
- NamingEnumeration list = partition.list( dn );
+ NamingEnumeration list = partition.list( new ListOperationContext( dn ) );
while ( list.hasMore() )
{
SearchResult result = ( SearchResult ) list.next();
LdapDN resultDN = new LdapDN( result.getName() );
resultDN.normalize( attrRegistry.getNormalizerMapping() );
- Attributes attrs = partition.lookup( new LookupServiceContext( resultDN ) );
+ Attributes attrs = partition.lookup( new LookupOperationContext( resultDN ) );
Comparator comparator = factory.getComparator( attrs, targetRegistries );
ComparatorDescription comparatorDescription = getComparatorDescription( schema.getSchemaName(), attrs );
targetRegistries.getComparatorRegistry().register( comparatorDescription, comparator );
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Sun Apr 15 12:08:12 2007
@@ -35,7 +35,7 @@
import javax.naming.directory.SearchResult;
import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.schema.bootstrap.Schema;
@@ -197,7 +197,7 @@
{
LdapDN dn = new LdapDN( "cn=" + schemaName + ",ou=schema" );
dn.normalize( attrRegistry.getNormalizerMapping() );
- return factory.getSchema( partition.lookup( new LookupServiceContext( dn ) ) );
+ return factory.getSchema( partition.lookup( new LookupOperationContext( dn ) ) );
}
@@ -550,7 +550,7 @@
{
LdapDN dn = new LdapDN( "cn=" + schemaName + ",ou=schema" );
dn.normalize( attrRegistry.getNormalizerMapping() );
- Attributes entry = partition.lookup( new LookupServiceContext( dn ) );
+ Attributes entry = partition.lookup( new LookupOperationContext( dn ) );
Attribute disabledAttr = AttributeUtils.getAttribute( entry, disabledAttributeType );
ModificationItemImpl[] mods = new ModificationItemImpl[3];
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Sun Apr 15 12:08:12 2007
@@ -47,13 +47,13 @@
import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
import org.apache.directory.server.core.interceptor.BaseInterceptor;
import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
-import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.invocation.Invocation;
import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.server.core.partition.PartitionNexus;
@@ -370,9 +370,9 @@
/**
*
*/
- public NamingEnumeration list( NextInterceptor nextInterceptor, LdapDN base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
{
- NamingEnumeration e = nextInterceptor.list( base );
+ NamingEnumeration e = nextInterceptor.list( opContext );
Invocation invocation = InvocationStack.getInstance().peek();
return new SearchResultFilteringEnumeration( e, new SearchControls(), invocation, binaryAttributeFilter );
}
@@ -788,7 +788,7 @@
// look up cn=schemaModifications,ou=schema and get values for the
// modifiers and creators operational information
- Attributes modificationAttributes = nexus.lookup( new LookupServiceContext( schemaModificationAttributesDN ) );
+ Attributes modificationAttributes = nexus.lookup( new LookupOperationContext( schemaModificationAttributesDN ) );
if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.CREATE_TIMESTAMP_AT ) )
{
@@ -836,9 +836,9 @@
/**
* Search for an entry, using its DN. Binary attributes and ObjectClass attribute are removed.
*/
- public Attributes lookup( NextInterceptor nextInterceptor, ServiceContext lookupContext ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
{
- Attributes result = nextInterceptor.lookup( lookupContext );
+ Attributes result = nextInterceptor.lookup( opContext );
if ( result == null )
{
@@ -1170,11 +1170,11 @@
* current entry or is not added by a previous modification operation.
* @throws LdapSchemaViolationException Another schema violation occured.
*/
- public void modify( NextInterceptor next, ServiceContext modifyContext ) throws NamingException
+ public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = modifyContext.getDn();
- int modOp = ((ModifyServiceContext)modifyContext).getModOp();
- Attributes mods = ((ModifyServiceContext)modifyContext).getMods();
+ LdapDN name = opContext.getDn();
+ int modOp = ((ModifyOperationContext)opContext).getModOp();
+ Attributes mods = ((ModifyOperationContext)opContext).getMods();
Attributes entry = null;
@@ -1186,7 +1186,7 @@
}
else
{
- entry = nexus.lookup( new LookupServiceContext( name ) );
+ entry = nexus.lookup( new LookupOperationContext( name ) );
}
Attributes targetEntry = SchemaUtils.getTargetEntry( modOp, mods, entry );
@@ -1327,58 +1327,58 @@
return;
}
- next.modify( modifyContext );
+ next.modify( opContext );
}
- public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
+ public void moveAndRename( NextInterceptor next, OperationContext opContext )
throws NamingException
{
- LdapDN oriChildName = moveAndRenameContext.getDn();
+ LdapDN oriChildName = opContext.getDn();
- Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
+ Attributes entry = nexus.lookup( new LookupOperationContext( oriChildName ) );
if ( oriChildName.startsWith( schemaBaseDN ) )
{
schemaManager.move( oriChildName,
- ((MoveAndRenameServiceContext)moveAndRenameContext).getParent(),
- ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn(),
- ((MoveAndRenameServiceContext)moveAndRenameContext).getDelOldDn(), entry );
+ ((MoveAndRenameOperationContext)opContext).getParent(),
+ ((MoveAndRenameOperationContext)opContext).getNewRdn(),
+ ((MoveAndRenameOperationContext)opContext).getDelOldDn(), entry );
}
- next.moveAndRename( moveAndRenameContext );
+ next.moveAndRename( opContext );
}
- public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
+ public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN oriChildName = moveContext.getDn();
+ LdapDN oriChildName = opContext.getDn();
- Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
+ Attributes entry = nexus.lookup( new LookupOperationContext( oriChildName ) );
if ( oriChildName.startsWith( schemaBaseDN ) )
{
- schemaManager.replace( oriChildName, ((MoveServiceContext)moveContext).getParent(), entry );
+ schemaManager.replace( oriChildName, ((MoveOperationContext)opContext).getParent(), entry );
}
- next.move( moveContext );
+ next.move( opContext );
}
- public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
+ public void rename( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = renameContext.getDn();
- String newRdn = ((RenameServiceContext)renameContext).getNewRdn();
- boolean deleteOldRn = ((RenameServiceContext)renameContext).getDelOldDn();
+ LdapDN name = opContext.getDn();
+ String newRdn = ((RenameOperationContext)opContext).getNewRdn();
+ boolean deleteOldRn = ((RenameOperationContext)opContext).getDelOldDn();
- Attributes entry = nexus.lookup( new LookupServiceContext( name ) );
+ Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
if ( name.startsWith( schemaBaseDN ) )
{
schemaManager.modifyRn( name, newRdn, deleteOldRn, entry );
}
- next.rename( renameContext );
+ next.rename( opContext );
}
private final static String[] schemaSubentryReturnAttributes = new String[] { "+", "*" };
@@ -1395,7 +1395,7 @@
}
else
{
- entry = nexus.lookup( new LookupServiceContext( name ) );
+ entry = nexus.lookup( new LookupOperationContext( name ) );
}
// First, we get the entry from the backend. If it does not exist, then we throw an exception
@@ -1865,10 +1865,10 @@
/**
* Check that all the attributes exist in the schema for this entry.
*/
- public void add( NextInterceptor next, ServiceContext addContext ) throws NamingException
+ public void add( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = addContext.getDn();
- Attributes attrs = ((AddServiceContext)addContext).getEntry();
+ LdapDN name = opContext.getDn();
+ Attributes attrs = ((AddOperationContext)opContext).getEntry();
check( name, attrs );
@@ -1877,7 +1877,7 @@
schemaManager.add( name, attrs );
}
- next.add( addContext );
+ next.add( opContext );
}
@@ -1924,17 +1924,17 @@
}
- public void delete( NextInterceptor next, ServiceContext deleteContext ) throws NamingException
+ public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
{
- LdapDN name = deleteContext.getDn();
- Attributes entry = nexus.lookup( new LookupServiceContext( name ) );
+ LdapDN name = opContext.getDn();
+ Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
if ( name.startsWith( schemaBaseDN ) )
{
schemaManager.delete( name, entry );
}
- next.delete( deleteContext );
+ next.delete( opContext );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?view=diff&rev=529046&r1=529045&r2=529046
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java Sun Apr 15 12:08:12 2007
@@ -28,8 +28,8 @@
import javax.naming.directory.Attributes;
import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.DeleteServiceContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.server.schema.bootstrap.Schema;
@@ -135,7 +135,7 @@
Schema schema = dao.getSchema( obj.getSchema() );
LdapDN dn = getDn( obj );
Attributes attrs = factory.getAttributes( obj, schema );
- proxy.add( new AddServiceContext( dn, attrs ), BYPASS );
+ proxy.add( new AddOperationContext( dn, attrs ), BYPASS );
}
@@ -143,7 +143,7 @@
{
PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
LdapDN dn = getDn( obj );
- proxy.delete( new DeleteServiceContext( dn ), BYPASS );
+ proxy.delete( new DeleteOperationContext( dn ), BYPASS );
}
@@ -153,7 +153,7 @@
PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
LdapDN dn = new LdapDN( "m-oid=" + normalizerDescription.getNumericOid() + ",ou=normalizers,cn="
+ schemaName + ",ou=schema" );
- proxy.delete( new DeleteServiceContext( dn ), BYPASS );
+ proxy.delete( new DeleteOperationContext( dn ), BYPASS );
}
@@ -163,7 +163,7 @@
PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
LdapDN dn = new LdapDN( "m-oid=" + syntaxCheckerDescription.getNumericOid() + ",ou=syntaxCheckers,cn="
+ schemaName + ",ou=schema" );
- proxy.delete( new DeleteServiceContext( dn ), BYPASS );
+ proxy.delete( new DeleteOperationContext( dn ), BYPASS );
}
@@ -173,7 +173,7 @@
PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
LdapDN dn = new LdapDN( "m-oid=" + comparatorDescription.getNumericOid() + ",ou=comparators,cn="
+ schemaName + ",ou=schema" );
- proxy.delete( new DeleteServiceContext( dn ), BYPASS );
+ proxy.delete( new DeleteOperationContext( dn ), BYPASS );
}
@@ -184,7 +184,7 @@
LdapDN dn = new LdapDN( "m-oid=" + comparatorDescription.getNumericOid() + ",ou=comparators,cn="
+ schemaName + ",ou=schema" );
Attributes attrs = getAttributes( comparatorDescription );
- proxy.add( new AddServiceContext( dn, attrs ), BYPASS );
+ proxy.add( new AddOperationContext( dn, attrs ), BYPASS );
}
@@ -218,7 +218,7 @@
LdapDN dn = new LdapDN( "m-oid=" + normalizerDescription.getNumericOid() + ",ou=normalizers,cn="
+ schemaName + ",ou=schema" );
Attributes attrs = getAttributes( normalizerDescription );
- proxy.add( new AddServiceContext( dn, attrs ), BYPASS );
+ proxy.add( new AddOperationContext( dn, attrs ), BYPASS );
}
@@ -252,7 +252,7 @@
LdapDN dn = new LdapDN( "m-oid=" + syntaxCheckerDescription.getNumericOid() + ",ou=syntaxCheckers,cn="
+ schemaName + ",ou=schema" );
Attributes attrs = getAttributes( syntaxCheckerDescription );
- proxy.add( new AddServiceContext( dn, attrs ), BYPASS );
+ proxy.add( new AddOperationContext( dn, attrs ), BYPASS );
}