felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r382640 - in /incubator/felix/sandbox/akarasulu/mavenized: ./ org.osgi/ org.osgi/src/main/java/org/osgi/framework/ org.osgi/src/main/java/org/osgi/service/condpermadmin/
Date Fri, 03 Mar 2006 03:47:23 GMT
Author: akarasulu
Date: Thu Mar  2 19:47:21 2006
New Revision: 382640

URL: http://svn.apache.org/viewcvs?rev=382640&view=rev
Log:
got osgi code separated and compiling ...

 o made the filter class load using a system property using a hack - will change
   this later using what is advised by OSGi alliance
 o modified top level pom to include OSGi framework build
 o ignoring some build byproducts in module dir


Modified:
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/   (props changed)
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/pom.xml
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/AdminPermission.java
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/BundlePermission.java
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/FrameworkUtil.java
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/PackagePermission.java
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/ServicePermission.java
    incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/service/condpermadmin/BundleSignerCondition.java
    incubator/felix/sandbox/akarasulu/mavenized/pom.xml

Propchange: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Mar  2 19:47:21 2006
@@ -0,0 +1,10 @@
+target
+*.ipr
+*.iws
+*.iml
+.classpath
+.project
+.settings
+.deployables
+.wtpmodules
+*.log

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/pom.xml?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/pom.xml (original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/pom.xml Thu Mar  2 19:47:21 2006
@@ -6,6 +6,6 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <packaging>jar</packaging>
-  <name>Apache Felix OSGi Packages</name>
+  <name>Apache Felix OSGi Framework</name>
   <artifactId>felix-osgi</artifactId>
 </project>

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/AdminPermission.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/AdminPermission.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/AdminPermission.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/AdminPermission.java
Thu Mar  2 19:47:21 2006
@@ -10,11 +10,12 @@
 
 package org.osgi.framework;
 
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.security.*;
 import java.util.*;
-import org.apache.felix.framework.FilterImpl;
+
 
 /**
  * Indicates the caller's authority to perform specific privileged administrative 
@@ -622,7 +623,7 @@
                     filter = filterBuf.toString();
                 } //end if (pos != -1)
 
-                filterImpl = new FilterImpl(filter);
+                filterImpl = FrameworkUtil.createFilter( filter );
             } catch (InvalidSyntaxException e) {
                 //we will return null
             }

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/BundlePermission.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/BundlePermission.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/BundlePermission.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/BundlePermission.java
Thu Mar  2 19:47:21 2006
@@ -71,7 +71,8 @@
 															| ACTION_HOST
 															| ACTION_FRAGMENT;
 	private final static int	ACTION_NONE			= 0;
-	private final static int	ACTION_ERROR		= 0x80000000;
+//    NOT USED!!!
+//    private final static int	ACTION_ERROR		= 0x80000000;
 
 	/**
 	 * The actions mask.

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/FrameworkUtil.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/FrameworkUtil.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/FrameworkUtil.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/FrameworkUtil.java
Thu Mar  2 19:47:21 2006
@@ -10,7 +10,9 @@
 
 package org.osgi.framework;
 
-import org.apache.felix.framework.FilterImpl;
+
+import java.lang.reflect.Constructor;
+
 
 /**
  * Framework Utility class.
@@ -22,9 +24,15 @@
  * @version $Revision: 1.1 $
  * @since 1.3
  */
-public class FrameworkUtil {
+public class FrameworkUtil 
+{
+    private static final Class[] CONST_ARGS = new Class[] { String.class };
+    private static final String FILTER_IMPL_FQCN = "org.osgi.framework.filterImplFQCN";
+    private static final String FILTER_IMPL_DEFAULT = "org.apache.felix.framework.FilterImpl";
+    private static Class filterImplClass;
+
 
-	/**
+    /**
 	 * Creates a <code>Filter</code> object. This <code>Filter</code>
object
 	 * may be used to match a <code>ServiceReference</code> object or a
 	 * <code>Dictionary</code> object.
@@ -41,8 +49,37 @@
 	 * 
 	 * @see Filter
 	 */
-	public static Filter createFilter(String filter)
-			throws InvalidSyntaxException {
-		return new FilterImpl(filter);
+	public static Filter createFilter( String filter ) throws InvalidSyntaxException 
+    {
+        if ( filterImplClass == null )
+        {
+            String fqcn = System.getProperty( FILTER_IMPL_FQCN );
+            if ( fqcn == null )
+            {
+                fqcn = FILTER_IMPL_DEFAULT;
+            }
+            
+            try
+            {
+                filterImplClass = Class.forName( fqcn );
+            }
+            catch ( ClassNotFoundException e )
+            {
+                throw new RuntimeException( "Failed to load filter implementation class:
" + fqcn );
+            }
+        }
+        
+        Constructor constructor;
+        try
+        {
+            constructor = filterImplClass.getConstructor( CONST_ARGS );
+            Filter instance = ( Filter ) constructor.newInstance( new Object[] { filter }
);
+            return instance;
+        }
+        catch ( Exception e )
+        {
+            throw new RuntimeException( "Failed to instantiate filter using implementation
class: " 
+                + filterImplClass.getName() );
+        }
 	}
 }

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/PackagePermission.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/PackagePermission.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/PackagePermission.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/PackagePermission.java
Thu Mar  2 19:47:21 2006
@@ -55,7 +55,8 @@
 	private final static int	ACTION_ALL			= ACTION_EXPORT
 															| ACTION_IMPORT;
 	private final static int	ACTION_NONE			= 0;
-	private final static int	ACTION_ERROR		= 0x80000000;
+//  NOT USED
+//  private final static int	ACTION_ERROR		= 0x80000000;
 
 	/**
 	 * The actions mask.

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/ServicePermission.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/ServicePermission.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/ServicePermission.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/framework/ServicePermission.java
Thu Mar  2 19:47:21 2006
@@ -47,7 +47,8 @@
 	private final static int	ACTION_ALL			= ACTION_GET
 															| ACTION_REGISTER;
 	private final static int	ACTION_NONE			= 0;
-	private final static int	ACTION_ERROR		= 0x80000000;
+//  NOT USED!!
+//    private final static int	ACTION_ERROR		= 0x80000000;
 
 	/**
 	 * The actions mask.

Modified: incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/service/condpermadmin/BundleSignerCondition.java
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/service/condpermadmin/BundleSignerCondition.java?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/service/condpermadmin/BundleSignerCondition.java
(original)
+++ incubator/felix/sandbox/akarasulu/mavenized/org.osgi/src/main/java/org/osgi/service/condpermadmin/BundleSignerCondition.java
Thu Mar  2 19:47:21 2006
@@ -34,9 +34,12 @@
  * 
  * @version $Revision: 1.4 $
  */
-public class BundleSignerCondition {
-	private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleSignerCondition";
-	/**
+public class BundleSignerCondition 
+{
+//  NOT USED!!!  
+//	private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleSignerCondition";
+
+    /**
 	 * Constructs a condition that tries to match the passed Bundle's location
 	 * to the location pattern.
 	 * 

Modified: incubator/felix/sandbox/akarasulu/mavenized/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/sandbox/akarasulu/mavenized/pom.xml?rev=382640&r1=382639&r2=382640&view=diff
==============================================================================
--- incubator/felix/sandbox/akarasulu/mavenized/pom.xml (original)
+++ incubator/felix/sandbox/akarasulu/mavenized/pom.xml Thu Mar  2 19:47:21 2006
@@ -7,5 +7,6 @@
   <version>1.0-SNAPSHOT</version>
   <modules>
     <module>tools/maven2/maven-osgi-plugin</module>
+    <module>org.osgi</module>
   </modules>
 </project>



Mime
View raw message