geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1082082 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core: GeronimoUtils.java osgi/OsgiConstants.java
Date Wed, 16 Mar 2011 07:44:47 GMT
Author: hanhongfang
Date: Wed Mar 16 07:44:46 2011
New Revision: 1082082

URL: http://svn.apache.org/viewvc?rev=1082082&view=rev
Log:
code refactoring to reduce duplicated constants etc

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/osgi/OsgiConstants.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java?rev=1082082&r1=1082081&r2=1082082&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
Wed Mar 16 07:44:46 2011
@@ -63,15 +63,8 @@ public class GeronimoUtils {
 
     public static final String CONNECTOR_PLAN_NAME = "geronimo-ra.xml";
     
-    public static final String SERVICE_PLAN_NAME = "geronimo-service.xml";
-    
-    public static final String ARIES_APPLICATION_MODULE = "osgi.app";
-    
-    public static final String ARIES_BUNDLE_MODULE = "osgi.bundle";
-    
-    public static final String ARIES_ARTIFACT_GROUP = "application";
-    
-    public static final String ARIES_ARTIFACT_TYPE = "eba";
+    public static final String SERVICE_PLAN_NAME = "geronimo-service.xml"; 
+
 
     public static boolean isWebModule(IModule module) {
         return IModuleConstants.JST_WEB_MODULE.equals(module.getModuleType().getId());
@@ -201,7 +194,7 @@ public class GeronimoUtils {
         
         if (AriesHelper.isAriesInstalled()) {
             try {
-                if (isAriesOSGiApplicationModule(module)) {
+                if (isEBAModule(module)) {
                     Class ariesUtilsClass = Class.forName("com.ibm.etools.aries.internal.core.utils.AriesUtils");
                     Method method = ariesUtilsClass.getMethod("getApplicationManifest", IProject.class);
                     Object object = method.invoke(null, module.getProject());
@@ -216,7 +209,7 @@ public class GeronimoUtils {
                     String newVersionStr = getVersion(version);                    
                     
                     if (artifactID != null && version != null) {
-                        return getQualifiedConfigID(ARIES_ARTIFACT_GROUP, artifactID, newVersionStr,
ARIES_ARTIFACT_TYPE);
+                        return getQualifiedConfigID(OsgiConstants.ARTIFACT_GROUP, artifactID,
newVersionStr, OsgiConstants.ARTIFACT_TYPE);
                     }                 
                 }
             } catch (Exception e) {
@@ -236,14 +229,6 @@ public class GeronimoUtils {
         }
         return str;
     }
-    
-    public static boolean isAriesOSGiApplicationModule(IModule module) {
-        return ARIES_APPLICATION_MODULE.equals(module.getModuleType().getId());
-    }
-    
-    public static boolean isAiresOSGiBundleModule(IModule module) {
-        return ARIES_BUNDLE_MODULE.equals(module.getModuleType().getId());
-    }
 
     public static String getQualifiedConfigID(String groupId, String artifactId, String version,
String type) {
         return groupId + "/" + artifactId + "/" + version + "/" + type;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/osgi/OsgiConstants.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/osgi/OsgiConstants.java?rev=1082082&r1=1082081&r2=1082082&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/osgi/OsgiConstants.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/osgi/OsgiConstants.java
Wed Mar 16 07:44:46 2011
@@ -29,4 +29,7 @@ public final class OsgiConstants {
     public final static String COMPOSITE_BUNDLE = "osgi.comp"; 
     public final static String COMPOSITE_BUNDLE_EXTENSION = ".cba";  
     public final static String COMPOSITE_BUNDLE_DATAMODEL_PROVIDER_ID = "osgi.composite.datamodelprovider";
+    
+    public final static String ARTIFACT_GROUP = "application";    
+    public final static String ARTIFACT_TYPE = "eba";
 }



Mime
View raw message