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/01/18 10:02:51 UTC
svn commit: r1060246 - in /directory/apacheds/trunk:
core-api/src/main/java/org/apache/directory/server/core/interceptor/
core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/
core-integ/src/test/java/org/apache/directory/server/...
Author: elecharny
Date: Tue Jan 18 09:02:50 2011
New Revision: 1060246
URL: http://svn.apache.org/viewvc?rev=1060246&view=rev
Log:
Moved the AttributeType initialization into the BaseInterceptor class
Modified:
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Tue Jan 18 09:02:50 2011
@@ -44,6 +44,7 @@ import org.apache.directory.server.core.
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.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -68,6 +69,52 @@ public abstract class BaseInterceptor im
/** set of operational attribute types used for representing the password policy state of a user entry */
protected static final Set<AttributeType> PWD_POLICY_STATE_ATTRIBUTE_TYPES = new HashSet<AttributeType>();
+ /** The AccessControlSubentries AttributeType */
+ protected static AttributeType ACCESS_CONTROL_SUBENTRIES_AT;
+
+ /** A reference to the AdministrativeRole AT */
+ protected static AttributeType ADMINISTRATIVE_ROLE_AT;
+
+ /** The CollectiveAttributeSubentries AttributeType */
+ protected static AttributeType COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT;
+
+ /** The CollectiveExclusions AttributeType */
+ protected static AttributeType COLLECTIVE_EXCLUSIONS_AT;
+
+ /** A storage for the entryACI attributeType */
+ protected static AttributeType ENTRY_ACI_AT;
+
+ /** A reference to the EntryCSN AT */
+ protected static AttributeType ENTRY_CSN_AT;
+
+ /** A reference to the EntryUUID AT */
+ protected static AttributeType ENTRY_UUID_AT;
+
+ /** A reference to the ModifiersName AT */
+ protected static AttributeType MODIFIERS_NAME_AT;
+
+ /** A reference to the ModifyTimestamp AT */
+ protected static AttributeType MODIFY_TIMESTAMP_AT;
+
+ /** The ObjectClass AttributeType */
+ protected static AttributeType OBJECT_CLASS_AT;
+
+ /** the subentry ACI attribute type */
+ protected static AttributeType SUBENTRY_ACI_AT;
+
+ /** A reference to the AccessControlSubentries AT */
+ protected static AttributeType SUBSCHEMA_SUBENTRY_AT;
+
+ /** A reference to the SubtreeSpecification AT */
+ protected static AttributeType SUBTREE_SPECIFICATION_AT;
+
+ /** A reference to the TriggerExecutionSubentries AT */
+ protected static AttributeType TRIGGER_EXECUTION_SUBENTRIES_AT;
+
+ /** A starage for the uniqueMember attributeType */
+ protected static AttributeType UNIQUE_MEMBER_AT;
+
+
/**
* default interceptor name is its class, preventing accidental duplication of interceptors by naming
@@ -118,6 +165,25 @@ public abstract class BaseInterceptor im
{
this.directoryService = directoryService;
this.schemaManager = directoryService.getSchemaManager();
+
+ // Init the At we use locally
+ ACCESS_CONTROL_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
+ ADMINISTRATIVE_ROLE_AT = schemaManager.getAttributeType( SchemaConstants.ADMINISTRATIVE_ROLE_AT );
+ COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT = schemaManager
+ .getAttributeType( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ COLLECTIVE_EXCLUSIONS_AT = schemaManager.getAttributeType( SchemaConstants.COLLECTIVE_EXCLUSIONS_AT );
+ ENTRY_ACI_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_ACI_AT_OID );
+ ENTRY_CSN_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_CSN_AT );
+ ENTRY_UUID_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_UUID_AT );
+ MODIFIERS_NAME_AT = schemaManager.getAttributeType( SchemaConstants.MODIFIERS_NAME_AT );
+ MODIFY_TIMESTAMP_AT = schemaManager.getAttributeType( SchemaConstants.MODIFY_TIMESTAMP_AT );
+ OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
+ SUBENTRY_ACI_AT = schemaManager.getAttributeType( SchemaConstants.SUBENTRY_ACI_AT_OID );
+ SUBSCHEMA_SUBENTRY_AT = schemaManager.getAttributeType( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
+ SUBTREE_SPECIFICATION_AT = schemaManager.getAttributeType( SchemaConstants.SUBTREE_SPECIFICATION_AT );
+ TRIGGER_EXECUTION_SUBENTRIES_AT = schemaManager
+ .getAttributeType( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
+ UNIQUE_MEMBER_AT = schemaManager.getAttributeType( SchemaConstants.UNIQUE_MEMBER_AT_OID );
}
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java Tue Jan 18 09:02:50 2011
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.server.core.annotations.ApplyLdifs;
@@ -31,8 +30,6 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.integ.IntegrationUtils;
import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.message.Response;
-import org.apache.directory.shared.ldap.message.SearchResultEntry;
import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Ignore;
@@ -56,7 +53,7 @@ public class LookupPerfIT extends Abstra
* A lookup performance test
*/
@Test
- @Ignore
+ @Ignore("Ignore atm, this is a perf test")
public void testPerfLookup() throws Exception
{
LdapConnection connection = IntegrationUtils.getAdminConnection( service );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java Tue Jan 18 09:02:50 2011
@@ -55,8 +55,8 @@ import org.junit.runner.RunWith;
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@RunWith ( FrameworkRunner.class )
-@Ignore ( "Reverts are failing to delete marked entries. Fixing this " +
- "problem in testEntryAdd() will fix it all over." )
+@Ignore("Reverts are failing to delete marked entries. Fixing this " +
+ "problem in testEntryAdd() will fix it all over.")
public class SubentryServiceForTriggersIT extends AbstractLdapTestUnit
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java Tue Jan 18 09:02:50 2011
@@ -81,7 +81,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.message.AliasDerefMode;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.subtree.AdministrativeRole;
import org.apache.directory.shared.ldap.util.StringTools;
import org.apache.directory.shared.ldap.util.tree.DnNode;
@@ -107,12 +106,6 @@ public class AdministrativePointIntercep
/** A reference to the nexus for direct backend operations */
private PartitionNexus nexus;
- /** A reference to the AdministrativeRole AT */
- private static AttributeType ADMINISTRATIVE_ROLE_AT;
-
- /** A reference to the EntryUUID AT */
- private static AttributeType ENTRY_UUID_AT;
-
/** The possible roles */
private static final Set<String> ROLES = new HashSet<String>();
@@ -1143,10 +1136,6 @@ public class AdministrativePointIntercep
super.init( directoryService );
nexus = directoryService.getPartitionNexus();
- // Init the At we use locally
- ADMINISTRATIVE_ROLE_AT = schemaManager.getAttributeType( SchemaConstants.ADMINISTRATIVE_ROLE_AT );
- ENTRY_UUID_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_UUID_AT );
-
// Load all the AdministratvePoint :
// Autonomous Administrative Point first, then Specific
// administrative point, finally the Inner administrative Point
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Tue Jan 18 09:02:50 2011
@@ -166,18 +166,6 @@ public class AciAuthorizationInterceptor
/** the system wide subschemaSubentryDn */
private String subschemaSubentryDn;
- /** The ObjectClass AttributeType */
- private static AttributeType OBJECT_CLASS_AT;
-
- /** The AccessControlSubentries AttributeType */
- private static AttributeType ACCESS_CONTROL_SUBENTRIES_AT;
-
- /** A storage for the entryACI attributeType */
- private static AttributeType ENTRY_ACI_AT;
-
- /** the subentry ACI attribute type */
- private static AttributeType SUBENTRY_ACI_AT;
-
/** A reference to the nexus for direct backend operations */
private PartitionNexus nexus;
@@ -298,12 +286,6 @@ public class AciAuthorizationInterceptor
tupleCache = new TupleCache( adminSession );
groupCache = new GroupCache( directoryService );
- // look up some constant information
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
- ACCESS_CONTROL_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
- ENTRY_ACI_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_ACI_AT_OID );
- SUBENTRY_ACI_AT = schemaManager.getAttributeType( SchemaConstants.SUBENTRY_ACI_AT_OID );
-
// Iitialize the ACI PARSER and ACDF engine
aciParser = new ACIItemParser( new ConcreteNameComponentNormalizer( schemaManager ), schemaManager );
engine = new ACDFEngine( schemaManager );
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Tue Jan 18 09:02:50 2011
@@ -50,14 +50,12 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -88,10 +86,6 @@ public class DefaultAuthorizationInterce
private PartitionNexus nexus;
- /** A starage for the uniqueMember attributeType */
- private AttributeType uniqueMemberAT;
-
-
/**
* Creates a new instance.
*/
@@ -113,8 +107,6 @@ public class DefaultAuthorizationInterce
ADMIN_GROUP_DN = directoryService.getDNFactory().create( ServerDNConstants.ADMINISTRATORS_GROUP_DN );
- uniqueMemberAT = schemaManager.getAttributeType( SchemaConstants.UNIQUE_MEMBER_AT_OID );
-
loadAdministrators( directoryService );
}
@@ -134,7 +126,7 @@ public class DefaultAuthorizationInterce
return;
}
- EntryAttribute uniqueMember = adminGroup.get( uniqueMemberAT );
+ EntryAttribute uniqueMember = adminGroup.get( UNIQUE_MEMBER_AT );
for ( Value<?> value : uniqueMember )
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Tue Jan 18 09:02:50 2011
@@ -71,15 +71,6 @@ public class CollectiveAttributeIntercep
/** The LoggerFactory used by this Interceptor */
private static Logger LOG = LoggerFactory.getLogger( CollectiveAttributeInterceptor.class );
- /** The ObjectClass AttributeType */
- private static AttributeType OBJECT_CLASS_AT;
-
- /** The CollectiveAttributeSubentries AttributeType */
- private static AttributeType COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT;
-
- /** The CollectiveExclusions AttributeType */
- private static AttributeType COLLECTIVE_EXCLUSIONS_AT;
-
/**
* the search result filter to use for collective attribute injection
*/
@@ -103,12 +94,7 @@ public class CollectiveAttributeIntercep
{
super.init( directoryService );
- // Load some AttributeType
- COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
- COLLECTIVE_EXCLUSIONS_AT = schemaManager.getAttributeType( SchemaConstants.COLLECTIVE_EXCLUSIONS_AT );
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
-
- LOG.debug( "CollectiveAttriute interceptor initilaized" );
+ LOG.debug( "CollectiveAttribute interceptor initilaized" );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Tue Jan 18 09:02:50 2011
@@ -53,7 +53,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
/**
@@ -92,10 +91,6 @@ public class ExceptionInterceptor extend
/** Declare a default for this cache. 100 entries seems to be enough */
private static final int DEFAULT_CACHE_SIZE = 100;
- /** The ObjectClass AttributeType */
- private static AttributeType OBJECT_CLASS_AT;
-
-
/**
* Creates an interceptor that is also the exception handling service.
*/
@@ -110,9 +105,6 @@ public class ExceptionInterceptor extend
nexus = directoryService.getPartitionNexus();
Value<?> attr = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
subschemSubentryDn = directoryService.getDNFactory().create( attr.getString() );
-
- // look up some constant information
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Tue Jan 18 09:02:50 2011
@@ -111,10 +111,6 @@ public class OperationalAttributeInterce
/** The admin DN */
private DN adminDn;
- private static AttributeType MODIFIERS_NAME_ATTRIBUTE_TYPE;
- private static AttributeType MODIFY_TIMESTAMP_ATTRIBUTE_TYPE;
- private static AttributeType ENTRY_CSN_ATTRIBUTE_TYPE;
-
/**
* Creates the operational attribute management service interceptor.
*/
@@ -134,10 +130,6 @@ public class OperationalAttributeInterce
// Create the Admin DN
adminDn = directoryService.getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
-
- MODIFIERS_NAME_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.MODIFIERS_NAME_AT );
- MODIFY_TIMESTAMP_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.MODIFY_TIMESTAMP_AT );
- ENTRY_CSN_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.ENTRY_CSN_AT );
}
@@ -255,7 +247,7 @@ public class OperationalAttributeInterce
{
AttributeType attributeType = modification.getAttribute().getAttributeType();
- if ( attributeType.equals( MODIFIERS_NAME_ATTRIBUTE_TYPE ) )
+ if ( attributeType.equals( MODIFIERS_NAME_AT ) )
{
if ( !isAdmin )
{
@@ -269,7 +261,7 @@ public class OperationalAttributeInterce
}
}
- if ( attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
+ if ( attributeType.equals( MODIFY_TIMESTAMP_AT ) )
{
if ( !isAdmin )
{
@@ -283,7 +275,7 @@ public class OperationalAttributeInterce
}
}
- if ( attributeType.equals( ENTRY_CSN_ATTRIBUTE_TYPE ) )
+ if ( attributeType.equals( ENTRY_CSN_AT ) )
{
if ( !isAdmin )
{
@@ -308,7 +300,7 @@ public class OperationalAttributeInterce
if ( !modifierAtPresent )
{
// Inject the ModifiersName AT if it's not present
- EntryAttribute attribute = new DefaultEntryAttribute( MODIFIERS_NAME_ATTRIBUTE_TYPE, getPrincipal()
+ EntryAttribute attribute = new DefaultEntryAttribute( MODIFIERS_NAME_AT, getPrincipal()
.getName() );
Modification modifiersName = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
@@ -319,7 +311,7 @@ public class OperationalAttributeInterce
if ( !modifiedTimeAtPresent )
{
// Inject the ModifyTimestamp AT if it's not present
- EntryAttribute attribute = new DefaultEntryAttribute( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE, DateUtils
+ EntryAttribute attribute = new DefaultEntryAttribute( MODIFY_TIMESTAMP_AT, DateUtils
.getGeneralizedTime() );
Modification timestamp = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
@@ -330,7 +322,7 @@ public class OperationalAttributeInterce
if ( !entryCsnAtPresent )
{
String csn = directoryService.getCSN().toString();
- EntryAttribute attribute = new DefaultEntryAttribute( ENTRY_CSN_ATTRIBUTE_TYPE, csn );
+ EntryAttribute attribute = new DefaultEntryAttribute( ENTRY_CSN_AT, csn );
Modification updatedCsn = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
mods.add( updatedCsn );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Tue Jan 18 09:02:50 2011
@@ -45,7 +45,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.filter.SearchScope;
import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.util.LdapURL;
import org.apache.directory.shared.ldap.util.StringTools;
import org.slf4j.Logger;
@@ -71,10 +70,6 @@ public class ReferralInterceptor extends
/** A normalized form for the SubschemaSubentry DN */
private DN subschemaSubentryDn;
- /** The ObjectClass AttributeType */
- private static AttributeType OBJECT_CLASS_AT;
-
-
static private void checkRefAttributeValue( Value<?> value ) throws LdapException, LdapURLEncodingException
{
StringValue ref = ( StringValue ) value;
@@ -209,9 +204,6 @@ public class ReferralInterceptor extends
Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
subschemaSubentryDn = directoryService.getDNFactory().create( subschemaSubentry.getString() );
-
- // look up some constant information
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Tue Jan 18 09:02:50 2011
@@ -128,9 +128,6 @@ public class SchemaInterceptor extends B
private List<EntryFilter> filters = new ArrayList<EntryFilter>();
- /** A global reference to the ObjectClass attributeType */
- private AttributeType OBJECT_CLASS_AT;
-
/** A normalized form for the SubschemaSubentry DN */
private String subschemaSubentryDnNorm;
@@ -162,10 +159,6 @@ public class SchemaInterceptor extends B
/** A map used to store all the objectClasses allowed attributes (may + must) */
private Map<String, List<AttributeType>> allowed;
- private static AttributeType MODIFIERS_NAME_ATTRIBUTE_TYPE;
- private static AttributeType MODIFY_TIMESTAMP_ATTRIBUTE_TYPE;
- private static AttributeType ENTRY_CSN_ATTRIBUTE_TYPE;
-
/**
* Initialize the Schema Service
@@ -183,7 +176,6 @@ public class SchemaInterceptor extends B
super.init( directoryService );
nexus = directoryService.getPartitionNexus();
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
binaryAttributeFilter = new BinaryAttributeFilter();
topFilter = new TopFilter();
filters.add( binaryAttributeFilter );
@@ -207,10 +199,6 @@ public class SchemaInterceptor extends B
SchemaLoader loader = schemaService.getSchemaPartition().getSchemaManager().getLoader();
schemaSubEntryManager = new SchemaSubentryManager( schemaManager, loader, directoryService.getDNFactory() );
- MODIFIERS_NAME_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.MODIFIERS_NAME_AT );
- MODIFY_TIMESTAMP_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.MODIFY_TIMESTAMP_AT );
- ENTRY_CSN_ATTRIBUTE_TYPE = schemaManager.getAttributeType( SchemaConstants.ENTRY_CSN_AT );
-
if ( IS_DEBUG )
{
LOG.debug( "SchemaInterceptor Initialized !" );
@@ -1042,9 +1030,9 @@ public class SchemaInterceptor extends B
// We don't allow modification of operational attributes
if ( !attributeType.isUserModifiable()
- && ( !attributeType.equals( MODIFIERS_NAME_ATTRIBUTE_TYPE )
- && ( !attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
- && ( !attributeType.equals( ENTRY_CSN_ATTRIBUTE_TYPE ) )
+ && ( !attributeType.equals( MODIFIERS_NAME_AT )
+ && ( !attributeType.equals( MODIFY_TIMESTAMP_AT ) )
+ && ( !attributeType.equals( ENTRY_CSN_AT ) )
&& ( !PWD_POLICY_STATE_ATTRIBUTE_TYPES.contains( attributeType ) ) ) )
{
String msg = I18n.err( I18n.ERR_52, attributeType );
@@ -1234,7 +1222,7 @@ public class SchemaInterceptor extends B
{
AttributeType at = ( ( DefaultModification ) mod ).getAttribute().getAttributeType();
- if ( !MODIFIERS_NAME_ATTRIBUTE_TYPE.equals( at ) && !MODIFY_TIMESTAMP_ATTRIBUTE_TYPE.equals( at ) )
+ if ( !MODIFIERS_NAME_AT.equals( at ) && !MODIFY_TIMESTAMP_AT.equals( at ) )
{
cleanMods.add( mod );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Tue Jan 18 09:02:50 2011
@@ -114,27 +114,6 @@ public class SubentryInterceptor extends
/** A reference to the nexus for direct backend operations */
private PartitionNexus nexus;
- /** A reference to the ObjectClass AT */
- private static AttributeType OBJECT_CLASS_AT;
-
- /** A reference to the AdministrativeRole AT */
- private static AttributeType ADMINISTRATIVE_ROLE_AT;
-
- /** A reference to the SubtreeSpecification AT */
- private static AttributeType SUBTREE_SPECIFICATION_AT;
-
- /** A reference to the AccessControlSubentries AT */
- private static AttributeType ACCESS_CONTROL_SUBENTRIES_AT;
-
- /** A reference to the AccessControlSubentries AT */
- private static AttributeType SUBSCHEMA_SUBENTRY_AT;
-
- /** A reference to the CollectiveAttributeSubentries AT */
- private static AttributeType COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT;
-
- /** A reference to the TriggerExecutionSubentries AT */
- private static AttributeType TRIGGER_EXECUTION_SUBENTRIES_AT;
-
/** An enum used for the entries update */
private enum OperationEnum
{
@@ -200,15 +179,6 @@ public class SubentryInterceptor extends
nexus = directoryService.getPartitionNexus();
- // setup various attribute type values
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
- ADMINISTRATIVE_ROLE_AT = schemaManager.getAttributeType( SchemaConstants.ADMINISTRATIVE_ROLE_AT );
- SUBTREE_SPECIFICATION_AT = schemaManager.getAttributeType( SchemaConstants.SUBTREE_SPECIFICATION_AT );
- ACCESS_CONTROL_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
- SUBSCHEMA_SUBENTRY_AT = schemaManager.getAttributeType( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
- COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
- TRIGGER_EXECUTION_SUBENTRIES_AT = schemaManager.getAttributeType( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
-
SUBENTRY_OPATTRS = new AttributeType[]
{
ACCESS_CONTROL_SUBENTRIES_AT,
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=1060246&r1=1060245&r2=1060246&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java Tue Jan 18 09:02:50 2011
@@ -55,7 +55,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapOtherException;
import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.name.RDN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.NormalizerMappingResolver;
import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
import org.apache.directory.shared.ldap.trigger.ActionTime;
@@ -97,10 +96,6 @@ public class TriggerInterceptor extends
private StoredProcExecutionManager manager;
- /** The ObjectClass AttributeType */
- private static AttributeType OBJECT_CLASS_AT;
-
-
/**
* Adds prescriptiveTrigger TriggerSpecificaitons to a collection of
* TriggerSpeficaitions by accessing the triggerSpecCache. The trigger
@@ -237,9 +232,6 @@ public class TriggerInterceptor extends
triggerSpecCache = new TriggerSpecCache( directoryService );
- // look up some constant information
- OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
-
triggerParser = new TriggerSpecificationParser( new NormalizerMappingResolver()
{
public Map<String, OidNormalizer> getNormalizerMapping() throws Exception