directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1337887 - in /directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core: Activator.java DCMetadataBuilder.java IPojoConnector.java IPojoFactoryTracker.java
Date Sun, 13 May 2012 13:55:47 GMT
Author: gokturk
Date: Sun May 13 13:55:46 2012
New Revision: 1337887

URL: http://svn.apache.org/viewvc?rev=1337887&view=rev
Log:
* Bug fixes while integrating

Modified:
    directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/Activator.java
    directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/DCMetadataBuilder.java
    directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoConnector.java
    directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoFactoryTracker.java

Modified: directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/Activator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/Activator.java?rev=1337887&r1=1337886&r2=1337887&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/Activator.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/Activator.java
Sun May 13 13:55:46 2012
@@ -11,9 +11,6 @@ public class Activator implements Bundle
     public void start( BundleContext context ) throws Exception
     {
         IPojoConnector.connectorContext = context;
-
-        IPojoFactoryTracker tracker = new IPojoFactoryTracker( new IPojoConnector() );
-        tracker.open();
     }
 
 

Modified: directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/DCMetadataBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/DCMetadataBuilder.java?rev=1337887&r1=1337886&r2=1337887&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/DCMetadataBuilder.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/DCMetadataBuilder.java
Sun May 13 13:55:46 2012
@@ -16,6 +16,8 @@ import org.apache.felix.ipojo.architectu
 import org.apache.felix.ipojo.metadata.Element;
 import org.osgi.framework.Version;
 
+import com.sun.org.apache.bcel.internal.generic.CPInstruction;
+
 
 public class DCMetadataBuilder
 {
@@ -35,7 +37,12 @@ public class DCMetadataBuilder
             String description = "";
             String containerFor = "";
 
-            DirectoryPropertyDescription dpd = ( DirectoryPropertyDescription ) property;
+            DirectoryPropertyDescription dpd = null;
+            if ( property instanceof DirectoryPropertyDescription )
+            {
+                dpd = ( DirectoryPropertyDescription ) property;
+            }
+
             if ( dpd != null )
             {
                 description = dpd.getDesc();
@@ -85,19 +92,29 @@ public class DCMetadataBuilder
 
         String[] splitted = array.split( "," );
 
+        for ( int i = 0; i < splitted.length; i++ )
+        {
+            splitted[i] = splitted[i].trim();
+        }
+
         return splitted;
     }
 
 
     private static String normalizeType( String type )
     {
+        if ( type == null )
+        {
+            return "";
+        }
+
         if ( type.endsWith( "[]" ) )
         {
             return Array.class.getName();
         }
         else
         {
-            if ( "string".equals( type ) || "String".equals( type ) )
+            if ( "string".equals( type ) || "String".equals( type ) || String.class.getName().equals(
type ) )
             {
                 return ComponentConstants.PRIMITIVE_STR;
             }

Modified: directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoConnector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoConnector.java?rev=1337887&r1=1337886&r2=1337887&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoConnector.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoConnector.java
Sun May 13 13:55:46 2012
@@ -42,7 +42,7 @@ public class IPojoConnector implements H
     }
 
 
-    public void factoryActivated( ComponentFactory factory )
+    public synchronized void factoryActivated( ComponentFactory factory )
     {
         if ( isDirectoryFactory( factory ) )
         {
@@ -72,7 +72,7 @@ public class IPojoConnector implements H
 
     private boolean isDirectoryFactory( ComponentFactory factory )
     {
-        PropertyDescription[] properties = factory.getComponentTypeDescription().getProperties();
+        PropertyDescription[] properties = factory.getComponentDescription().getProperties();
 
         for ( PropertyDescription pd : properties )
         {

Modified: directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoFactoryTracker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoFactoryTracker.java?rev=1337887&r1=1337886&r2=1337887&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoFactoryTracker.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/hub/connectors/ipojo/core/src/main/java/org/apache/directory/server/hub/connector/ipojo/core/IPojoFactoryTracker.java
Sun May 13 13:55:46 2012
@@ -56,7 +56,7 @@ public class IPojoFactoryTracker impleme
 
 
     @Override
-    public Object addingService( ServiceReference reference )
+    public synchronized Object addingService( ServiceReference reference )
     {
         Factory factory = context.getService( ( ServiceReference<Factory> ) reference
);
 
@@ -66,7 +66,7 @@ public class IPojoFactoryTracker impleme
             return null;
         }
         
-        System.out.println(factory.getName()+"adding");
+        System.out.println(factory.getName()+" tracked");
 
         componentFactory.addFactoryStateListener( this );
 



Mime
View raw message