directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r572407 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: prefs/ServerSystemPreferences.java schema/SchemaService.java sp/LdapClassLoader.java subtree/SubentryService.java trigger/TriggerSpecCache.java
Date Mon, 03 Sep 2007 19:26:21 GMT
Author: elecharny
Date: Mon Sep  3 12:26:20 2007
New Revision: 572407

URL: http://svn.apache.org/viewvc?rev=572407&view=rev
Log:
Declared some more schema constants in apachedsConstants
Changed the code accordingly to use those constants instead of Strings
Remove one OC from the apache.schema (accessControlSubentry), because it was already declared
with another OID in another schema

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?rev=572407&r1=572406&r2=572407&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
Mon Sep  3 12:26:20 2007
@@ -39,6 +39,7 @@
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
@@ -194,7 +195,7 @@
         Attributes attrs = new AttributesImpl();
         Attribute attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         attr.add( SchemaConstants.TOP_OC );
-        attr.add( "prefNode" );
+        attr.add( ApacheSchemaConstants.PREF_NODE_OC );
         attr.add( SchemaConstants.EXTENSIBLE_OBJECT_OC );
         attrs.put( attr );
         attr = new AttributeImpl( "prefNodeName" );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=572407&r1=572406&r2=572407&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Mon Sep  3 12:26:20 2007
@@ -821,7 +821,7 @@
             attr.add( SchemaConstants.TOP_OC );
             attr.add( "subschema" );
             attr.add( SchemaConstants.SUBENTRY_OC );
-            attr.add( "apacheSubschema" );
+            attr.add( ApacheSchemaConstants.APACHE_SUBSCHEMA_OC );
             attrs.put( attr );
         }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java?rev=572407&r1=572406&r2=572407&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
Mon Sep  3 12:26:20 2007
@@ -28,6 +28,7 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
@@ -74,7 +75,7 @@
         
         BranchNode filter = new BranchNode( AssertionEnum.AND );
         filter.addNode( new SimpleNode( "fullyQualifiedJavaClassName", name, AssertionEnum.EQUALITY
) );
-        filter.addNode( new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, "javaClass", AssertionEnum.EQUALITY
) );
+        filter.addNode( new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, ApacheSchemaConstants.JAVA_CLASS_OC,
AssertionEnum.EQUALITY ) );
         
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=572407&r1=572406&r2=572407&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Mon Sep  3 12:26:20 2007
@@ -36,6 +36,7 @@
 import javax.naming.ldap.Control;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
@@ -199,7 +200,7 @@
                 ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, "accessControlSubentry" ) )
+        if ( AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC
) )
         {
             types |= Subentry.ACCESS_CONTROL_SUBENTRY;
         }
@@ -214,7 +215,7 @@
             types |= Subentry.COLLECTIVE_SUBENTRY;
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, "triggerExecutionSubentry" ) )
+        if ( AttributeUtils.containsValueCaseIgnore( oc, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC
) )
         {
             types |= Subentry.TRIGGER_SUBENTRY;
         }
@@ -1088,7 +1089,7 @@
     // -----------------------------------------------------------------------
 
     private ModificationItemImpl[] getOperationalModsForReplace( Name oldName, Name newName,
Subentry subentry,
-        Attributes entry ) throws NamingException
+        Attributes entry )
     {
         List<ModificationItemImpl> modList = new ArrayList<ModificationItemImpl>();
         
@@ -1170,7 +1171,6 @@
      * @throws NamingException if there are problems accessing attributes
      */
     private Attributes getSubentryOperatationalAttributes( Name name, Subentry subentry )
-        throws NamingException
     {
         Attributes operational = new AttributesImpl();
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=572407&r1=572406&r2=572407&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
Mon Sep  3 12:26:20 2007
@@ -37,6 +37,7 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
@@ -68,8 +69,6 @@
 {
     /** the attribute id for prescriptive trigger: prescriptiveTrigger */
     private static final String PRESCRIPTIVE_TRIGGER_ATTR = "prescriptiveTriggerSpecification";
-    /** the object class for trigger subentries: triggerExecutionSubentry */
-    private static final String TRIGGER_SUBENTRY_OC = "triggerExecutionSubentry";
 
     /** the logger for this class */
     private static final Logger log = LoggerFactory.getLogger( TriggerSpecCache.class );
@@ -118,7 +117,7 @@
         {
             String suffix = ( String ) suffixes.next();
             LdapDN baseDn = new LdapDN( suffix );
-            ExprNode filter = new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, TRIGGER_SUBENTRY_OC,
AssertionEnum.EQUALITY );
+            ExprNode filter = new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC,
AssertionEnum.EQUALITY );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             NamingEnumeration results = 



Mime
View raw message