geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r315071 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal: DeploymentPlanCreationOperation.java GeronimoSchemaNS.java
Date Wed, 12 Oct 2005 23:13:34 GMT
Author: sppatel
Date: Wed Oct 12 16:13:30 2005
New Revision: 315071

URL: http://svn.apache.org/viewcvs?rev=315071&view=rev
Log:
interface with ns declarations

Added:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoSchemaNS.java
Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java?rev=315071&r1=315070&r2=315071&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java
Wed Oct 12 16:13:30 2005
@@ -60,7 +60,7 @@
     }
 
     public IStatus execute(IProgressMonitor monitor, IAdaptable info)
-            throws ExecutionException {   
+            throws ExecutionException {
 
         if (isGeronimoRuntimeTarget()) {
 
@@ -85,7 +85,7 @@
                         .getConnectorDeploymentPlanFile(comp));
             }
         }
-        
+
         return Status.OK_STATUS;
     }
 
@@ -101,8 +101,9 @@
                 .createDocumentRoot();
         ApplicationType root = ApplicationFactory.eINSTANCE
                 .createApplicationType();
-               
-        documentRoot.getXMLNSPrefixMap().put("", "http://geronimo.apache.org/xml/ns/j2ee/application-1.0");
+
+        documentRoot.getXMLNSPrefixMap()
+                .put("", GeronimoSchemaNS.GERONIMO_APP_NS);
 
         root.setApplicationName(getComponentName());
         root.setConfigId(getProject().getName() + "/" + getComponentName());
@@ -125,9 +126,10 @@
 
         Resource resource = resourceSet.createResource(uri);
         DocumentRoot documentRoot = WebFactory.eINSTANCE.createDocumentRoot();
-                      
-        documentRoot.getXMLNSPrefixMap().put("", "http://geronimo.apache.org/xml/ns/j2ee/web-1.0");
-        
+
+        documentRoot.getXMLNSPrefixMap()
+                .put("", GeronimoSchemaNS.GERONIMO_WEB_NS);
+
         WebAppType root = WebFactory.eINSTANCE.createWebAppType();
 
         root.setConfigId(getProject().getName() + "/" + getComponentName());
@@ -153,8 +155,9 @@
         org.openejb.xml.ns.openejb.jar.DocumentRoot documentRoot = JarFactory.eINSTANCE
                 .createDocumentRoot();
         OpenejbJarType root = JarFactory.eINSTANCE.createOpenejbJarType();
-                    
-        documentRoot.getXMLNSPrefixMap().put("", "http://www.openejb.org/xml/ns/openejb-jar-2.0");
+
+        documentRoot.getXMLNSPrefixMap().put("",
+                GeronimoSchemaNS.GERONIMO_OPENEJB_NS);
 
         root.setConfigId(getProject().getName() + "/" + getComponentName());
 
@@ -165,7 +168,7 @@
 
         return root;
     }
-    
+
     public ConnectorType createConnectorDeploymentPlan(IFile dpFile) {
         URI uri = URI
                 .createPlatformResourceURI(dpFile.getFullPath().toString());
@@ -177,9 +180,10 @@
         org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot documentRoot = ConnectorFactory.eINSTANCE
                 .createDocumentRoot();
         ConnectorType root = ConnectorFactory.eINSTANCE.createConnectorType();
-                        
-        documentRoot.getXMLNSPrefixMap().put("", "http://geronimo.apache.org/xml/ns/j2ee/connector-1.0");
-        
+
+        documentRoot.getXMLNSPrefixMap().put("",
+                GeronimoSchemaNS.GERONIMO_CONNECTOR_NS);
+
         root.setConfigId(getProject().getName() + "/" + getComponentName());
 
         documentRoot.setConnector(root);
@@ -191,8 +195,9 @@
     }
 
     public boolean isGeronimoRuntimeTarget() {
-        
-        IRuntime runtime = ServerCore.getProjectProperties(getProject()).getRuntimeTarget();
+
+        IRuntime runtime = ServerCore.getProjectProperties(getProject())
+                .getRuntimeTarget();
         return runtime.getName().startsWith("Apache Geronimo");
 
     }

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoSchemaNS.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoSchemaNS.java?rev=315071&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoSchemaNS.java
(added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoSchemaNS.java
Wed Oct 12 16:13:30 2005
@@ -0,0 +1,28 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.core.internal;
+
+public interface GeronimoSchemaNS {
+
+    public static final String GERONIMO_APP_NS = "http://geronimo.apache.org/xml/ns/j2ee/application-1.0";
+
+    public static final String GERONIMO_WEB_NS = "http://geronimo.apache.org/xml/ns/j2ee/web-1.0";
+
+    public static final String GERONIMO_OPENEJB_NS = "http://www.openejb.org/xml/ns/openejb-jar-2.0";
+
+    public static final String GERONIMO_CONNECTOR_NS = "http://geronimo.apache.org/xml/ns/j2ee/connector-1.0";
+
+}



Mime
View raw message