directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1228663 - in /directory/apacheds/branches/apacheds-osgi: apache-felix/ component-hub/src/main/java/org/apache/directory/server/component/hub/ component-hub/src/main/java/org/apache/directory/server/component/utilities/ interceptors/admin/s...
Date Sat, 07 Jan 2012 16:52:19 GMT
Author: gokturk
Date: Sat Jan  7 16:52:18 2012
New Revision: 1228663

URL: http://svn.apache.org/viewvc?rev=1228663&view=rev
Log:
Side modifications while fixing ComponentSchemaManager's direct partition access problems.

Modified:
    directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ConfigurationManager.java
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSSchemaConstants.java
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/EntryNormalizer.java
    directory/apacheds/branches/apacheds-osgi/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java

Modified: directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml?rev=1228663&r1=1228662&r2=1228663&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml (original)
+++ directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml Sat Jan  7 16:52:18 2012
@@ -172,6 +172,7 @@
                 <include>bin/</include>
                 <include>bundle/</include>
                 <include>felix-cache/</include>
+                <include>default</include>
               </includes>
             </fileset>
           </filesets>

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ConfigurationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ConfigurationManager.java?rev=1228663&r1=1228662&r2=1228663&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ConfigurationManager.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ConfigurationManager.java
Sat Jan  7 16:52:18 2012
@@ -251,7 +251,7 @@ public class ConfigurationManager
                 "ou:" + componentName,
                 ADSSchemaConstants.ADS_COMPONENT_ATTRIB_NAME + ":" + componentName,
                 ADSSchemaConstants.ADS_COMPONENT_ATTRIB_TYPE + ":" + componentType,
-                ADSSchemaConstants.ADS_COMPONENT_ATTRIB_OC + ":" + componentOCName,
+                ADSSchemaConstants.ADS_COMPONENT_ATTRIB_OCNAME + ":" + componentOCName,
                 ADSSchemaConstants.ADS_COMPONENT_ATTRIB_PURGE + ":" + "0" ) );
 
             ldifs.add( new LdifEntry( componentInstancesDn,

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSSchemaConstants.java?rev=1228663&r1=1228662&r2=1228663&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSSchemaConstants.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSSchemaConstants.java
Sat Jan  7 16:52:18 2012
@@ -50,8 +50,8 @@ public class ADSSchemaConstants
     /*
      * Attribute name of component object class
      */
-    public static final String ADS_COMPONENT_ATTRIB_OC = "ads-ocname";
-    public static final String ADS_COMPONENT_ATTRIB_OC_OID = "1.3.6.1.4.1.18060.0.4.4.0.1.3";
+    public static final String ADS_COMPONENT_ATTRIB_OCNAME = "ads-ocname";
+    public static final String ADS_COMPONENT_ATTRIB_OCNAME_OID = "1.3.6.1.4.1.18060.0.4.4.0.1.3";
 
     /*
      * Attribute name of component purge count

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/EntryNormalizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/EntryNormalizer.java?rev=1228663&r1=1228662&r2=1228663&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/EntryNormalizer.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/EntryNormalizer.java
Sat Jan  7 16:52:18 2012
@@ -9,6 +9,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.util.DateUtils;
 
@@ -55,7 +57,7 @@ public class EntryNormalizer
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
         // This will cause the Dn and attribute names to be normalized,
-        Entry normalizedEntry;
+        Entry normalizedEntry = null;
         try
         {
             normalizedEntry = new DefaultEntry( schemaManager, entry );
@@ -63,9 +65,28 @@ public class EntryNormalizer
         catch ( LdapException e )
         {
             e.printStackTrace();
-            return null;
         }
 
         return normalizedEntry;
     }
+
+
+    /**
+     * Normalizes the given Dn.
+     *
+     * @param dn Dn reference to normalize
+     * @return Normalized Dn, null if failed.
+     */
+    public static Dn normalizeDn( Dn dn )
+    {
+        try
+        {
+            return dn.apply( schemaManager );
+        }
+        catch ( LdapInvalidDnException e )
+        {
+            e.printStackTrace();
+            return null;
+        }
+    }
 }

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1228663&r1=1228662&r2=1228663&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
Sat Jan  7 16:52:18 2012
@@ -55,6 +55,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
+import org.apache.directory.server.core.api.interceptor.Interceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
@@ -83,6 +84,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.subtree.AdministrativeRole;
 import org.apache.directory.shared.ldap.util.tree.DnNode;
 import org.apache.directory.shared.util.Strings;
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Provides;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -92,6 +95,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@Component
+@Provides(specifications={Interceptor.class})
 public class AdministrativePointInterceptor extends BaseInterceptor
 {
     /** A {@link Logger} for this class */



Mime
View raw message