You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/09/03 21:26:12 UTC

svn commit: r572406 - /directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java

Author: elecharny
Date: Mon Sep  3 12:26:12 2007
New Revision: 572406

URL: http://svn.apache.org/viewvc?rev=572406&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/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?rev=572406&r1=572405&r2=572406&view=diff
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Mon Sep  3 12:26:12 2007
@@ -44,6 +44,7 @@
 import org.apache.directory.server.changepw.ChangePasswordConfiguration;
 import org.apache.directory.server.changepw.ChangePasswordServer;
 import org.apache.directory.server.configuration.ServerStartupConfiguration;
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.server.core.partition.PartitionNexus;
@@ -332,8 +333,6 @@
 
     private final static String WINDOWSFILE_ATTR = "windowsFilePath";
     private final static String UNIXFILE_ATTR = "unixFilePath";
-    private final static String WINDOWSFILE_OC = "windowsFile";
-    private final static String UNIXFILE_OC = "unixFile";
 
     private String buildProtectedFileEntry( File ldif )
     {
@@ -353,7 +352,7 @@
     private void addFileEntry( DirContext root, File ldif ) throws NamingException
     {
 		String rdnAttr = File.separatorChar == '\\' ? WINDOWSFILE_ATTR : UNIXFILE_ATTR;    
-        String oc = File.separatorChar == '\\' ? WINDOWSFILE_OC : UNIXFILE_OC;
+        String oc = File.separatorChar == '\\' ? ApacheSchemaConstants.WINDOWS_FILE_OC : ApacheSchemaConstants.UNIX_FILE_OC;
 
         Attributes entry = new AttributesImpl( rdnAttr, getCanonical( ldif ), true );
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );