You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/06/02 16:00:26 UTC
svn commit: r662440 [3/8] - in /directory:
apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/
apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/
apacheds/branches/bigbang/c...
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Mon Jun 2 07:00:23 2008
@@ -34,10 +34,9 @@
import org.apache.directory.server.core.event.Evaluator;
import org.apache.directory.server.core.event.EventInterceptor;
import org.apache.directory.server.core.event.ExpressionEvaluator;
-import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.normalization.NormalizationInterceptor;
import org.apache.directory.server.core.operational.OperationalAttributeInterceptor;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.server.core.schema.SchemaInterceptor;
import org.apache.directory.server.core.subtree.RefinementEvaluator;
import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
@@ -91,7 +90,7 @@
*
* @throws NamingException if failed to initialize internal components
*/
- public ACDFEngine(OidRegistry oidRegistry, AttributeTypeRegistry attrTypeRegistry) throws NamingException
+ public ACDFEngine( OidRegistry oidRegistry, AttributeTypeRegistry attrTypeRegistry ) throws NamingException
{
Evaluator entryEvaluator = new ExpressionEvaluator( oidRegistry, attrTypeRegistry );
SubtreeEvaluator subtreeEvaluator = new SubtreeEvaluator( oidRegistry, attrTypeRegistry );
@@ -130,7 +129,7 @@
*/
public void checkPermission(
Registries registries,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN username,
AuthenticationLevel authenticationLevel,
@@ -142,8 +141,8 @@
ServerEntry entry,
ServerEntry entryView ) throws Exception
{
- if ( !hasPermission( registries, proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
- microOperations, aciTuples, entry, entryView ) )
+ if ( !hasPermission( registries, opContext, userGroupNames, username, authenticationLevel, entryName,
+ attrId, attrValue, microOperations, aciTuples, entry, entryView ) )
{
throw new LdapNoPermissionException();
}
@@ -188,7 +187,7 @@
*/
public boolean hasPermission(
Registries registries,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
AuthenticationLevel authenticationLevel,
@@ -205,7 +204,7 @@
throw new NullPointerException( "entryName" );
}
- ServerEntry userEntry = proxy.lookup( new LookupOperationContext( registries, userName ), USER_LOOKUP_BYPASS );
+ ServerEntry userEntry = opContext.lookup( userName, USER_LOOKUP_BYPASS );
// Determine the scope of the requested operation.
OperationScope scope;
@@ -233,7 +232,7 @@
registries,
aciTuples,
scope,
- proxy,
+ opContext,
userGroupNames,
userName,
userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Mon Jun 2 07:00:23 2008
@@ -25,7 +25,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -68,7 +68,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -48,7 +48,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Mon Jun 2 07:00:23 2008
@@ -26,10 +26,10 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.event.EventInterceptor;
import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
import org.apache.directory.server.core.normalization.NormalizationInterceptor;
import org.apache.directory.server.core.operational.OperationalAttributeInterceptor;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.server.core.schema.SchemaInterceptor;
import org.apache.directory.server.core.subtree.SubentryInterceptor;
import org.apache.directory.server.schema.registries.Registries;
@@ -76,7 +76,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
@@ -120,7 +120,7 @@
{
if ( immSubCount < 0 )
{
- immSubCount = getImmSubCount( registries, proxy, entryName );
+ immSubCount = getImmSubCount( registries, opContext, entryName );
}
ProtectedItem.MaxImmSub mis = ( ProtectedItem.MaxImmSub ) item;
@@ -152,15 +152,18 @@
}
- private int getImmSubCount( Registries registries, PartitionNexusProxy proxy, LdapDN entryName ) throws Exception
+ private int getImmSubCount( Registries registries, OperationContext opContext, LdapDN entryName ) throws Exception
{
int cnt = 0;
EntryFilteringCursor results = null;
try
{
- results = proxy.search( new SearchOperationContext( registries, ( LdapDN ) entryName.getPrefix( 1 ),
- AliasDerefMode.DEREF_ALWAYS, childrenFilter, childrenSearchControls ), SEARCH_BYPASS );
+ SearchOperationContext searchContext = new SearchOperationContext( opContext.getSession(),
+ ( LdapDN ) entryName.getPrefix( 1 ), AliasDerefMode.DEREF_ALWAYS,
+ childrenFilter, childrenSearchControls );
+ searchContext.setByPassed( SEARCH_BYPASS );
+ results = opContext.getSession().getDirectoryService().getOperationManager().search( searchContext );
while ( results.next() )
{
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -51,7 +51,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -49,7 +49,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -57,7 +57,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -55,7 +55,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Mon Jun 2 07:00:23 2008
@@ -28,7 +28,7 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.event.Evaluator;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.subtree.RefinementEvaluator;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
import org.apache.directory.server.schema.registries.OidRegistry;
@@ -76,7 +76,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.subtree.SubtreeEvaluator;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -62,7 +62,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java Mon Jun 2 07:00:23 2008
@@ -26,7 +26,7 @@
import javax.naming.NamingException;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -51,7 +51,7 @@
Registries registries,
Collection<ACITuple> tuples,
OperationScope scope,
- PartitionNexusProxy proxy,
+ OperationContext opContext,
Collection<LdapDN> userGroupNames,
LdapDN userName,
ServerEntry userEntry,
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Mon Jun 2 07:00:23 2008
@@ -23,21 +23,19 @@
import org.apache.directory.server.constants.ApacheSchemaConstants;
import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.ClonedServerEntry;
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.entry.ServerEntryUtils;
import org.apache.directory.server.core.interceptor.BaseInterceptor;
import org.apache.directory.server.core.interceptor.NextInterceptor;
import org.apache.directory.server.core.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
-import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
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.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.invocation.Invocation;
-import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.partition.ByPassConstants;
import org.apache.directory.server.core.schema.SchemaService;
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.ldif.ChangeType;
@@ -155,19 +153,16 @@
private ServerEntry getAttributes( OperationContext opContext ) throws Exception
{
LdapDN dn = opContext.getDn();
- ServerEntry serverEntry;
+ ClonedServerEntry serverEntry;
// @todo make sure we're not putting in operational attributes that cannot be user modified
- Invocation invocation = InvocationStack.getInstance().peek();
- PartitionNexusProxy proxy = invocation.getProxy();
-
if ( schemaService.isSchemaSubentry( dn.toNormName() ) )
{
return schemaService.getSubschemaEntryCloned();
}
else
{
- serverEntry = proxy.lookup( new LookupOperationContext( opContext.getRegistries(), dn ), PartitionNexusProxy.LOOKUP_BYPASS );
+ serverEntry = opContext.lookup( dn, ByPassConstants.LOOKUP_BYPASS );
}
return serverEntry;
@@ -244,8 +239,8 @@
forward.setDn( renameContext.getDn().getUpName() );
forward.setDeleteOldRdn( renameContext.getDelOldDn() );
- LdifEntry reverse = LdifUtils.reverseModifyRdn( ServerEntryUtils.toAttributesImpl( serverEntry ), null, renameContext.getDn(),
- new Rdn( renameContext.getNewRdn() ) );
+ LdifEntry reverse = LdifUtils.reverseModifyRdn( ServerEntryUtils.toAttributesImpl( serverEntry ),
+ null, renameContext.getDn(), new Rdn( renameContext.getNewRdn() ) );
changeLog.log( getPrincipal(), forward, reverse );
}
@@ -254,15 +249,12 @@
public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opCtx )
throws Exception
{
- ServerEntry serverEntry = null;
+ ClonedServerEntry serverEntry = null;
if ( changeLog.isEnabled() && ! opCtx.isCollateralOperation() )
{
// @todo make sure we're not putting in operational attributes that cannot be user modified
- Invocation invocation = InvocationStack.getInstance().peek();
- PartitionNexusProxy proxy = invocation.getProxy();
- serverEntry = proxy.lookup( new LookupOperationContext( opCtx.getRegistries(), opCtx.getDn() ),
- PartitionNexusProxy.LOOKUP_BYPASS );
+ serverEntry = opCtx.lookup( opCtx.getDn(), ByPassConstants.LOOKUP_BYPASS );
}
next.moveAndRename( opCtx );
@@ -279,8 +271,8 @@
forward.setNewRdn( opCtx.getNewRdn().getUpName() );
forward.setNewSuperior( opCtx.getParent().getUpName() );
- LdifEntry reverse = LdifUtils.reverseModifyRdn( ServerEntryUtils.toAttributesImpl( serverEntry ), opCtx.getParent(), opCtx.getDn(),
- new Rdn( opCtx.getNewRdn() ) );
+ LdifEntry reverse = LdifUtils.reverseModifyRdn( ServerEntryUtils.toAttributesImpl( serverEntry ),
+ opCtx.getParent(), opCtx.getDn(), new Rdn( opCtx.getNewRdn() ) );
changeLog.log( getPrincipal(), forward, reverse );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Mon Jun 2 07:00:23 2008
@@ -32,11 +32,11 @@
import org.apache.directory.server.core.interceptor.context.ListOperationContext;
import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
@@ -61,9 +61,6 @@
*/
public class CollectiveAttributeInterceptor extends BaseInterceptor
{
- /** The global registries */
- private Registries registries;
-
/** The attributeType registry */
private AttributeTypeRegistry atRegistry;
@@ -88,7 +85,7 @@
}
String[] retAttrs = operation.getSearchControls().getReturningAttributes();
- addCollectiveAttributes( name, result, retAttrs );
+ addCollectiveAttributes( operation, result, retAttrs );
return true;
}
};
@@ -99,7 +96,6 @@
nexus = directoryService.getPartitionNexus();
atRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
collectiveAttributesSchemaChecker = new CollectiveAttributesSchemaChecker( nexus, atRegistry );
- registries = directoryService.getRegistries();
}
@@ -109,12 +105,14 @@
* attributes that are specified to be excluded via the 'collectiveExclusions'
* attribute in the entry.
*
- * @param normName name of the entry being processed
+ * @param opContext the context of the operation collective attributes
+ * are added to
* @param entry the entry to have the collective attributes injected
* @param retAttrs array or attribute type to be specifically included in the result entry(s)
* @throws NamingException if there are problems accessing subentries
*/
- private void addCollectiveAttributes( LdapDN normName, ClonedServerEntry entry, String[] retAttrs ) throws Exception
+ private void addCollectiveAttributes( OperationContext opContext, ClonedServerEntry entry,
+ String[] retAttrs ) throws Exception
{
EntryAttribute collectiveAttributeSubentries =
entry.getOriginalEntry().get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
@@ -197,7 +195,7 @@
{
String subentryDnStr = ( String ) value.get();
LdapDN subentryDn = new LdapDN( subentryDnStr );
- ServerEntry subentry = nexus.lookup( new LookupOperationContext( registries, subentryDn ) );
+ ServerEntry subentry = nexus.lookup( new LookupOperationContext( opContext.getSession(), subentryDn ) );
for ( AttributeType attributeType:subentry.getAttributeTypes() )
{
@@ -306,11 +304,11 @@
if ( ( opContext.getAttrsId() == null ) || ( opContext.getAttrsId().size() == 0 ) )
{
- addCollectiveAttributes( opContext.getDn(), result, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+ addCollectiveAttributes( opContext, result, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
}
else
{
- addCollectiveAttributes( opContext.getDn(), result, opContext.getAttrsIdArray() );
+ addCollectiveAttributes( opContext, result, opContext.getAttrsIdArray() );
}
return result;
@@ -348,7 +346,7 @@
public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
{
- collectiveAttributesSchemaChecker.checkModify( opContext.getRegistries(),opContext.getDn(), opContext.getModItems() );
+ collectiveAttributesSchemaChecker.checkModify( opContext,opContext.getDn(), opContext.getModItems() );
next.modify( opContext );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Mon Jun 2 07:00:23 2008
@@ -17,9 +17,9 @@
* under the License.
*
*/
-
package org.apache.directory.server.core.collective;
+
import java.util.List;
import java.util.Set;
@@ -29,9 +29,9 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.entry.ServerEntryUtils;
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.PartitionNexus;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Modification;
@@ -78,13 +78,13 @@
}
}
- public void checkModify( Registries registries, LdapDN normName, List<Modification> mods ) throws Exception
+ public void checkModify( OperationContext opContext, LdapDN normName, List<Modification> mods ) throws Exception
{
- ServerEntry originalEntry = nexus.lookup( new LookupOperationContext( registries, normName ) );
+ ServerEntry originalEntry = nexus.lookup( new LookupOperationContext( opContext.getSession(), normName ) );
ServerEntry targetEntry = ServerEntryUtils.toServerEntry(
SchemaUtils.getTargetEntry( ServerEntryUtils.toModificationItemImpl( mods ), ServerEntryUtils.toAttributesImpl( originalEntry ) ),
normName,
- registries);
+ opContext.getSession().getDirectoryService().getRegistries() );
EntryAttribute targetObjectClasses = targetEntry.get( SchemaConstants.OBJECT_CLASS_AT );
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Mon Jun 2 07:00:23 2008
@@ -30,6 +30,7 @@
import java.util.Set;
import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.ClonedServerEntry;
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.interceptor.BaseInterceptor;
import org.apache.directory.server.core.interceptor.NextInterceptor;
@@ -39,16 +40,14 @@
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.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.invocation.Invocation;
-import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.server.core.normalization.NormalizingVisitor;
+import org.apache.directory.server.core.partition.ByPassConstants;
import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.server.schema.ConcreteNameComponentNormalizer;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
import org.apache.directory.server.schema.registries.OidRegistry;
-import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.filter.AndNode;
import org.apache.directory.shared.ldap.filter.BranchNode;
@@ -115,6 +114,7 @@
* @param namingListener the naming listener to register
* @throws Exception if there are failures adding the naming listener
*/
+ @SuppressWarnings("unchecked")
public void addNamingListener( EventContext ctx, LdapDN name, ExprNode filter, SearchControls searchControls,
NamingListener namingListener ) throws Exception
{
@@ -203,6 +203,7 @@
}
+ @SuppressWarnings("unchecked")
public void removeNamingListener( EventContext ctx, NamingListener namingListener )
{
Object obj = sources.get( namingListener );
@@ -274,7 +275,7 @@
public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
{
LdapDN name = opContext.getDn();
- ServerEntry entry = nexus.lookup( new LookupOperationContext( opContext.getRegistries(), name ) );
+ ServerEntry entry = nexus.lookup( new LookupOperationContext( opContext.getSession(), name ) );
next.delete( opContext );
//super.delete( next, opContext );
@@ -304,10 +305,10 @@
}
- private void notifyOnModify( Registries registries, LdapDN name, List<Modification> mods, ServerEntry oriEntry )
+ private void notifyOnModify( OperationContext opContext, LdapDN name, List<Modification> mods, ServerEntry oriEntry )
throws Exception
{
- ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, name ) );
+ ServerEntry entry = nexus.lookup( new LookupOperationContext( opContext.getSession(), name ) );
Set<EventSourceRecord> selecting = getSelectingSources( name, entry );
if ( selecting.isEmpty() )
@@ -336,21 +337,15 @@
public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
{
- Invocation invocation = InvocationStack.getInstance().peek();
- PartitionNexusProxy proxy = invocation.getProxy();
- ServerEntry oriEntry = proxy.lookup(
- new LookupOperationContext( opContext.getRegistries(), opContext.getDn() ),
- PartitionNexusProxy.LOOKUP_BYPASS );
-
+ ClonedServerEntry oriEntry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS );
next.modify( opContext );
-
- notifyOnModify( opContext.getRegistries(), opContext.getDn(), opContext.getModItems(), oriEntry );
+ notifyOnModify( opContext, opContext.getDn(), opContext.getModItems(), oriEntry );
}
- private void notifyOnNameChange( Registries registries, LdapDN oldName, LdapDN newName ) throws Exception
+ private void notifyOnNameChange( OperationContext opContext, LdapDN oldName, LdapDN newName ) throws Exception
{
- ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, newName ) );
+ ClonedServerEntry entry = opContext.lookup( newName, null );
Set<EventSourceRecord> selecting = getSelectingSources( oldName, entry );
if ( selecting.isEmpty() )
@@ -386,7 +381,7 @@
newName.remove( newName.size() - 1 );
newName.add( opContext.getNewRdn() );
newName.normalize( attributeRegistry.getNormalizerMapping() );
- notifyOnNameChange( opContext.getRegistries(), opContext.getDn(), newName );
+ notifyOnNameChange( opContext, opContext.getDn(), newName );
}
@@ -397,7 +392,7 @@
LdapDN newName = ( LdapDN ) opContext.getParent().clone();
newName.add( opContext.getNewRdn() );
- notifyOnNameChange( opContext.getRegistries(), opContext.getDn(), newName );
+ notifyOnNameChange( opContext, opContext.getDn(), newName );
}
@@ -410,15 +405,16 @@
LdapDN newName = ( LdapDN ) opContext.getParent().clone();
newName.add( oriChildName.get( oriChildName.size() - 1 ) );
- notifyOnNameChange( opContext.getRegistries(), oriChildName, newName );
+ notifyOnNameChange( opContext, oriChildName, newName );
}
+ @SuppressWarnings("unchecked")
Set<EventSourceRecord> getSelectingSources( LdapDN name, ServerEntry entry ) throws Exception
{
if ( sources.isEmpty() )
{
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
Set<EventSourceRecord> selecting = new HashSet<EventSourceRecord>();
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Mon Jun 2 07:00:23 2008
@@ -39,14 +39,11 @@
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.interceptor.context.RenameOperationContext;
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.invocation.Invocation;
-import org.apache.directory.server.core.invocation.InvocationStack;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Modification;
@@ -79,9 +76,6 @@
*/
public class ExceptionInterceptor extends BaseInterceptor
{
- /** The global registries */
- private Registries registries;
-
private PartitionNexus nexus;
private LdapDN subschemSubentryDn;
@@ -129,7 +123,6 @@
Value<?> attr = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
subschemSubentryDn = new LdapDN( ( String ) attr.get() );
subschemSubentryDn.normalize( normalizerMap );
- registries = directoryService.getRegistries();
}
@@ -153,7 +146,7 @@
}
// check if the entry already exists
- if ( nextInterceptor.hasEntry( new EntryOperationContext( registries, name ) ) )
+ if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), name ) ) )
{
LdapNameAlreadyBoundException ne = new LdapNameAlreadyBoundException( name.getUpName() + " already exists!" );
ne.setResolvedName( new LdapDN( name.getUpName() ) );
@@ -179,13 +172,14 @@
try
{
- attrs = nextInterceptor.lookup( new LookupOperationContext( registries, parentDn ) );
+ attrs = nextInterceptor.lookup( opContext.newLookupContext( parentDn ) );
}
catch ( Exception e )
{
LdapNameNotFoundException e2 = new LdapNameNotFoundException( "Parent " + parentDn.getUpName()
+ " not found" );
- e2.setResolvedName( new LdapDN( nexus.getMatchedName( new GetMatchedNameOperationContext( registries, parentDn ) ).getUpName() ) );
+ e2.setResolvedName( new LdapDN( nexus.getMatchedName(
+ new GetMatchedNameOperationContext( opContext.getSession(), parentDn ) ).getUpName() ) );
throw e2;
}
@@ -230,11 +224,11 @@
// check if entry to delete exists
String msg = "Attempt to delete non-existant entry: ";
- assertHasEntry( nextInterceptor, msg, name );
+ assertHasEntry( nextInterceptor, opContext, msg, name );
// check if entry to delete has children (only leaves can be deleted)
boolean hasChildren = false;
- EntryFilteringCursor list = nextInterceptor.list( new ListOperationContext( registries, name ) );
+ EntryFilteringCursor list = nextInterceptor.list( new ListOperationContext( opContext.getSession(), name ) );
if ( list.next() )
{
@@ -275,7 +269,7 @@
// check if entry to search exists
String msg = "Attempt to search under non-existant entry: ";
- assertHasEntry( nextInterceptor, msg, opContext.getDn() );
+ assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
return nextInterceptor.list( opContext );
}
@@ -293,7 +287,7 @@
// check if entry to lookup exists
String msg = "Attempt to lookup non-existant entry: ";
- assertHasEntry( nextInterceptor, msg, opContext.getDn() );
+ assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
return nextInterceptor.lookup( opContext );
}
@@ -316,9 +310,9 @@
return;
}
- assertHasEntry( nextInterceptor, msg, opContext.getDn() );
+ assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
- ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, opContext.getDn() ) );
+ ServerEntry entry = nexus.lookup( opContext.newLookupContext( opContext.getDn() ) );
List<Modification> items = opContext.getModItems();
for ( Modification item : items )
@@ -376,7 +370,7 @@
// check if entry to rename exists
String msg = "Attempt to rename non-existant entry: ";
- assertHasEntry( nextInterceptor, msg, dn );
+ assertHasEntry( nextInterceptor, opContext, msg, dn );
// check to see if target entry exists
LdapDN newDn = ( LdapDN ) dn.clone();
@@ -384,7 +378,7 @@
newDn.add( opContext.getNewRdn() );
newDn.normalize( normalizerMap );
- if ( nextInterceptor.hasEntry( new EntryOperationContext( registries, newDn ) ) )
+ if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), newDn ) ) )
{
LdapNameAlreadyBoundException e;
e = new LdapNameAlreadyBoundException( "target entry " + newDn.getUpName() + " already exists!" );
@@ -424,18 +418,18 @@
// check if child to move exists
String msg = "Attempt to move to non-existant parent: ";
- assertHasEntry( nextInterceptor, msg, oriChildName );
+ assertHasEntry( nextInterceptor, opContext, msg, oriChildName );
// check if parent to move to exists
msg = "Attempt to move to non-existant parent: ";
- assertHasEntry( nextInterceptor, msg, newParentName );
+ assertHasEntry( nextInterceptor, opContext, msg, newParentName );
// check to see if target entry exists
String rdn = oriChildName.get( oriChildName.size() - 1 );
LdapDN target = ( LdapDN ) newParentName.clone();
target.add( rdn );
- if ( nextInterceptor.hasEntry( new EntryOperationContext( registries, target ) ) )
+ if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), target ) ) )
{
// we must calculate the resolved name using the user provided Rdn value
String upRdn = new LdapDN( oriChildName.getUpName() ).get( oriChildName.size() - 1 );
@@ -480,17 +474,17 @@
// check if child to move exists
String msg = "Attempt to move to non-existant parent: ";
- assertHasEntry( nextInterceptor, msg, oriChildName );
+ assertHasEntry( nextInterceptor, opContext, msg, oriChildName );
// check if parent to move to exists
msg = "Attempt to move to non-existant parent: ";
- assertHasEntry( nextInterceptor, msg, parent );
+ assertHasEntry( nextInterceptor, opContext, msg, parent );
// check to see if target entry exists
LdapDN target = ( LdapDN ) parent.clone();
target.add( opContext.getNewRdn() );
- if ( nextInterceptor.hasEntry( new EntryOperationContext( registries, target ) ) )
+ if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), target ) ) )
{
// we must calculate the resolved name using the user provided Rdn value
LdapDN upTarget = ( LdapDN ) parent.clone();
@@ -531,7 +525,7 @@
if ( !base.isEmpty() && !( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )
{
// We just check that the entry exists only if we didn't found any entry
- assertHasEntry( nextInterceptor, "Attempt to search under non-existant entry:" , base );
+ assertHasEntry( nextInterceptor, opContext, "Attempt to search under non-existant entry:" , base );
}
}
@@ -540,7 +534,7 @@
catch ( Exception ne )
{
String msg = "Attempt to search under non-existant entry: ";
- assertHasEntry( nextInterceptor, msg, base );
+ assertHasEntry( nextInterceptor, opContext, msg, base );
throw ne;
}
}
@@ -555,17 +549,15 @@
* @throws Exception if the entry does not exist
* @param nextInterceptor the next interceptor in the chain
*/
- private void assertHasEntry( NextInterceptor nextInterceptor, String msg, LdapDN dn ) throws Exception
+ private void assertHasEntry( NextInterceptor nextInterceptor, OperationContext opContext,
+ String msg, LdapDN dn ) throws Exception
{
if ( subschemSubentryDn.getNormName().equals( dn.getNormName() ) )
{
return;
}
- Invocation invocation = InvocationStack.getInstance().peek();
- PartitionNexusProxy proxy = invocation.getProxy();
-
- if ( !nextInterceptor.hasEntry( new EntryOperationContext( registries, dn ) ) )
+ if ( !nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), dn ) ) )
{
LdapNameNotFoundException e;
@@ -580,8 +572,8 @@
e.setResolvedName(
new LdapDN(
- proxy.getMatchedName(
- new GetMatchedNameOperationContext( registries, dn ) ).getUpName() ) );
+ opContext.getSession().getDirectoryService().getOperationManager().getMatchedName(
+ new GetMatchedNameOperationContext( opContext.getSession(), dn ) ).getUpName() ) );
throw e;
}
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Mon Jun 2 07:00:23 2008
@@ -39,16 +39,15 @@
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.interceptor.context.RemoveContextPartitionOperationContext;
import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.core.jndi.ServerContext;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.Context;
-import javax.naming.ldap.LdapContext;
import java.util.Iterator;
@@ -75,23 +74,24 @@
}
/**
+ * TODO delete this since it uses static access
* Returns {@link LdapPrincipal} of current context.
* @return the authenticated principal
*/
public static LdapPrincipal getPrincipal()
{
- ServerContext ctx = ( ServerContext ) getContext();
- return ctx.getPrincipal();
+ return getContext().getSession().getEffectivePrincipal();
}
/**
+ * TODO delete this since it uses static access
* Returns the current JNDI {@link Context}.
* @return the context on the invocation stack
*/
- public static LdapContext getContext()
+ public static OperationContext getContext()
{
- return ( LdapContext ) InvocationStack.getInstance().peek().getCaller();
+ return InvocationStack.getInstance().peek();
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Mon Jun 2 07:00:23 2008
@@ -44,14 +44,14 @@
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.interceptor.context.RemoveContextPartitionOperationContext;
import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
-import org.apache.directory.server.core.invocation.Invocation;
import org.apache.directory.server.core.invocation.InvocationStack;
+import org.apache.directory.server.core.partition.ByPassConstants;
import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -506,13 +506,13 @@
return head;
}
- Invocation invocation = InvocationStack.getInstance().peek();
- if ( !invocation.hasBypass() )
+ OperationContext opContext = InvocationStack.getInstance().peek();
+ if ( !opContext.hasBypass() )
{
return head;
}
- if ( invocation.isBypassed( PartitionNexusProxy.BYPASS_ALL ) )
+ if ( opContext.isBypassed( ByPassConstants.BYPASS_ALL ) )
{
return tail;
}
@@ -520,7 +520,7 @@
Entry next = head;
while ( next != tail )
{
- if ( invocation.isBypassed( next.getName() ) )
+ if ( opContext.isBypassed( next.getName() ) )
{
next = next.nextEntry;
}
@@ -987,8 +987,8 @@
return Entry.this.nextEntry;
}
- Invocation invocation = InvocationStack.getInstance().peek();
- if ( !invocation.hasBypass() )
+ OperationContext opContext = InvocationStack.getInstance().peek();
+ if ( !opContext.hasBypass() )
{
return Entry.this.nextEntry;
}
@@ -1004,7 +1004,7 @@
Entry next = Entry.this.nextEntry;
while ( next != tail )
{
- if ( invocation.isBypassed( next.getName() ) )
+ if ( opContext.isBypassed( next.getName() ) )
{
next = next.nextEntry;
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java Mon Jun 2 07:00:23 2008
@@ -20,14 +20,15 @@
package org.apache.directory.server.core.interceptor.context;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.naming.ldap.Control;
-import org.apache.directory.server.core.invocation.Invocation;
-import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.server.core.CoreSession;
+import org.apache.directory.server.core.entry.ClonedServerEntry;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -45,9 +46,6 @@
/** The DN associated with the context */
private LdapDN dn;
- /** The principal DN associated with the context */
- private LdapDN principalDn;
-
/** The associated request's controls */
private Map<String, Control> requestControls = new HashMap<String, Control>(4);
@@ -57,52 +55,44 @@
/** A flag to tell that this is a collateral operation */
private boolean collateralOperation;
- /** The global registries reference */
- private Registries registries;
+ /** the Interceptors bypassed by this operation */
+ private Collection<String> bypassed;
+
+ private CoreSession session;
- /**
- * TODO this is temporary and needs to be removed as soon as the
- * InvocationStack is removed.
- */
- private Invocation invocation;
-
/**
* Creates a new instance of AbstractOperationContext.
- *
- * @param registries The global registries
*/
- public AbstractOperationContext( Registries registries )
+ public AbstractOperationContext( CoreSession session )
{
- this.registries = registries;
+ this.session = session;
}
/**
* Creates a new instance of AbstractOperationContext.
*
- * @param registries The global registries
* @param dn The associated DN
*/
- public AbstractOperationContext( Registries registries, LdapDN dn )
+ public AbstractOperationContext( CoreSession session, LdapDN dn )
{
this.dn = dn;
- this.registries = registries;
+ this.session = session;
}
/**
* Creates a new instance of AbstractOperationContext.
*
- * @param registries The global registries
* @param dn the associated DN
* @param collateralOperation true if op is collateral, false otherwise
*/
- public AbstractOperationContext( Registries registries, LdapDN dn, boolean collateralOperation )
+ public AbstractOperationContext( CoreSession session, LdapDN dn, boolean collateralOperation )
{
this.dn = dn;
+ this.session = session;
this.collateralOperation = collateralOperation;
- this.registries = registries;
}
@@ -110,13 +100,24 @@
* Creates an operation context where the operation is considered a side
* effect of a direct operation.
*
- * @param registries The global registries
* @param collateralOperation true if this is a side effect operation
*/
- public AbstractOperationContext( Registries registries, boolean collateralOperation )
+ public AbstractOperationContext( CoreSession session, boolean collateralOperation )
{
+ this.session = session;
this.collateralOperation = collateralOperation;
- this.registries = registries;
+ }
+
+
+ public CoreSession getSession()
+ {
+ return session;
+ }
+
+
+ protected void setSession( CoreSession session )
+ {
+ this.session = session;
}
@@ -173,6 +174,12 @@
return requestControls.containsKey( numericOid );
}
+
+ public boolean hasRequestControls()
+ {
+ return ! requestControls.isEmpty();
+ }
+
public void addResponseControl( Control responseControl )
{
@@ -225,71 +232,77 @@
/**
- * @return The AttributeTypeRegistry
+ * @return the operation name
+ */
+ public abstract String getName();
+
+
+ /**
+ * Gets the set of bypassed Interceptors.
+ *
+ * @return the set of bypassed Interceptors
*/
- public Registries getRegistries()
+ public Collection<String> getByPassed()
{
- return registries;
+ if ( bypassed == null )
+ {
+ return Collections.emptyList();
+ }
+
+ return Collections.unmodifiableCollection( bypassed );
}
/**
- * Add the invocation into the invocation stack
+ * Sets the set of bypassed Interceptors.
*
- * @param invocation The new invocation.
+ * @param byPassed the set of bypassed Interceptors
*/
- public void push( Invocation invocation )
+ public void setByPassed( Collection<String> byPassed )
{
- this.invocation = invocation;
- InvocationStack stack = InvocationStack.getInstance();
- stack.push( invocation );
+ this.bypassed = byPassed;
}
-
+
/**
- * Remove the invocation from the invocation stack
+ * Checks to see if an Interceptor is bypassed for this operation.
+ *
+ * @param interceptorName the interceptorName of the Interceptor to check for bypass
+ * @return true if the Interceptor should be bypassed, false otherwise
*/
- public void pop()
+ public boolean isBypassed( String interceptorName )
{
- InvocationStack stack = InvocationStack.getInstance();
- stack.pop();
+ return bypassed != null && bypassed.contains( interceptorName );
}
-
-
+
+
/**
- * Set the principal DN into this context.
- *
- * @param principalDn the principal DN
+ * Checks to see if any Interceptors are bypassed by this operation.
+ *
+ * @return true if at least one bypass exists
*/
- public void setPrincipalDN( LdapDN principalDn )
+ public boolean hasBypass()
{
- this.principalDn= principalDn;
+ return bypassed != null && !bypassed.isEmpty();
}
-
- /**
- * @return the PrincipalDN
- */
- public LdapDN getPrincipalDN()
+
+ public LookupOperationContext newLookupContext( LdapDN dn )
{
- return principalDn;
+ return new LookupOperationContext( session, dn );
}
- /**
- * @return the operation name
- */
- public abstract String getName();
+ public ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception
+ {
+ return session.getDirectoryService().getOperationManager().lookup( opContext );
+ }
- /**
- * TODO this is temporary and needs to be removed as soon as the
- * InvocationStack is removed.
- *
- * @return the invocation
- */
- public Invocation getInvocation()
+ public ClonedServerEntry lookup( LdapDN dn, Collection<String> byPassed ) throws Exception
{
- return invocation;
+ LookupOperationContext opContext = newLookupContext( dn );
+ opContext.setByPassed( byPassed );
+ return session.getDirectoryService().getOperationManager().lookup( opContext );
}
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java Mon Jun 2 07:00:23 2008
@@ -20,8 +20,8 @@
package org.apache.directory.server.core.interceptor.context;
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.schema.registries.Registries;
/**
@@ -44,9 +44,9 @@
*
* @param partition The partition to add
*/
- public AddContextPartitionOperationContext( Registries registries, Partition partition )
+ public AddContextPartitionOperationContext( CoreSession session, Partition partition )
{
- super( registries );
+ super( session );
this.partition = partition;
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java Mon Jun 2 07:00:23 2008
@@ -20,8 +20,8 @@
package org.apache.directory.server.core.interceptor.context;
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -42,27 +42,27 @@
/**
* Creates a new instance of AddOperationContext.
*/
- public AddOperationContext( Registries registries )
+ public AddOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
/**
* Creates a new instance of AddOperationContext.
*/
- public AddOperationContext( Registries registries, LdapDN dn )
+ public AddOperationContext( CoreSession session, LdapDN dn )
{
- super( registries, dn );
+ super( session, dn );
}
/**
* Creates a new instance of ModifyOperationContext.
*/
- public AddOperationContext( Registries registries, ServerEntry entry )
+ public AddOperationContext( CoreSession session, ServerEntry entry )
{
- super( registries, entry.getDn() );
+ super( session, entry.getDn() );
this.entry = entry;
}
@@ -72,9 +72,9 @@
*
* @param collateralOperation whether or not this is a side-effect
*/
- public AddOperationContext( Registries registries, boolean collateralOperation )
+ public AddOperationContext( CoreSession session, boolean collateralOperation )
{
- super( registries, collateralOperation );
+ super( session, collateralOperation );
}
@@ -84,9 +84,9 @@
* @param dn the name of the entry being added
* @param collateralOperation whether or not this is a side-effect
*/
- public AddOperationContext( Registries registries, LdapDN dn, boolean collateralOperation )
+ public AddOperationContext( CoreSession session, LdapDN dn, boolean collateralOperation )
{
- super( registries, dn, collateralOperation );
+ super( session, dn, collateralOperation );
}
@@ -97,9 +97,9 @@
* @param entry the entry being added
* @param collateralOperation whether or not this is a side-effect
*/
- public AddOperationContext( Registries registries, LdapDN dn, ServerEntry entry, boolean collateralOperation )
+ public AddOperationContext( CoreSession session, LdapDN dn, ServerEntry entry, boolean collateralOperation )
{
- super( registries, dn, collateralOperation );
+ super( session, dn, collateralOperation );
this.entry = entry;
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java Mon Jun 2 07:00:23 2008
@@ -18,13 +18,16 @@
*
*/
package org.apache.directory.server.core.interceptor.context;
+
import java.util.List;
-import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.util.StringTools;
+
/**
* A Bind context used for Interceptors. It contains all the informations
* needed for the bind operation, and used by all the interceptors
@@ -43,14 +46,16 @@
/** The SASL identifier */
private String saslAuthId;
+ /** the authenticating principal's distinguished name */
+ private LdapDN principalDn;
+
+
/**
* Creates a new instance of BindOperationContext.
- *
- * @param registries The global registries
*/
- public BindOperationContext( Registries registries )
+ public BindOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
@@ -62,11 +67,13 @@
return mechanisms;
}
+
public void setMechanisms( List<String> mechanisms )
{
this.mechanisms = mechanisms;
}
+
/**
* @return The principal password
*/
@@ -75,11 +82,13 @@
return credentials;
}
+
public void setCredentials( byte[] credentials )
{
this.credentials = credentials;
}
+
/**
* @return The SASL authentication ID
*/
@@ -114,4 +123,28 @@
( ( mechanisms != null ) ? ", mechanisms : <" + StringTools.listToString( mechanisms ) + ">" : "" ) +
( saslAuthId != null ? ", saslAuthId <" + saslAuthId + ">" : "" );
}
+
+
+ /**
+ * @param principalDn the principalDn to set
+ */
+ public void setPrincipalDn( LdapDN principalDn )
+ {
+ this.principalDn = principalDn;
+ }
+
+
+ /**
+ * @return the principalDn
+ */
+ public LdapDN getPrincipalDn()
+ {
+ return principalDn;
+ }
+
+
+ public void setSession( CoreSession session )
+ {
+ super.setSession( session );
+ }
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,11 +19,13 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.util.StringTools;
+
/**
* A Compare context used for Interceptors. It contains all the informations
* needed for the compare operation, and used by all the interceptors
@@ -45,55 +47,60 @@
* Creates a new instance of CompareOperationContext.
*
*/
- public CompareOperationContext( Registries registries )
+ public CompareOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
+
/**
*
* Creates a new instance of CompareOperationContext.
*
*/
- public CompareOperationContext( Registries registries, LdapDN dn )
+ public CompareOperationContext( CoreSession session, LdapDN dn )
{
- super( registries, dn );
+ super( session, dn );
}
+
/**
*
* Creates a new instance of LookupOperationContext.
*
*/
- public CompareOperationContext( Registries registries, String oid )
+ public CompareOperationContext( CoreSession session, String oid )
{
- super( registries );
+ super( session );
this.oid = oid;
}
+
/**
*
* Creates a new instance of LookupOperationContext.
*
*/
- public CompareOperationContext( Registries registries, LdapDN dn, String oid )
+ public CompareOperationContext( CoreSession session, LdapDN dn, String oid )
{
- super( registries, dn );
+ super( session, dn );
this.oid = oid;
}
+
/**
*
* Creates a new instance of LookupOperationContext.
*
*/
- public CompareOperationContext( Registries registries, LdapDN dn, String oid, Object value )
+ public CompareOperationContext( CoreSession session, LdapDN dn, String oid, Object value )
{
- super( registries, dn );
+ super( session, dn );
this.oid = oid;
this.value = value;
}
+
/**
* @return The compared OID
*/
@@ -102,6 +109,7 @@
return oid;
}
+
/**
* Set the compared OID
* @param oid The compared OID
@@ -111,6 +119,7 @@
this.oid = oid;
}
+
/**
* @return The value to compare
*/
@@ -119,6 +128,7 @@
return value;
}
+
/**
* Set the value to compare
* @param value The value to compare
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,10 +19,12 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* A Delete context used for Interceptors. It contains all the informations
* needed for the delete operation, and used by all the interceptors
@@ -35,9 +37,9 @@
/**
* Creates a new instance of DeleteOperationContext.
*/
- public DeleteOperationContext( Registries registries )
+ public DeleteOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
@@ -46,9 +48,9 @@
*
* @param collateralOperation true if this is a side effect operation
*/
- public DeleteOperationContext( Registries registries, boolean collateralOperation )
+ public DeleteOperationContext( CoreSession session, boolean collateralOperation )
{
- super( registries, collateralOperation );
+ super( session, collateralOperation );
}
@@ -57,9 +59,9 @@
*
* @param deleteDn The entry DN to delete
*/
- public DeleteOperationContext( Registries registries, LdapDN deleteDn )
+ public DeleteOperationContext( CoreSession session, LdapDN deleteDn )
{
- super( registries, deleteDn );
+ super( session, deleteDn );
}
@@ -69,9 +71,9 @@
* @param deleteDn The entry DN to delete
* @param collateralOperation true if this is a side effect operation
*/
- public DeleteOperationContext( Registries registries, LdapDN deleteDn, boolean collateralOperation )
+ public DeleteOperationContext( CoreSession session, LdapDN deleteDn, boolean collateralOperation )
{
- super( registries, deleteDn, collateralOperation );
+ super( session, deleteDn, collateralOperation );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EmptyOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EmptyOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EmptyOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EmptyOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,9 +19,11 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* An EmptySuffix context used for Interceptors. It contains no data, and mask
* the DN in AbstractOperationContext
@@ -34,9 +36,9 @@
/**
* Creates a new instance of EmptyOperationContext.
*/
- public EmptyOperationContext( Registries registries )
+ public EmptyOperationContext( CoreSession session )
{
- super( registries, LdapDN.EMPTY_LDAPDN );
+ super( session, LdapDN.EMPTY_LDAPDN );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EntryOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EntryOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EntryOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/EntryOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,10 +19,12 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* A Entry context used for Interceptors. It contains all the informations
* needed for the hasEntry operation, and used by all the interceptors
@@ -35,9 +37,9 @@
/**
* Creates a new instance of EntryOperationContext.
*/
- public EntryOperationContext( Registries registries )
+ public EntryOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
/**
@@ -45,9 +47,9 @@
*
* @param entryDn The Entry DN to unbind
*/
- public EntryOperationContext( Registries registries, LdapDN entryDn )
+ public EntryOperationContext( CoreSession session, LdapDN entryDn )
{
- super( registries, entryDn );
+ super( session, entryDn );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedNameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedNameOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedNameOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetMatchedNameOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,9 +19,11 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* A GetMatchedName context used for Interceptors. It contains all the informations
* needed for the getMatchedName operation, and used by all the interceptors
@@ -34,9 +36,9 @@
/**
* Creates a new instance of GetMatchedNameOperationContext.
*/
- public GetMatchedNameOperationContext( Registries registries )
+ public GetMatchedNameOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
/**
@@ -44,9 +46,9 @@
*
* @param dn The DN to match
*/
- public GetMatchedNameOperationContext( Registries registries, LdapDN dn )
+ public GetMatchedNameOperationContext( CoreSession session, LdapDN dn )
{
- super( registries, dn );
+ super( session, dn );
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetRootDSEOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetRootDSEOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetRootDSEOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetRootDSEOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,9 +19,11 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* A GetRootDSE context used for Interceptors. It contains all the informations
* needed for the getRootDSE operation, and used by all the interceptors
@@ -34,9 +36,9 @@
/**
* Creates a new instance of GetRootDSEOperationContext.
*/
- public GetRootDSEOperationContext( Registries registries )
+ public GetRootDSEOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
/**
@@ -44,9 +46,9 @@
*
* @param dn The entry DN used to get the rootDSE
*/
- public GetRootDSEOperationContext( Registries registries, LdapDN dn )
+ public GetRootDSEOperationContext( CoreSession session, LdapDN dn )
{
- super( registries, dn );
+ super( session, dn );
}
/**
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetSuffixOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetSuffixOperationContext.java?rev=662440&r1=662439&r2=662440&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetSuffixOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/GetSuffixOperationContext.java Mon Jun 2 07:00:23 2008
@@ -19,9 +19,11 @@
*/
package org.apache.directory.server.core.interceptor.context;
-import org.apache.directory.server.schema.registries.Registries;
+
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.shared.ldap.name.LdapDN;
+
/**
* A GetSuffix context used for Interceptors. It contains all the informations
* needed for the GetSuffix operation, and used by all the interceptors
@@ -34,9 +36,9 @@
/**
* Creates a new instance of GetSuffixOperationContext.
*/
- public GetSuffixOperationContext( Registries registries )
+ public GetSuffixOperationContext( CoreSession session )
{
- super( registries );
+ super( session );
}
/**
@@ -44,9 +46,9 @@
*
* @param dn The DN to get the suffix from
*/
- public GetSuffixOperationContext( Registries registries, LdapDN dn )
+ public GetSuffixOperationContext( CoreSession session, LdapDN dn )
{
- super( registries, dn );
+ super( session, dn );
}