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 2011/11/10 17:21:16 UTC
svn commit: r1200408 [2/5] - in /directory/apacheds/branches/apacheds-txns:
core-api/ core-api/src/main/java/org/apache/directory/server/core/api/
core-api/src/main/java/org/apache/directory/server/core/api/interceptor/
core-api/src/main/java/org/apach...
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java Thu Nov 10 16:21:12 2011
@@ -6,22 +6,23 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.directory.server.core.api.interceptor.context;
-
+
import org.apache.commons.lang.NotImplementedException;
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.server.core.api.ReferralHandlingMode;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
@@ -49,28 +50,33 @@ public class BindOperationContext extend
/** The SASL mechanism */
private String saslMechanism;
-
+
/** The SASL identifier */
private String saslAuthId;
-
+
/** A flag to tell that this is a collateral operation */
private boolean collateralOperation;
-
+
private ReferralHandlingMode referralHandlingMode;
-
+
/** The IoSession if any */
private IoSession ioSession;
-
+
/**
* Creates a new instance of BindOperationContext.
*/
public BindOperationContext( CoreSession session )
{
super( session );
+
+ if ( session != null )
+ {
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.BIND ) );
+ }
}
-
+
/**
* @return The authentication level. One of :
* <li>ANONYMOUS</li>
@@ -85,7 +91,7 @@ public class BindOperationContext extend
if ( ( saslMechanism == null ) )
{
// No, it's either a SIMPLE, ANONYMOUS, UNAUTHENT or an error
- //
+ //
if ( dn.isEmpty() )
{
if ( Strings.isEmpty(credentials) )
@@ -114,8 +120,8 @@ public class BindOperationContext extend
return AuthenticationLevel.STRONG;
}
}
-
-
+
+
/**
* @return the SASL mechanisms
*/
@@ -124,13 +130,13 @@ public class BindOperationContext extend
return saslMechanism;
}
-
+
public void setSaslMechanism( String saslMechanism )
{
this.saslMechanism = saslMechanism;
}
-
+
/**
* @return The principal password
*/
@@ -139,13 +145,13 @@ public class BindOperationContext extend
return credentials;
}
-
+
public void setCredentials( byte[] credentials )
{
this.credentials = credentials;
}
-
+
/**
* @return The SASL authentication ID
*/
@@ -159,14 +165,14 @@ public class BindOperationContext extend
{
this.saslAuthId = saslAuthId;
}
-
-
+
+
public boolean isSaslBind()
{
return saslMechanism != null;
}
-
-
+
+
/**
* @return the operation name
*/
@@ -223,8 +229,8 @@ public class BindOperationContext extend
{
throw new NotImplementedException( I18n.err( I18n.ERR_320 ) );
}
-
-
+
+
/**
* {@inheritDoc}
*/
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java Thu Nov 10 16:21:12 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.entry.BinaryValue;
import org.apache.directory.shared.ldap.model.entry.Value;
import org.apache.directory.shared.ldap.model.message.CompareRequest;
@@ -57,6 +58,7 @@ public class CompareOperationContext ext
public CompareOperationContext( CoreSession session )
{
super( session );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
}
@@ -68,6 +70,7 @@ public class CompareOperationContext ext
public CompareOperationContext( CoreSession session, Dn dn )
{
super( session, dn );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
}
@@ -80,6 +83,7 @@ public class CompareOperationContext ext
{
super( session );
this.oid = oid;
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
}
@@ -92,6 +96,7 @@ public class CompareOperationContext ext
{
super( session, dn );
this.oid = oid;
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
}
@@ -105,6 +110,7 @@ public class CompareOperationContext ext
super( session, dn );
this.oid = oid;
this.value = value;
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
}
@@ -114,6 +120,7 @@ public class CompareOperationContext ext
this.oid = compareRequest.getAttributeId();
this.value = compareRequest.getAssertionValue();
this.requestControls = compareRequest.getControls();
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
if ( requestControls.containsKey( ManageDsaIT.OID ) )
{
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java Thu Nov 10 16:21:12 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.message.DeleteRequest;
import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
@@ -42,6 +43,7 @@ public class DeleteOperationContext exte
public DeleteOperationContext( CoreSession session )
{
super( session );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
}
@@ -53,12 +55,14 @@ public class DeleteOperationContext exte
public DeleteOperationContext( CoreSession session, Dn deleteDn )
{
super( session, deleteDn );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
}
public DeleteOperationContext( CoreSession session, DeleteRequest deleteRequest )
{
super( session, deleteRequest.getName() );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
requestControls = deleteRequest.getControls();
if ( requestControls.containsKey( ManageDsaIT.OID ) )
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EntryOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EntryOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EntryOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EntryOperationContext.java Thu Nov 10 16:21:12 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.model.name.Dn;
@@ -39,6 +40,7 @@ public class EntryOperationContext exten
public EntryOperationContext( CoreSession session )
{
super( session );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
}
/**
@@ -49,6 +51,7 @@ public class EntryOperationContext exten
public EntryOperationContext( CoreSession session, Dn entryDn )
{
super( session, entryDn );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDSEOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDSEOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDSEOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDSEOperationContext.java Thu Nov 10 16:21:12 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.name.Dn;
@@ -38,8 +39,10 @@ public class GetRootDSEOperationContext
public GetRootDSEOperationContext( CoreSession session )
{
super( session );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
}
+
/**
* Creates a new instance of GetRootDSEOperationContext.
*
@@ -48,8 +51,10 @@ public class GetRootDSEOperationContext
public GetRootDSEOperationContext( CoreSession session, Dn dn )
{
super( session, dn );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
}
+
/**
* @return the operation name
*/
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.directory.server.core.api.interceptor.context;
@@ -23,6 +23,7 @@ package org.apache.directory.server.core
import java.util.Set;
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.apache.directory.shared.ldap.model.schema.AttributeTypeOptions;
@@ -41,6 +42,7 @@ public class ListOperationContext extend
public ListOperationContext( CoreSession session )
{
super( session );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
}
@@ -52,6 +54,7 @@ public class ListOperationContext extend
public ListOperationContext( CoreSession session, Dn dn )
{
super( session, dn );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
}
@@ -66,6 +69,7 @@ public class ListOperationContext extend
public ListOperationContext( CoreSession session, Dn dn, Set<AttributeTypeOptions> returningAttributes )
{
super( session, dn, returningAttributes );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
}
@@ -77,7 +81,7 @@ public class ListOperationContext extend
return "List";
}
-
+
/**
* @see Object#toString()
*/
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.directory.server.core.api.interceptor.context;
@@ -25,6 +25,7 @@ import java.util.Arrays;
import java.util.List;
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.apache.directory.shared.util.Strings;
@@ -62,6 +63,11 @@ public class LookupOperationContext exte
public LookupOperationContext( CoreSession session )
{
super( session );
+
+ if ( session != null )
+ {
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LOOKUP ) );
+ }
}
@@ -73,6 +79,11 @@ public class LookupOperationContext exte
public LookupOperationContext( CoreSession session, Dn dn )
{
super( session, dn );
+
+ if ( session != null )
+ {
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LOOKUP ) );
+ }
}
@@ -85,6 +96,11 @@ public class LookupOperationContext exte
{
super( session );
setAttrsId( attrsId );
+
+ if ( session != null )
+ {
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LOOKUP ) );
+ }
}
@@ -97,6 +113,11 @@ public class LookupOperationContext exte
{
super( session, dn );
setAttrsId( attrsId );
+
+ if ( session != null )
+ {
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LOOKUP ) );
+ }
}
@@ -128,7 +149,7 @@ public class LookupOperationContext exte
{
this.attrsId = new ArrayList<String>( Arrays.asList( attrsId ) );
- // filter out the '+' and '*' and set boolean parameters
+ // filter out the '+' and '*' and set boolean parameters
for ( String id : this.attrsId )
{
if ( id.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java Thu Nov 10 16:21:12 2011
@@ -272,6 +272,22 @@ public interface OperationContext
*/
Collection<String> getByPassed();
+ /**
+ * Gets the next interceptor in the list of interceptors. The
+ * position in the list will be incremented.
+ *
+ * @return The next interceptor from the list of interceptors
+ */
+ String getNextInterceptor();
+
+
+ /**
+ * Sets the list of interceptors to go through for an operation
+ *
+ * @param interceptors The list of interceptors
+ */
+ void setInterceptors( List<String> interceptors );
+
/**
* Sets the set of bypassed Interceptors.
@@ -312,7 +328,14 @@ public interface OperationContext
void add( Entry entry, Collection<String> byPass ) throws LdapException;
- void delete( Dn dn, Collection<String> byPass ) throws LdapException;
+ /**
+ * Process the delete for inner operations. This is only valid for SubschemaSubentry
+ * operations, and will most certainly be removed later.
+ *
+ * @param dn
+ * @throws LdapException
+ */
+ void delete( Dn dn ) throws LdapException;
/**
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java Thu Nov 10 16:21:12 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.model.message.UnbindRequest;
@@ -39,13 +40,15 @@ public class UnbindOperationContext exte
public UnbindOperationContext( CoreSession session )
{
super( session, session.getEffectivePrincipal().getDn() );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
}
public UnbindOperationContext( CoreSession session, UnbindRequest unbindRequest )
{
super( session, session.getEffectivePrincipal().getDn() );
- this.setRequestControls( unbindRequest.getControls() );
+ setRequestControls( unbindRequest.getControls() );
+ setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java Thu Nov 10 16:21:12 2011
@@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.directory.server.constants.ApacheSchemaConstants;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
@@ -39,7 +40,6 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
import org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext;
import org.apache.directory.server.core.api.partition.AbstractPartition;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.server.core.api.schema.registries.synchronizers.RegistrySynchronizerAdaptor;
import org.apache.directory.server.i18n.I18n;
@@ -335,6 +335,7 @@ public final class SchemaPartition exten
{
LookupOperationContext lookupCtx = new LookupOperationContext( modifyContext.getSession(), modifyContext.getDn() );
entry = wrapped.lookup( lookupCtx );
+ modifyContext.setEntry( entry );
}
Entry targetEntry = ( Entry ) SchemaUtils.getTargetEntry( modifyContext.getModItems(), entry );
@@ -361,7 +362,10 @@ public final class SchemaPartition exten
public void move( MoveOperationContext moveContext ) throws LdapException
{
boolean cascade = moveContext.hasRequestControl( Cascade.OID );
- Entry entry = moveContext.lookup( moveContext.getDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+
+ CoreSession session = moveContext.getSession();
+ LookupOperationContext lookupContext = new LookupOperationContext( session, moveContext.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ Entry entry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
synchronizer.move( moveContext, entry, cascade );
wrapped.move( moveContext );
updateSchemaModificationAttributes( moveContext );
@@ -374,7 +378,9 @@ public final class SchemaPartition exten
public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
boolean cascade = moveAndRenameContext.hasRequestControl( Cascade.OID );
- Entry entry = moveAndRenameContext.lookup( moveAndRenameContext.getDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ CoreSession session = moveAndRenameContext.getSession();
+ LookupOperationContext lookupContext = new LookupOperationContext( session, moveAndRenameContext.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ Entry entry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
synchronizer.moveAndRename( moveAndRenameContext, entry, cascade );
wrapped.moveAndRename( moveAndRenameContext );
updateSchemaModificationAttributes( moveAndRenameContext );
@@ -452,7 +458,12 @@ public final class SchemaPartition exten
ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT, schemaManager
.lookupAttributeTypeRegistry( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT ), modifiersName ) ) );
- opContext.modify( SCHEMA_MODIFICATION_DN, mods, ByPassConstants.SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS );
+ // operation reached this level means all the necessary ACI and other checks should
+ // have been done, so we can perform the below modification directly on the partition nexus
+ // without using a a bypass list
+ CoreSession session = opContext.getSession();
+ ModifyOperationContext modifyContext = new ModifyOperationContext( session, SCHEMA_MODIFICATION_DN, mods );
+ session.getDirectoryService().getPartitionNexus().modify( modifyContext );
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java Thu Nov 10 16:21:12 2011
@@ -866,6 +866,7 @@ public class MockCoreSession implements
{
EntryOperationContext hasEntryContext = new EntryOperationContext( this, dn );
OperationManager operationManager = directoryService.getOperationManager();
+
return operationManager.hasEntry( hasEntryContext );
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java Thu Nov 10 16:21:12 2011
@@ -578,4 +578,40 @@ public class MockDirectoryService implem
// TODO Auto-generated method stub
return null;
}
+
+
+ @Override
+ public List<String> getInterceptors( OperationEnum operation )
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ @Override
+ public void addFirst( Interceptor interceptor ) throws LdapException
+ {
+ // TODO Auto-generated method stub
+ }
+
+
+ @Override
+ public void addLast( Interceptor interceptor ) throws LdapException
+ {
+ // TODO Auto-generated method stub
+ }
+
+
+ @Override
+ public void addAfter( String interceptorName, Interceptor interceptor )
+ {
+ // TODO Auto-generated method stub
+ }
+
+
+ @Override
+ public void remove( String interceptorName )
+ {
+ // TODO Auto-generated method stub
+ }
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java Thu Nov 10 16:21:12 2011
@@ -24,7 +24,7 @@ import java.util.List;
import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.api.interceptor.Interceptor;
+import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
import org.apache.directory.server.core.api.interceptor.NextInterceptor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.exception.LdapException;
-public class MockInterceptor implements Interceptor
+public class MockInterceptor extends BaseInterceptor
{
final String name;
final List<MockInterceptor> interceptors;
@@ -79,77 +79,100 @@ public class MockInterceptor implements
}
- public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext getRootDseContext )
- throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
{
interceptors.add( this );
- return next.getRootDSE( getRootDseContext );
+ next.add( addContext );
}
- public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void bind( BindOperationContext bindContext ) throws LdapException
{
interceptors.add( this );
- return next.compare( compareContext );
+ next( bindContext );
}
- public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public boolean compare( CompareOperationContext compareContext ) throws LdapException
{
interceptors.add( this );
- next.delete( deleteContext );
+ return next( compareContext );
}
- public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void delete( DeleteOperationContext deleteContext ) throws LdapException
{
interceptors.add( this );
- next.add( addContext );
+ next( deleteContext );
}
- public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
{
interceptors.add( this );
- next.modify( modifyContext );
+ return next( getRootDseContext );
}
- public EntryFilteringCursor list( NextInterceptor next, ListOperationContext listContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
{
interceptors.add( this );
- return next.list( listContext );
+ return next( hasEntryContext );
}
- public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
{
interceptors.add( this );
- return next.search( searchContext );
+ return next( listContext );
}
- public Entry lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
{
interceptors.add( this );
- return next.lookup( lookupContext );
- }
-
- public boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException
- {
- interceptors.add( this );
- return next.hasEntry( hasEntryContext );
+ return next( lookupContext );
}
- public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
{
interceptors.add( this );
- next.rename( renameContext );
+ next.modify( modifyContext );
}
+ /**
+ * {@inheritDoc}
+ */
public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
{
interceptors.add( this );
@@ -157,6 +180,9 @@ public class MockInterceptor implements
}
+ /**
+ * {@inheritDoc}
+ */
public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
interceptors.add( this );
@@ -164,17 +190,33 @@ public class MockInterceptor implements
}
- public void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+ {
+ interceptors.add( this );
+ next.rename( renameContext );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
{
interceptors.add( this );
- next.bind( bindContext );
+ return next.search( searchContext );
}
- public void unbind( NextInterceptor next, UnbindOperationContext unbindContext ) throws LdapException
+ /**
+ * {@inheritDoc}
+ */
+ public void unbind( UnbindOperationContext unbindContext ) throws LdapException
{
interceptors.add( this );
- next.unbind( unbindContext );
+ next( unbindContext );
}
Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java Thu Nov 10 16:21:12 2011
@@ -250,7 +250,7 @@ public class MockOperation implements Op
}
- public void delete( Dn dn, Collection<String> bypass ) throws LdapException
+ public void delete( Dn dn ) throws LdapException
{
}
@@ -308,4 +308,20 @@ public class MockOperation implements Op
{
return false;
}
+
+
+ @Override
+ public void setInterceptors( List<String> interceptors )
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ @Override
+ public String getNextInterceptor()
+ {
+ // TODO Auto-generated method stub
+ return "";
+ }
}
Propchange: directory/apacheds/branches/apacheds-txns/core-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -3,7 +3,8 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ:980138-980934
/directory/apacheds/branches/apacheds-jdbm/core-integ:1160768-1164075
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-integ:1040956-1043765
+/directory/apacheds/branches/apacheds-osgi/core-integ:1185681-1199322
/directory/apacheds/branches/milestones/core-integ:1072812-1075328
-/directory/apacheds/trunk/core-integ:1066126-1067785,1068026-1072718,1072800-1075329
+/directory/apacheds/trunk/core-integ:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1200371
/directory/apacheds/trunk/interceptors/core-integ:1183435-1186974
/directory/studio/trunk/core-integ:1067786-1067997
Modified: directory/apacheds/branches/apacheds-txns/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/pom.xml?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/pom.xml (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/pom.xml Thu Nov 10 16:21:12 2011
@@ -29,6 +29,7 @@
<artifactId>apacheds-core-integ</artifactId>
<name>ApacheDS Core Integration</name>
+ <packaging>bundle</packaging>
<description>Integration testing framework for Apache Directory Server.</description>
@@ -61,6 +62,21 @@
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>apacheds-core-shared</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apacheds-interceptors-authn</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apacheds-interceptors-hash</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>apacheds-i18n</artifactId>
</dependency>
@@ -149,6 +165,21 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+ <Export-Package>
+ {local-packages};version=${project.version};-noimport:=true
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -390,7 +421,7 @@ WARNING: Long running integration tests
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
</profile>
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java Thu Nov 10 16:21:12 2011
@@ -47,8 +47,6 @@ import org.apache.directory.server.core.
import org.apache.directory.shared.ldap.codec.api.LdapApiService;
import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
import org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicy;
-import org.apache.directory.shared.ldap.extras.controls.ppolicy_impl.PasswordPolicyDecorator;
-import org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicyErrorEnum;
import org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicyImpl;
import org.apache.directory.shared.ldap.extras.controls.ppolicy_impl.PasswordPolicyDecorator;
import org.apache.directory.shared.ldap.model.constants.LdapSecurityConstants;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java Thu Nov 10 16:21:12 2011
@@ -27,9 +27,9 @@ import static org.junit.Assert.fail;
import java.util.Arrays;
+import org.apache.directory.server.core.annotations.CreateDS;
import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.LdapPrincipal;
-import org.apache.directory.server.core.annotations.CreateDS;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
Propchange: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -3,12 +3,13 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:980138-980934
/directory/apacheds/branches/apacheds-jdbm/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1160768-1164075
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1040956-1043765
+/directory/apacheds/branches/apacheds-osgi/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1185681-1199322
/directory/apacheds/branches/apacheds-replication/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:749790-764110
/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:806623-896441
/directory/apacheds/branches/apacheds-subtree/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:965202-966561
/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:599654-600228
/directory/apacheds/branches/milestones/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1072812-1075328
/directory/apacheds/branches/xdbm-refactoring/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:945827-946347
-/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1066126-1067785,1068026-1072718,1072800-1075329
+/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1200371
/directory/apacheds/trunk/interceptors/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1183435-1186974
/directory/studio/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1067786-1067997
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Thu Nov 10 16:21:12 2011
@@ -27,14 +27,14 @@ import java.util.UUID;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
import org.apache.directory.server.core.factory.DirectoryServiceFactory;
import org.apache.directory.server.core.factory.PartitionFactory;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.shared.ldap.model.csn.CsnFactory;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
import org.apache.directory.shared.ldap.model.entry.Entry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java Thu Nov 10 16:21:12 2011
@@ -39,8 +39,8 @@ import javax.naming.directory.SearchCont
import javax.naming.directory.SearchResult;
import javax.naming.ldap.LdapContext;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.junit.Test;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java Thu Nov 10 16:21:12 2011
@@ -39,8 +39,8 @@ import javax.naming.directory.Modificati
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.junit.Test;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java Thu Nov 10 16:21:12 2011
@@ -41,8 +41,8 @@ import javax.naming.directory.InvalidAtt
import javax.naming.directory.ModificationItem;
import javax.naming.directory.SchemaViolationException;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.junit.Test;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/RootDSEIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/RootDSEIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/RootDSEIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/RootDSEIT.java Thu Nov 10 16:21:12 2011
@@ -35,8 +35,8 @@ import javax.naming.directory.Attributes
import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.junit.Test;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java Thu Nov 10 16:21:12 2011
@@ -39,9 +39,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java Thu Nov 10 16:21:12 2011
@@ -41,9 +41,9 @@ import javax.naming.directory.SearchResu
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java Thu Nov 10 16:21:12 2011
@@ -35,9 +35,9 @@ import javax.naming.directory.BasicAttri
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java Thu Nov 10 16:21:12 2011
@@ -41,9 +41,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.Attribute;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java Thu Nov 10 16:21:12 2011
@@ -39,9 +39,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java Thu Nov 10 16:21:12 2011
@@ -38,9 +38,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java Thu Nov 10 16:21:12 2011
@@ -37,9 +37,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java Thu Nov 10 16:21:12 2011
@@ -33,9 +33,9 @@ import javax.naming.directory.DirContext
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java Thu Nov 10 16:21:12 2011
@@ -40,9 +40,9 @@ import javax.naming.directory.SearchResu
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Thu Nov 10 16:21:12 2011
@@ -41,8 +41,8 @@ import javax.naming.directory.SearchCont
import javax.naming.directory.SearchResult;
import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.integ.IntegrationUtils;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java Thu Nov 10 16:21:12 2011
@@ -72,18 +72,34 @@ public class DeletePerfIT extends Abstra
{
LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
- Dn dn = new Dn( "cn=test,dc=example,dc=com" );
- Entry entry = new DefaultEntry( getService().getSchemaManager(), dn );
+ Dn dn1 = new Dn( "cn=test,dc=example,dc=com" );
+ Entry entry = new DefaultEntry( getService().getSchemaManager(), dn1 );
entry.add( "ObjectClass", "top", "person" );
entry.add( "sn", "TEST" );
entry.add( "cn", "test" );
- connection.add(entry );
+ connection.add( entry );
- // Deletion
- dn = new Dn( "cn=test,dc=example,dc=com" );
+ Dn dn2 = new Dn( "cn=test1,cn=test,dc=example,dc=com" );
+ Entry entry2 = new DefaultEntry( getService().getSchemaManager(), dn2 );
+ entry2.add( "ObjectClass", "top", "person" );
+ entry2.add( "sn", "TEST1" );
+ entry2.add( "cn", "test1" );
+
+ connection.add( entry2 );
+
+ Dn dn3 = new Dn( "cn=test2,cn=test,dc=example,dc=com" );
+ Entry entry3 = new DefaultEntry( getService().getSchemaManager(), dn3 );
+ entry3.add( "ObjectClass", "top", "person" );
+ entry3.add( "sn", "TEST2" );
+ entry3.add( "cn", "test2" );
- connection.delete( dn );
+ connection.add( entry3 );
+
+ // Deletion
+ connection.delete( dn3 );
+ connection.delete( dn2 );
+ connection.delete( dn1 );
connection.close();
}
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java Thu Nov 10 16:21:12 2011
@@ -21,9 +21,9 @@ package org.apache.directory.server.core
import static org.junit.Assert.assertNotNull;
+import org.apache.directory.server.core.api.interceptor.context.GetRootDSEOperationContext;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.api.interceptor.context.GetRootDSEOperationContext;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.junit.Test;
import org.junit.runner.RunWith;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java Thu Nov 10 16:21:12 2011
@@ -21,9 +21,10 @@ package org.apache.directory.server.core
import static org.junit.Assert.assertTrue;
+import org.apache.directory.server.core.api.OperationEnum;
+import org.apache.directory.server.core.api.interceptor.context.EntryOperationContext;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.api.interceptor.context.EntryOperationContext;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -45,6 +46,7 @@ public class hasEntryPerfIT extends Abst
{
Dn adminDn = new Dn( "uid=admin, ou=system" );
EntryOperationContext hasEntryContext = new EntryOperationContext( getService().getAdminSession(), adminDn );
+ hasEntryContext.setInterceptors( getService().getInterceptors( OperationEnum.HAS_ENTRY ) );
boolean hasEntry = getService().getOperationManager().hasEntry( hasEntryContext );
assertTrue( hasEntry );
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfIT.java Thu Nov 10 16:21:12 2011
@@ -23,9 +23,9 @@ import static org.junit.Assert.assertEqu
import static org.junit.Assert.assertNotNull;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
+import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.junit.Test;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java Thu Nov 10 16:21:12 2011
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -53,7 +52,7 @@ public class LookupPerfIT extends Abstra
* A lookup performance test
*/
@Test
- @Ignore("Ignore atm, this is a perf test")
+ //@Ignore("Ignore atm, this is a perf test")
public void testPerfLookup() throws Exception
{
LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java Thu Nov 10 16:21:12 2011
@@ -28,12 +28,12 @@ import java.util.Set;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
import org.apache.directory.server.core.factory.DirectoryServiceFactory;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
import org.apache.directory.shared.ldap.model.entry.DefaultModification;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Thu Nov 10 16:21:12 2011
@@ -58,8 +58,8 @@ import javax.naming.directory.SearchResu
import javax.naming.ldap.LdapContext;
import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.api.entry.ServerEntryUtils;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java Thu Nov 10 16:21:12 2011
@@ -37,6 +37,7 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.core.api.sp.LdapClassLoader;
import org.apache.directory.shared.util.Base64;
import org.junit.Test;
import org.junit.runner.RunWith;
Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/resources/AliasSearchIT.ldif
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/resources/AliasSearchIT.ldif?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/resources/AliasSearchIT.ldif (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/resources/AliasSearchIT.ldif Thu Nov 10 16:21:12 2011
@@ -1,3 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# EXAMPLE.COM is reserved for testing according to this RFC:
+#
+# http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
dn: dc=example,dc=com
objectClass: domain
objectClass: top
Propchange: directory/apacheds/branches/apacheds-txns/core-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -4,6 +4,6 @@
/directory/apacheds/branches/apacheds-jdbm/core-jndi:1160768-1164075
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-jndi:1040956-1043765
/directory/apacheds/branches/milestones/core-jndi:1072812-1075328
-/directory/apacheds/trunk/core-jndi:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1186967
+/directory/apacheds/trunk/core-jndi:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1200385
/directory/apacheds/trunk/interceptors/core-jndi:1183435-1186974
/directory/studio/trunk/core-jndi:1067786-1067997
Modified: directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Thu Nov 10 16:21:12 2011
@@ -49,6 +49,7 @@ import javax.naming.spi.DirectoryManager
import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.api.LdapPrincipal;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.server.core.api.OperationManager;
import org.apache.directory.server.core.api.entry.ServerEntryUtils;
import org.apache.directory.server.core.api.event.DirectoryListener;
@@ -222,7 +223,9 @@ public abstract class ServerContext impl
session = bindContext.getSession();
OperationManager operationManager = service.getOperationManager();
- if ( ! operationManager.hasEntry( new EntryOperationContext( session, dn ) ) )
+ EntryOperationContext hasEntryContext = new EntryOperationContext( session, dn );
+
+ if ( ! operationManager.hasEntry( hasEntryContext ) )
{
throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
}
@@ -255,7 +258,9 @@ public abstract class ServerContext impl
session = new DefaultCoreSession( principal, service );
OperationManager operationManager = service.getOperationManager();
- if ( ! operationManager.hasEntry( new EntryOperationContext( session, dn ) ) )
+ EntryOperationContext hasEntryContext = new EntryOperationContext( session, dn );
+
+ if ( ! operationManager.hasEntry( hasEntryContext ) )
{
throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
}
@@ -277,7 +282,9 @@ public abstract class ServerContext impl
this.session = session;
OperationManager operationManager = service.getOperationManager();
- if ( ! operationManager.hasEntry( new EntryOperationContext( session, dn ) ) )
+ EntryOperationContext hasEntryContext = new EntryOperationContext( session, dn );
+
+ if ( ! operationManager.hasEntry( hasEntryContext ) )
{
throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
}
@@ -352,21 +359,21 @@ public abstract class ServerContext impl
protected void doDeleteOperation( Dn target ) throws Exception
{
// setup the op context and populate with request controls
- DeleteOperationContext opCtx = new DeleteOperationContext( session, target );
+ DeleteOperationContext deleteContext = new DeleteOperationContext( session, target );
- opCtx.addRequestControls( convertControls( true, requestControls ) );
+ deleteContext.addRequestControls( convertControls( true, requestControls ) );
// Inject the referral handling into the operation context
- injectReferralControl( opCtx );
+ injectReferralControl( deleteContext );
// execute delete operation
OperationManager operationManager = service.getOperationManager();
- operationManager.delete( opCtx );
+ operationManager.delete( deleteContext );
// clear the request controls and set the response controls
requestControls = EMPTY_CONTROLS;
responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(),
- opCtx.getResponseControls() );
+ deleteContext.getResponseControls() );
}
@@ -597,10 +604,11 @@ public abstract class ServerContext impl
{
GetRootDSEOperationContext getRootDseContext = new GetRootDSEOperationContext( session, target );
getRootDseContext.addRequestControls( convertControls( true, requestControls ) );
-
+
// do not reset request controls since this is not an external
// operation and not do bother setting the response controls either
OperationManager operationManager = service.getOperationManager();
+
return operationManager.getRootDSE( getRootDseContext );
}
@@ -668,6 +676,7 @@ public abstract class ServerContext impl
bindContext.setSaslMechanism( saslMechanism );
bindContext.setSaslAuthId( saslAuthId );
bindContext.addRequestControls( convertControls( true, requestControls ) );
+ bindContext.setInterceptors( getDirectoryService().getInterceptors( OperationEnum.BIND ) );
// execute bind operation
OperationManager operationManager = service.getOperationManager();
@@ -1305,7 +1314,9 @@ public abstract class ServerContext impl
try
{
- if ( operationManager.hasEntry( new EntryOperationContext( session, target ) ) )
+ EntryOperationContext hasEntryContext = new EntryOperationContext( session, target );
+
+ if ( operationManager.hasEntry( hasEntryContext ) )
{
doDeleteOperation( target );
}
Modified: directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Thu Nov 10 16:21:12 2011
@@ -49,6 +49,7 @@ import javax.naming.spi.DirectoryManager
import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.api.LdapPrincipal;
+import org.apache.directory.server.core.api.OperationEnum;
import org.apache.directory.server.core.api.entry.ServerEntryUtils;
import org.apache.directory.server.core.api.event.DirectoryListener;
import org.apache.directory.server.core.api.event.NotificationCriteria;
@@ -526,7 +527,9 @@ public abstract class ServerDirContext e
try
{
- if ( getDirectoryService().getOperationManager().hasEntry( new EntryOperationContext( getSession(), target ) ) )
+ EntryOperationContext hasEntryContext = new EntryOperationContext( getSession(), target );
+
+ if ( getDirectoryService().getOperationManager().hasEntry( hasEntryContext ) )
{
doDeleteOperation( target );
}