directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1225558 - in /directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component: ADSComponent.java utilities/ADSConstants.java
Date Thu, 29 Dec 2011 15:24:44 GMT
Author: gokturk
Date: Thu Dec 29 15:24:43 2011
New Revision: 1225558

URL: http://svn.apache.org/viewvc?rev=1225558&view=rev
Log:
* ADSConstants class is cleaned of constants those belong to previous designs.
* New helper methods on ADSComponent

Modified:
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/ADSComponent.java
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSConstants.java

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/ADSComponent.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/ADSComponent.java?rev=1225558&r1=1225557&r2=1225558&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/ADSComponent.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/ADSComponent.java
Thu Dec 29 15:24:43 2011
@@ -178,6 +178,26 @@ public class ADSComponent
 
 
     /**
+     * Gets the component instance reference by name
+     *
+     * @param instanceName Instance name
+     * @return ADSComponentInstance reference by its name
+     */
+    public ADSComponentInstance getInstance( String instanceName )
+    {
+        for ( ADSComponentInstance instance : activeInstances )
+        {
+            if ( instance.getInstanceName().equals( instanceName ) )
+            {
+                return instance;
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
      * Gets the current cached instances of the component
      *
      * @return Cloned CachedComponentInstance list.

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSConstants.java?rev=1225558&r1=1225557&r2=1225558&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSConstants.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/ADSConstants.java
Thu Dec 29 15:24:43 2011
@@ -37,24 +37,9 @@ public class ADSConstants
     public static final String ADS_HUB_FACTORY_NAME = "ADSComponentHub";
 
     /*
-     * base directory path for component cache
+     * Parent RDN for some component's instances
      */
-    public static final String ADS_CACHE_BASE_DIR = "adscache";
-
-    /*
-     * default file name for caching schemas inside for components
-     */
-    public static final String ADS_CACHE_SCHEMA_FILE = "schema-elements.ldif";
-
-    /*
-     * default file name for caching instance entries inside for components
-     */
-    public static final String ADS_CACHE_INSTANCES_DIR = "instance-configs";
-
-    /*
-     * default file name for caching version information for components
-     */
-    public static final String ADS_CACHE_VERSION_FILE = "version";
+    public static final String ADS_COMPONENT_INSTANCES_RDN = "ou=instances";
 
     /*
      * IPojo instance name property



Mime
View raw message