directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1224711 - in /directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component: ADSComponent.java utilities/LdifConfigHelper.java
Date Mon, 26 Dec 2011 11:09:42 GMT
Author: gokturk
Date: Mon Dec 26 11:09:42 2011
New Revision: 1224711

URL: http://svn.apache.org/viewvc?rev=1224711&view=rev
Log:
* ComponentManager methods are embedded in ADSComponent to let it manage itself.
* Bugfix in LdifConfigHelper,(DN attributes were not in entry's attribute list).


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/LdifConfigHelper.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=1224711&r1=1224710&r2=1224711&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
Mon Dec 26 11:09:42 2011
@@ -88,6 +88,41 @@ public class ADSComponent
 
 
     /**
+     * Creates and return an instance, and add it into internal instances list.
+     *
+     * @return Created instance as ADSComponentInstance reference
+     */
+    public ADSComponentInstance createInstance()
+    {
+        return componentManager.createInstance( this );
+    }
+
+
+    /**
+     * Loads all the cached instances of this component and return them in list.
+     *
+     * @return Loaded instances
+     */
+    public List<ADSComponentInstance> loadCachedInstances()
+    {
+        return componentManager.loadCachedInstances( this );
+    }
+
+
+    /**
+     * Loads the specified cached instance of this component and return it.
+     * TODO loadInstance.
+     *
+     * @param cachedInstance Cached instance reference to resurrect
+     * @return Resurrected instance reference
+     */
+    public ADSComponentInstance loadInstance( CachedComponentInstance cachedInstance )
+    {
+        return componentManager.loadInstance( this, cachedInstance );
+    }
+
+
+    /**
      * Adds an instance to a instances list
      *
      * @param instance instance reference to add to a list

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/LdifConfigHelper.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/LdifConfigHelper.java?rev=1224711&r1=1224710&r2=1224711&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/LdifConfigHelper.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/utilities/LdifConfigHelper.java
Mon Dec 26 11:09:42 2011
@@ -71,12 +71,14 @@ public class LdifConfigHelper
         {
             if ( key.equals( ADSConstants.ADS_COMPONENT_INSTANCE_PROP_NAME ) )
             {
-                continue;
+                String dnAttrib = ADSSchemaConstants.ADS_COMPONENT_INSTANCE_ATTRIB_NAME +
"=" + instanceName;
+                attributes.add( dnAttrib );
             }
 
             String attribute = ( String ) key + "=" + ( String ) instanceConfiguration.get(
key );
             attributes.add( attribute );
         }
+        
         LdifEntry instanceEntry;
         try
         {



Mime
View raw message