geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r395904 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/ org.apache.geronimo.st.v11.core/META-IN...
Date Fri, 21 Apr 2006 15:05:35 GMT
Author: sppatel
Date: Fri Apr 21 08:05:33 2006
New Revision: 395904

URL: http://svn.apache.org/viewcvs?rev=395904&view=rev
Log:
v11 facet

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSchemaNS.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSchemaNS.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSchemaNS.java?rev=395904&r1=395903&r2=395904&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSchemaNS.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSchemaNS.java
Fri Apr 21 08:05:33 2006
@@ -20,20 +20,20 @@
 	private 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";
-
-	public static final String GERONIMO_NAMING_NS = "http://geronimo.apache.org/xml/ns/naming-1.0";
-
-	public static final String GERONIMO_SECURITY_NS = "http://geronimo.apache.org/xml/ns/security-1.1";
-
-	public static final String GERONIMO_DEPLOYMENT_NS = "http://geronimo.apache.org/xml/ns/deployment-1.0";
-
-	public static final String GERONIMO_PKGEN_NS = "http://www.openejb.org/xml/ns/pkgen-2.0";
+	public static final String GERONIMO_APP_NS_1_0 = "http://geronimo.apache.org/xml/ns/j2ee/application-1.0";
+	public static final String GERONIMO_WEB_NS_1_0 = "http://geronimo.apache.org/xml/ns/j2ee/web-1.0";
+	public static final String GERONIMO_OPENEJB_NS_2_0 = "http://www.openejb.org/xml/ns/openejb-jar-2.0";
+	public static final String GERONIMO_CONNECTOR_NS_1_0 = "http://geronimo.apache.org/xml/ns/j2ee/connector-1.0";
+	public static final String GERONIMO_NAMING_NS_1_0 = "http://geronimo.apache.org/xml/ns/naming-1.0";
+	public static final String GERONIMO_SECURITY_NS_1_1 = "http://geronimo.apache.org/xml/ns/security-1.1";
+	public static final String GERONIMO_DEPLOYMENT_NS_1_0 = "http://geronimo.apache.org/xml/ns/deployment-1.0";
+	public static final String GERONIMO_PKGEN_NS_2_0 = "http://www.openejb.org/xml/ns/pkgen-2.0";
+	
+	public static final String GERONIMO_APP_NS_1_1 = "http://geronimo.apache.org/xml/ns/j2ee/application-1.1";
+	public static final String GERONIMO_WEB_NS_1_1 = "http://geronimo.apache.org/xml/ns/j2ee/web-1.1";
+	public static final String GERONIMO_OPENEJB_NS_2_1 = "http://www.openejb.org/xml/ns/openejb-jar-2.1";
+	public static final String GERONIMO_CONNECTOR_NS_1_1 = "http://geronimo.apache.org/xml/ns/j2ee/connector-1.1";
+	public static final String GERONIMO_NAMING_NS_1_1 = "http://geronimo.apache.org/xml/ns/naming-1.1";
+	public static final String GERONIMO_DEPLOYMENT_NS_1_1 = "http://geronimo.apache.org/xml/ns/deployment-1.1";
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java?rev=395904&r1=395903&r2=395904&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
Fri Apr 21 08:05:33 2006
@@ -56,9 +56,9 @@
 		ApplicationType root = ApplicationFactory.eINSTANCE.createApplicationType();
 
 		EMap map = documentRoot.getXMLNSPrefixMap();
-		map.put("", GeronimoSchemaNS.GERONIMO_APP_NS);
-		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS);
-		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS);
+		map.put("", GeronimoSchemaNS.GERONIMO_APP_NS_1_0);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_0);
 
 		root.setApplicationName(getComponentName());
 		root.setConfigId(getProject().getName() + "/" + getComponentName());
@@ -85,10 +85,10 @@
 		org.apache.geronimo.xml.ns.j2ee.web.DocumentRoot documentRoot = WebFactory.eINSTANCE.createDocumentRoot();
 
 		EMap map = documentRoot.getXMLNSPrefixMap();
-		map.put("", GeronimoSchemaNS.GERONIMO_WEB_NS);
-		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS);
-		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS);
-		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS);
+		map.put("", GeronimoSchemaNS.GERONIMO_WEB_NS_1_0);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_0);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_0);
 
 		WebAppType root = WebFactory.eINSTANCE.createWebAppType();
 
@@ -118,11 +118,11 @@
 		OpenejbJarType root = JarFactory.eINSTANCE.createOpenejbJarType();
 
 		EMap map = documentRoot.getXMLNSPrefixMap();
-		map.put("", GeronimoSchemaNS.GERONIMO_OPENEJB_NS);
-		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS);
-		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS);
-		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS);
-		map.put("pkgen", GeronimoSchemaNS.GERONIMO_PKGEN_NS);
+		map.put("", GeronimoSchemaNS.GERONIMO_OPENEJB_NS_2_0);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_0);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_0);
+		map.put("pkgen", GeronimoSchemaNS.GERONIMO_PKGEN_NS_2_0);
 
 		root.setConfigId(getProject().getName() + "/" + getComponentName());
 
@@ -143,16 +143,16 @@
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
 
 		ResourceSet resourceSet = new ResourceSetImpl();
-		GeronimoV1Utils.registerEjbFactoryAndPackage(resourceSet);
+		GeronimoV1Utils.registerConnectorFactoryAndPackage(resourceSet);
 
 		Resource resource = resourceSet.createResource(uri);
 		org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot documentRoot = ConnectorFactory.eINSTANCE.createDocumentRoot();
 		ConnectorType root = ConnectorFactory.eINSTANCE.createConnectorType();
 
 		EMap map = documentRoot.getXMLNSPrefixMap();
-		map.put("", GeronimoSchemaNS.GERONIMO_CONNECTOR_NS);
-		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS);
-		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS);
+		map.put("", GeronimoSchemaNS.GERONIMO_CONNECTOR_NS_1_0);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_0);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_0);
 
 		root.setConfigId(getProject().getName() + "/" + getComponentName());
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF?rev=395904&r1=395903&r2=395904&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
Fri Apr 21 08:05:33 2006
@@ -22,5 +22,8 @@
  org.apache.geronimo.v11.deployment.model.edit,
  org.apache.geronimo.runtime.v1,
  org.apache.geronimo.deployment.model.edit,
- org.apache.geronimo.deployment.model
+ org.apache.geronimo.deployment.model,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.core.commands,
+ org.eclipse.wst.common.project.facet.core
 Eclipse-AutoStart: true

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java?rev=395904&r1=395903&r2=395904&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
Fri Apr 21 08:05:33 2006
@@ -32,14 +32,10 @@
 
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.PersistentConfigurationList;
 import org.apache.geronimo.kernel.jmx.KernelDelegate;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.st.core.DeploymentUtils;
 import org.apache.geronimo.st.core.GenericGeronimoServerBehaviour;
 import org.apache.geronimo.st.core.GeronimoConnectionFactory;
@@ -51,7 +47,6 @@
 import org.apache.geronimo.st.core.commands.TargetModuleIdNotFoundException;
 import org.apache.geronimo.st.v11.core.internal.Messages;
 import org.apache.geronimo.st.v11.core.internal.Trace;
-import org.apache.geronimo.st.v11.core.internal.WorkspaceConfigurationStore;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java?rev=395904&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
Fri Apr 21 08:05:33 2006
@@ -0,0 +1,38 @@
+/**
+ * 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.st.v11.core.operations;
+
+import org.apache.geronimo.st.core.GeronimoFacetInstallDelegate;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentCreationDataModelProvider;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+public class GeronimoV11FacetInstallDelegate extends
+		GeronimoFacetInstallDelegate {
+
+	public IDataModelOperation createDeploymentPlanCreationOp(IProject project) {
+		IVirtualComponent comp = ComponentCore.createComponent(project);
+		IDataModel model = DataModelFactory.createDataModel(new JavaComponentCreationDataModelProvider());
+		model.setStringProperty(IComponentCreationDataModelProperties.COMPONENT_NAME, comp.getName());
+		model.setStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME, project.getName());
+		return new V11DeploymentPlanCreationOperation(model);
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java?rev=395904&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
Fri Apr 21 08:05:33 2006
@@ -0,0 +1,187 @@
+/**
+ * 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.st.v11.core.operations;
+
+import org.apache.geronimo.st.core.GeronimoSchemaNS;
+import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.v11.core.GeronimoV11Utils;
+import org.apache.geronimo.xml.ns.deployment.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
+import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.application.util.ApplicationResourceFactoryImpl;
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorFactory;
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorPackage;
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorType;
+import org.apache.geronimo.xml.ns.j2ee.connector.util.ConnectorResourceFactoryImpl;
+import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
+import org.apache.geronimo.xml.ns.j2ee.web.WebFactory;
+import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
+import org.apache.geronimo.xml.ns.j2ee.web.util.WebResourceFactoryImpl;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.openejb.xml.ns.openejb.jar.JarFactory;
+import org.openejb.xml.ns.openejb.jar.JarPackage;
+import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
+import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
+
+public class V11DeploymentPlanCreationOperation extends
+		DeploymentPlanCreationOperation {
+
+	public V11DeploymentPlanCreationOperation(IDataModel model) {
+		super(model);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public EObject createGeronimoApplicationDeploymentPlan(IFile dpFile) {
+		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
+
+		ResourceSet resourceSet = new ResourceSetImpl();
+		GeronimoV11Utils.register(resourceSet, new ApplicationResourceFactoryImpl(), ApplicationPackage.eINSTANCE,
ApplicationPackage.eNS_URI);
+
+		Resource resource = resourceSet.createResource(uri);
+		org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot documentRoot = ApplicationFactory.eINSTANCE.createDocumentRoot();
+		ApplicationType root = ApplicationFactory.eINSTANCE.createApplicationType();
+
+		EMap map = documentRoot.getXMLNSPrefixMap();
+		map.put("", GeronimoSchemaNS.GERONIMO_APP_NS_1_1);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
+
+		root.setApplicationName(getComponentName());
+		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+
+		documentRoot.setApplication(root);
+		resource.getContents().add(documentRoot);
+
+		save(resource);
+
+		return root;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoWebDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public EObject createGeronimoWebDeploymentPlan(IFile dpFile) {
+
+		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
+
+		ResourceSet resourceSet = new ResourceSetImpl();
+		GeronimoV11Utils.register(resourceSet, new WebResourceFactoryImpl(), WebPackage.eINSTANCE,
WebPackage.eNS_URI);
+
+		Resource resource = resourceSet.createResource(uri);
+		org.apache.geronimo.xml.ns.j2ee.web.DocumentRoot documentRoot = WebFactory.eINSTANCE.createDocumentRoot();
+
+		EMap map = documentRoot.getXMLNSPrefixMap();
+		map.put("", GeronimoSchemaNS.GERONIMO_WEB_NS_1_1);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_1);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
+
+		WebAppType root = WebFactory.eINSTANCE.createWebAppType();
+
+		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setContextRoot("/" + getComponentName());
+		root.setContextPriorityClassloader(false);
+
+		documentRoot.setWebApp(root);
+		resource.getContents().add(documentRoot);
+
+		save(resource);
+
+		return root;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createOpenEjbDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public EObject createOpenEjbDeploymentPlan(IFile dpFile) {
+		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
+
+		ResourceSet resourceSet = new ResourceSetImpl();
+		GeronimoV11Utils.register(resourceSet, new JarResourceFactoryImpl(), JarPackage.eINSTANCE,
JarPackage.eNS_URI);
+
+		Resource resource = resourceSet.createResource(uri);
+		org.openejb.xml.ns.openejb.jar.DocumentRoot documentRoot = JarFactory.eINSTANCE.createDocumentRoot();
+		OpenejbJarType root = JarFactory.eINSTANCE.createOpenejbJarType();
+
+		EMap map = documentRoot.getXMLNSPrefixMap();
+		map.put("", GeronimoSchemaNS.GERONIMO_OPENEJB_NS_2_1);
+		map.put("sec", GeronimoSchemaNS.GERONIMO_SECURITY_NS_1_1);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_1);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
+		map.put("pkgen", GeronimoSchemaNS.GERONIMO_PKGEN_NS_2_0);
+
+		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setEnterpriseBeans(JarFactory.eINSTANCE.createEnterpriseBeansType());
+
+		documentRoot.setOpenejbJar(root);
+		resource.getContents().add(documentRoot);
+
+		save(resource);
+
+		return root;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createConnectorDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public EObject createConnectorDeploymentPlan(IFile dpFile) {
+		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
+
+		ResourceSet resourceSet = new ResourceSetImpl();
+		GeronimoV11Utils.register(resourceSet, new ConnectorResourceFactoryImpl(), ConnectorPackage.eINSTANCE,
ConnectorPackage.eNS_URI);
+
+		Resource resource = resourceSet.createResource(uri);
+		org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot documentRoot = ConnectorFactory.eINSTANCE.createDocumentRoot();
+		ConnectorType root = ConnectorFactory.eINSTANCE.createConnectorType();
+
+		EMap map = documentRoot.getXMLNSPrefixMap();
+		map.put("", GeronimoSchemaNS.GERONIMO_CONNECTOR_NS_1_1);
+		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_1);
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
+
+		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		documentRoot.setConnector(root);
+		resource.getContents().add(documentRoot);
+
+		save(resource);
+
+		return root;
+	}
+	
+	public EnvironmentType getConfigEnvironment(String groupId, String artifactId, String version,
String type) {
+		ArtifactType artifact = DeploymentFactory.eINSTANCE.createArtifactType();
+		artifact.setGroupId(groupId);
+		artifact.setArtifactId(artifactId);
+		artifact.setVersion(version);
+		artifact.setType(type);
+		EnvironmentType env = DeploymentFactory.eINSTANCE.createEnvironmentType();
+		env.setConfigId(artifact);
+		return env;
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message