geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r818883 [2/7] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.v11/ org.apache.geronimo.st.v11.core/ org.apache.geronimo.st.v11.core/src/main/ org.apache.geronimo.st.v11.core/src/main/java/ org.apache.geroni...
Date Fri, 25 Sep 2009 15:26:17 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBObjectFactoryImpl.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBObjectFactoryImpl.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBObjectFactoryImpl.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jaxb;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.xml.ns.deployment.javabean_1.PropertyType;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.AttributeType;
+import org.apache.geronimo.xml.ns.deployment_1.ClassFilterType;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
+import org.apache.geronimo.xml.ns.deployment_1.ReferenceType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ExtModuleType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ModuleType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.PathType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectInstanceType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConfigPropertySettingType;
+import org.apache.geronimo.xml.ns.naming_1.EjbLocalRefType;
+import org.apache.geronimo.xml.ns.naming_1.EjbRefType;
+import org.apache.geronimo.xml.ns.naming_1.GbeanRefType;
+import org.apache.geronimo.xml.ns.naming_1.MessageDestinationType;
+import org.apache.geronimo.xml.ns.naming_1.PatternType;
+import org.apache.geronimo.xml.ns.naming_1.PortCompletionType;
+import org.apache.geronimo.xml.ns.naming_1.PortType;
+import org.apache.geronimo.xml.ns.naming_1.ResourceEnvRefType;
+import org.apache.geronimo.xml.ns.naming_1.ResourceRefType;
+import org.apache.geronimo.xml.ns.naming_1.ServiceCompletionType;
+import org.apache.geronimo.xml.ns.naming_1.ServiceRefType;
+import org.apache.geronimo.xml.ns.security_1.DescriptionType;
+import org.apache.geronimo.xml.ns.security_1.DistinguishedNameType;
+import org.apache.geronimo.xml.ns.security_1.LoginDomainPrincipalType;
+import org.apache.geronimo.xml.ns.security_1.PrincipalType;
+import org.apache.geronimo.xml.ns.security_1.RealmPrincipalType;
+import org.apache.geronimo.xml.ns.security_1.RoleMappingsType;
+import org.apache.geronimo.xml.ns.security_1.RoleType;
+import org.apache.geronimo.xml.ns.security_1.SecurityType;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationType;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationshipRoleType;
+import org.openejb.xml.ns.openejb_jar_2.RelationshipsType;
+
+
+/**
+ * @version $Rev: 705268 $ $Date: 2008-10-16 23:54:29 +0800 (Thu, 16 Oct 2008) $
+ */
+public class JAXBObjectFactoryImpl implements JAXBObjectFactory {
+
+    private static JAXBObjectFactoryImpl instance = new JAXBObjectFactoryImpl();
+    
+    private JAXBObjectFactoryImpl() {
+        
+    }
+    
+    public static JAXBObjectFactoryImpl getInstance() {
+        return instance;
+    }
+    
+    public Object create(Class type) {
+        if ( type.equals( ResourceRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createResourceRefType();
+        } else if ( type.equals( ResourceEnvRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createResourceEnvRefType();
+        } else if ( type.equals( EjbRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createEjbRefType();
+        } else if ( type.equals( GbeanRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createGbeanRefType();
+        } else if ( type.equals( MessageDestinationType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createMessageDestinationType();
+        } else if ( type.equals( PatternType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createPatternType();
+        } else if ( type.equals( PortType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createPortType();
+        } else if ( type.equals( PortCompletionType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createPortCompletionType();
+        } else if ( type.equals( PropertyType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment.javabean_1.ObjectFactory()).createPropertyType();
+        } else if ( type.equals( ServiceCompletionType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createServiceCompletionType();
+        } else if ( type.equals( ServiceRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createServiceRefType();
+        } else if ( type.equals( EjbLocalRefType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.naming_1.ObjectFactory()).createEjbLocalRefType();
+        } else if ( type.equals( SecurityType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createSecurityType();
+        } else if ( type.equals( RoleMappingsType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createRoleMappingsType();
+        } else if ( type.equals( DescriptionType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createDescriptionType();
+        } else if ( type.equals( RoleType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createRoleType();
+        } else if ( type.equals( DistinguishedNameType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createDistinguishedNameType();
+        } else if ( type.equals( PrincipalType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createPrincipalType();
+        } else if ( type.equals( LoginDomainPrincipalType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createLoginDomainPrincipalType();
+        } else if ( type.equals( RealmPrincipalType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.security_1.ObjectFactory()).createRealmPrincipalType();
+        } else if ( type.equals( GbeanType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createGbeanType();
+        } else if ( type.equals( ArtifactType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createArtifactType();
+        } else if ( type.equals( ClassFilterType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createClassFilterType();
+        } else if ( type.equals( DependenciesType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createDependenciesType();
+        } else if ( type.equals( DependencyType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createDependencyType();
+        } else if ( type.equals( EnvironmentType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createEnvironmentType();
+        } else if ( type.equals( org.apache.geronimo.xml.ns.deployment_1.PatternType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createPatternType();
+        } else if ( type.equals( AttributeType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createAttributeType();
+        } else if ( type.equals( ReferenceType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createReferenceType();
+        } else if ( type.equals( ExtModuleType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.application_1.ObjectFactory()).createExtModuleType();
+        } else if ( type.equals( ModuleType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.application_1.ObjectFactory()).createModuleType();
+        } else if ( type.equals( PathType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.application_1.ObjectFactory()).createPathType();
+        } else if ( type.equals( EjbRelationType.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationType();
+        } else if ( type.equals( EjbRelationshipRoleType.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationshipRoleType();
+        } else if ( type.equals( EjbRelationshipRoleType.RelationshipRoleSource.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationshipRoleTypeRelationshipRoleSource();
+        } else if ( type.equals( EjbRelationshipRoleType.CmrField.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationshipRoleTypeCmrField();
+        } else if ( type.equals( EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationshipRoleTypeRoleMappingCmrFieldMapping();
+        } else if ( type.equals( EjbRelationshipRoleType.RoleMapping.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createEjbRelationshipRoleTypeRoleMapping();
+        } else if ( type.equals( RelationshipsType.class ) ) {
+            return (new org.openejb.xml.ns.openejb_jar_2.ObjectFactory()).createRelationshipsType();
+        } else if ( type.equals( AdminobjectType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory()).createAdminobjectType();
+        } else if ( type.equals( AdminobjectInstanceType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory()).createAdminobjectInstanceType();
+        } else if ( type.equals( ConfigPropertySettingType.class ) ) {
+            return (new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory()).createConfigPropertySettingType();
+        }
+        
+        return null;
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBUtils.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBUtils.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/JAXBUtils.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jaxb;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.geronimo.st.core.Activator;
+import org.apache.geronimo.st.core.internal.Trace;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * @version $Rev: 726047 $ $Date: 2008-12-12 23:35:00 +0800 (Fri, 12 Dec 2008) $
+ */
+public class JAXBUtils {
+
+    // JAXBContext instantiation is costly - must be done only once!
+    private static final JAXBContext jaxbContext = newJAXBContext();
+    private static final JAXBContext jaxbPluginContext = newJAXBPluginContext();
+    private static final MarshallerListener marshallerListener = new MarshallerListener();
+
+    private static JAXBContext newJAXBContext() {
+        try {
+            return JAXBContext.newInstance( 
+                    "org.apache.geronimo.xml.ns.deployment_1:" +
+                    "org.apache.geronimo.xml.ns.j2ee.application_1:" +
+                    "org.apache.geronimo.xml.ns.j2ee.application_client_1:" +
+                    "org.apache.geronimo.xml.ns.j2ee.connector_1:" +
+                    "org.apache.geronimo.xml.ns.j2ee.web_1:" +
+                    "org.apache.geronimo.xml.ns.naming_1:" +
+                    "org.apache.geronimo.xml.ns.security_1:" +
+                    "org.openejb.xml.ns.openejb_jar_2:"+
+                    "org.openejb.xml.ns.pkgen_2:"+
+                    "org.openejb.xml.ns.corba_css_config_2:"+
+                    "org.openejb.xml.ns.corba_tss_config_2:", Activator.class.getClassLoader() );
+        } catch (JAXBException e) {
+            Trace.tracePoint("JAXBException", "JAXBContext.newInstance");
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    private static JAXBContext newJAXBPluginContext() {
+        try {
+            return JAXBContext.newInstance( 
+                    "org.apache.geronimo.system.plugin.model", Activator.class.getClassLoader() );
+        } catch (JAXBException e) {
+            Trace.tracePoint("JAXBException", "JAXBContext.newInstance");
+            e.printStackTrace();
+        }
+        return null;
+    }
+    
+    public static void marshalDeploymentPlan(JAXBElement jaxbElement, IFile file) throws Exception {
+        try {
+            Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setListener(marshallerListener);
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            Document doc = db.newDocument(); 
+
+            marshaller.marshal(jaxbElement, doc);
+
+            TransformerFactory xf = TransformerFactory.newInstance();
+            try {
+            	xf.setAttribute("indent-number", new Integer(4));
+            } catch (IllegalArgumentException iae) {
+                //ignore this. http://forums.sun.com/thread.jspa?threadID=562510&messageID=2841867
+            }
+            Transformer xformer = xf.newTransformer();
+            xformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            xformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            xformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "4"); 
+
+            ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
+            Result out = new StreamResult(new OutputStreamWriter(outBuffer,"UTF-8"));
+            NamespacePrefix.processPrefix(doc);
+
+            xformer.transform(new DOMSource(doc), out);
+            ByteArrayInputStream inBuffer = new ByteArrayInputStream(outBuffer.toByteArray());
+            if(file.exists()) {
+                file.setContents(inBuffer, true, false, null);
+            } else {
+                prepareFolder(file.getParent());
+                file.create(inBuffer, true, null);
+            }
+        } catch (JAXBException jaxbException) {
+            Trace.tracePoint("JAXBException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+            throw jaxbException;
+        } catch (CoreException coreException) {
+            Trace.tracePoint("CoreException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+            throw coreException;
+        } catch (ParserConfigurationException e) {
+        	Trace.tracePoint("ParserConfigurationException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+        	throw e;
+		} catch (TransformerConfigurationException e) {
+			Trace.tracePoint("TransformerConfigurationException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+			throw e;
+		} catch (UnsupportedEncodingException e) {
+			Trace.tracePoint("UnsupportedEncodingException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+			throw e;
+		} catch (TransformerException e) {
+			Trace.tracePoint("TransformerException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
+			throw e;
+		}
+    }
+
+    public static JAXBElement unmarshalFilterDeploymentPlan(IFile file) throws Exception {
+        try {
+            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+            SAXParserFactory factory = SAXParserFactory.newInstance();
+            factory.setNamespaceAware(true);
+            factory.setValidating(false);
+            SAXParser parser = factory.newSAXParser();
+            SAXSource source = new SAXSource(null, new InputSource(file.getContents()));
+            JAXBElement plan = (JAXBElement) unmarshaller.unmarshal(source);
+            return plan;
+        } catch (JAXBException e) {
+            Trace.tracePoint("JAXBException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
+            throw e;
+        } catch (CoreException e) {
+            Trace.tracePoint("CoreException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
+            throw e;
+        } catch (ParserConfigurationException e) {
+            Trace.tracePoint("ParserConfigurationException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
+            throw e;
+        } catch (SAXException e) {
+            Trace.tracePoint("SAXException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
+            throw e;
+        }
+    }
+
+    public static void marshalPlugin(JAXBElement jaxbElement, OutputStream outputStream) throws Exception {
+        try {
+            Marshaller marshaller = jaxbPluginContext.createMarshaller();
+            marshaller.setListener(marshallerListener);
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            Document doc = db.newDocument(); 
+
+            marshaller.marshal(jaxbElement, doc);
+
+            TransformerFactory xf = TransformerFactory.newInstance();
+            try {
+                xf.setAttribute("indent-number", new Integer(4));
+            } catch (IllegalArgumentException iae) {
+                //ignore this. http://forums.sun.com/thread.jspa?threadID=562510&messageID=2841867
+            }
+            Transformer xformer = xf.newTransformer();
+            xformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            xformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            xformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "4"); 
+
+            ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
+            Result out = new StreamResult(new OutputStreamWriter(outBuffer,"UTF-8"));
+
+            xformer.transform(new DOMSource(doc), out);
+            ByteArrayInputStream inBuffer = new ByteArrayInputStream(outBuffer.toByteArray());
+            outputStream.write(outBuffer.toByteArray());
+        } catch (JAXBException jaxbException) {
+            Trace.tracePoint("JAXBException", "JAXBUtils.marshalDeploymentPlan()");
+            throw jaxbException;
+        } catch (IOException coreException) {
+            Trace.tracePoint("IOException", "JAXBUtils.marshalDeploymentPlan()");
+            throw coreException;
+        } catch (ParserConfigurationException e) {
+            Trace.tracePoint("ParserConfigurationException", "JAXBUtils.marshalDeploymentPlan()");
+            throw e;
+        } catch (TransformerConfigurationException e) {
+            Trace.tracePoint("TransformerConfigurationException", "JAXBUtils.marshalDeploymentPlan()");
+            throw e;
+        } catch (TransformerException e) {
+            Trace.tracePoint("TransformerException", "JAXBUtils.marshalDeploymentPlan()");
+            throw e;
+        }
+    }
+
+    public static JAXBElement unmarshalPlugin(InputStream inputStream) {
+        try {
+            Unmarshaller unmarshaller = jaxbPluginContext.createUnmarshaller();
+            SAXParserFactory factory = SAXParserFactory.newInstance();
+            factory.setNamespaceAware(true);
+            factory.setValidating(false);
+            SAXParser parser = factory.newSAXParser();
+            SAXSource source = new SAXSource(null, new InputSource(inputStream));
+            JAXBElement plan = (JAXBElement) unmarshaller.unmarshal(source);
+            return plan;
+        } catch (JAXBException e) {
+            Trace.tracePoint("JAXBException", "JAXBUtils.unmarshalFilterDeploymentPlan()");
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            Trace.tracePoint("ParserConfigurationException", "JAXBUtils.unmarshalFilterDeploymentPlan()");
+            e.printStackTrace();
+        } catch (SAXException e) {
+            Trace.tracePoint("SAXException", "JAXBUtils.unmarshalFilterDeploymentPlan()");
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    private static void prepareFolder(IContainer folder) throws CoreException {
+        if (folder.exists() || !(folder instanceof IFolder)) {
+            return;
+        }
+        // prepare the upper level folders recursively
+        prepareFolder(folder.getParent());
+        ((IFolder) folder).create(true, true, null);
+    }
+
+    public static Object getValue( Object element, String name ) throws Exception {
+        try {
+            if (String.class.isInstance(element))
+                return (String)element;
+            Method method = element.getClass().getMethod( "get" + name, null);
+            return method.invoke(element, null);
+        } catch ( Exception e ) {
+            throw e;
+        }
+    }
+    
+    public static void setValue( Object element, String name, Object value ) throws Exception {
+        try {
+            Method[] methods = element.getClass().getMethods();
+            for ( Method method: methods) {
+                if ( method.getName().equals( "set" + name ) ) {
+                    method.invoke( element, value );
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            throw e;
+        }
+        System.out.println( "============== No such method set" + name + " in class " + element.getClass().getName() );
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/MarshallerListener.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/MarshallerListener.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/MarshallerListener.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/MarshallerListener.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jaxb;
+
+import javax.xml.bind.Marshaller;
+
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.apache.geronimo.xml.ns.naming_1.GbeanLocatorType;
+import org.apache.geronimo.xml.ns.naming_1.PatternType;
+import org.apache.geronimo.xml.ns.naming_1.ResourceLocatorType;
+import org.apache.geronimo.xml.ns.security_1.SecurityType;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationshipRoleType;
+import org.openejb.xml.ns.openejb_jar_2.OpenejbJarType;
+import org.openejb.xml.ns.openejb_jar_2.RelationshipsType;
+
+public class MarshallerListener extends Marshaller.Listener{
+
+    @Override
+    public void beforeMarshal(Object source) {
+        if (source instanceof SecurityType) {
+            SecurityType security = (SecurityType)source;
+            if (security.getRoleMappings() != null && security.getRoleMappings().getRole().size() == 0) {
+                security.setRoleMappings(null);
+            } 
+        } else if (source instanceof WebAppType) {
+            WebAppType webapp = (WebAppType)source;
+            GbeanLocatorType gbeanlocator = webapp.getWebContainer();
+            if (gbeanlocator != null && isEmpty(gbeanlocator.getGbeanLink()) && isEmpty(gbeanlocator.getPattern())) {
+                webapp.setWebContainer(null);
+            }
+        } else if (source instanceof OpenejbJarType) {
+        	OpenejbJarType openejb = (OpenejbJarType)source;
+            ResourceLocatorType locator = openejb.getCmpConnectionFactory();
+            if (locator != null && isEmpty(locator.getResourceLink()) && isEmpty(locator.getUrl()) && isEmpty(locator.getPattern())) {
+                openejb.setCmpConnectionFactory(null);
+            }
+            RelationshipsType relationships = openejb.getRelationships();
+            if (relationships != null && relationships.getEjbRelation().size() == 0) {
+                openejb.setRelationships(null);
+            }
+        }else if (source instanceof EjbRelationshipRoleType) {
+        	EjbRelationshipRoleType role = (EjbRelationshipRoleType)source;
+            if (role.getRoleMapping() != null && role.getRoleMapping().getCmrFieldMapping().size() == 0) {
+                role.setRoleMapping(null);
+            }
+        }
+    }
+        
+    private boolean isEmpty(PatternType pattern) {
+        if ( pattern == null ) {
+            return true;
+        }
+        if ( isEmpty(pattern.getGroupId()) && isEmpty(pattern.getArtifactId()) &&
+                isEmpty(pattern.getModule()) && isEmpty(pattern.getName()) &&
+                isEmpty(pattern.getVersion()) ) {
+            return true;
+        }
+        return false;
+    }
+    
+    private boolean isEmpty(String value) {
+        
+        return (value == null || value.trim().equals(""));
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/NamespacePrefix.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/NamespacePrefix.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/NamespacePrefix.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/jaxb/NamespacePrefix.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @version $Rev: 685643 $ $Date: 2008-08-14 03:24:11 +0800 (Thu, 14 Aug 2008) $ 
+ */
+public class NamespacePrefix {
+
+    private static Map<String, String> prefixMap = new HashMap<String, String>();
+
+    static {
+        prefixMap.put("http://geronimo.apache.org/xml/ns/deployment-1.1", "dep");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/application-1.1", "app");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1", "client");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/connector-1.1", "conn");
+        prefixMap.put("http://openejb.apache.org/xml/ns/openejb-jar-2.1", "ejb");
+        prefixMap.put("http://openejb.apache.org/xml/ns/pkgen-2.0", "pkgen");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/naming-1.1", "name");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/security-1.1", "sec");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/web-1.1", "web");
+    }
+	
+	public static void processPrefix( Node parent ) {
+		NodeList nl = parent.getChildNodes();
+		
+		if ( parent instanceof Element ) {
+			updatePrefix( (Element)parent );
+		}
+		
+		for ( int i = 0; i <= nl.getLength(); i ++ ) {
+			Node node = nl.item(i);
+			if ( node instanceof Element ) {
+				processPrefix( node );
+			}
+		}
+
+	}
+	
+	private static void updatePrefix( Element element ) {
+		NamedNodeMap mnm = element.getAttributes();
+		
+		ArrayList<Attr> attributes = new ArrayList<Attr>();
+		for ( int j = 0; j <= mnm.getLength(); j ++ ) { 
+			Attr attr = (Attr)mnm.item(j);
+			if ( attr != null && attr.getOwnerElement() != null && getPrefix( attr.getNodeValue() ) != null ) {
+				attributes.add((Attr)attr.cloneNode(false));
+			}
+		}
+		for ( int j = 0; j < attributes.size(); j ++ ) {
+			Attr tempAttr = attributes.get(j);
+			Attr attr = element.getAttributeNode(tempAttr.getName());
+			Element owner = (Element)attr.getOwnerElement();
+			owner.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + getPrefix( attr.getNodeValue() ), attr.getNodeValue());
+			owner.removeAttributeNode(attr);
+		}
+		String prefix = getPrefix( element.getNamespaceURI() );
+		if ( prefix != null ) {
+		    element.setPrefix( prefix );
+		}
+	}
+
+	private static String getPrefix(String namespaceURI) {
+        if (prefixMap.containsKey(namespaceURI))
+            return prefixMap.get(namespaceURI);
+		return null;
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.geronimo.st.v21.core.internal.Trace;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.common.project.facet.JavaProjectFacetCreationDataModelProvider;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-05 17:47:11 -0500 (Sun, 05 Nov 2006) $
+ */
+public class GeronimoV11FacetInstallDelegate extends GeronimoFacetInstallDelegate {
+
+	public IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object config) {
+		Trace.tracePoint("Entry", "GeronimoV11FacetInstallDelegate.createDeploymentPlanCreationOp", project, config);
+		
+		IDataModel model = DataModelFactory.createDataModel(new JavaProjectFacetCreationDataModelProvider());
+		model.setStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project.getName());
+		
+		Trace.tracePoint("Exit ", "GeronimoV11FacetInstallDelegate.createDeploymentPlanCreationOp");
+		return new V11DeploymentPlanCreationOperation(model, config);
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,242 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig;
+import org.apache.geronimo.st.v11.core.internal.Trace;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBUtils;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.deployment_1.ServiceType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ObjectFactory;
+import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ResourceadapterType;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.openejb.xml.ns.openejb_jar_2.OpenejbJarType;
+
+/**
+ * @version $Rev: 509704 $ $Date: 2007-02-20 13:42:24 -0500 (Tue, 20 Feb 2007) $
+ */
+public class V11DeploymentPlanCreationOperation extends DeploymentPlanCreationOperation {
+
+	DeploymentPlanInstallConfig cfg;
+
+	public V11DeploymentPlanCreationOperation(IDataModel model, Object config) {
+		super(model, config);
+		Trace.tracePoint("Constructor", "V11DeploymentPlanCreationOperation", model, config);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile dpFile) throws Exception {
+		Trace.tracePoint("Entry",
+				"V11DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile);
+
+		ObjectFactory applicationFactory = new ObjectFactory();
+		ApplicationType application = applicationFactory.createApplicationType();
+
+		application.setApplicationName(getProject().getName());
+		application.setEnvironment(getConfigEnvironment());
+
+		JAXBElement jaxbElement = applicationFactory.createApplication(application);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan",
+				applicationFactory.createApplication(application));
+		return applicationFactory.createApplication(application);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoWebDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public JAXBElement createGeronimoWebDeploymentPlan(IFile dpFile) throws Exception {
+  		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan",
+				dpFile, dpFile.getFullPath());
+
+  		org.apache.geronimo.xml.ns.j2ee.web_1.ObjectFactory webFactory = new org.apache.geronimo.xml.ns.j2ee.web_1.ObjectFactory();
+		WebAppType web = webFactory.createWebAppType();
+
+		web.setContextRoot("/" + getProject().getName());
+		web.setEnvironment(getConfigEnvironment());
+
+		JAXBElement jaxbElement = webFactory.createWebApp(web);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", jaxbElement);
+		return jaxbElement;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createOpenEjbDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) throws Exception {
+  		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
+
+  		org.openejb.xml.ns.openejb_jar_2.ObjectFactory ejbFactory = new org.openejb.xml.ns.openejb_jar_2.ObjectFactory();
+		OpenejbJarType ejbJar = ejbFactory.createOpenejbJarType();
+
+		ejbJar.setEnvironment(getConfigEnvironment());
+
+		JAXBElement jaxbElement = ejbFactory.createOpenejbJar(ejbJar);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", jaxbElement);
+		return jaxbElement;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createConnectorDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public JAXBElement createConnectorDeploymentPlan(IFile dpFile) throws Exception {
+		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
+
+		org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory connectorFactory = new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory();
+		org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType connector = connectorFactory.createConnectorType();
+		ResourceadapterType resourceadapter = connectorFactory.createResourceadapterType();
+	
+		connector.setEnvironment(getConfigEnvironment());
+		connector.getResourceadapter().add(resourceadapter);
+
+		JAXBElement jaxbElement = connectorFactory.createConnector(connector);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createConnectorDeploymentPlan", jaxbElement);
+		return jaxbElement;
+	}
+	
+	public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile dpFile) throws Exception {
+		Trace.tracePoint("Entry","V11DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", dpFile);
+
+		org.apache.geronimo.xml.ns.j2ee.application_client_1.ObjectFactory applicationClientFactory = new org.apache.geronimo.xml.ns.j2ee.application_client_1.ObjectFactory();
+		ApplicationClientType applicationClient = applicationClientFactory.createApplicationClientType();
+
+        applicationClient.setServerEnvironment(getConfigEnvironment());
+        applicationClient.setClientEnvironment(getConfigEnvironment());
+        
+		JAXBElement jaxbElement = applicationClientFactory.createApplicationClient(applicationClient);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", applicationClientFactory.createApplicationClient(applicationClient));
+		return applicationClientFactory.createApplicationClient(applicationClient);
+	}
+
+	public JAXBElement createServiceDeploymentPlan(IFile dpFile) throws Exception {
+		Trace.tracePoint("Entry","V11DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile);
+
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory artifactFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		ServiceType service = artifactFactory.createServiceType();
+
+        
+		JAXBElement jaxbElement = artifactFactory.createService(service);
+		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createServiceDeploymentPlan", artifactFactory.createService(service));
+		return artifactFactory.createService(service);
+	}
+
+	public EnvironmentType getConfigEnvironment() {
+        Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.getConfigEnvironment");
+		
+		if (config != null && config instanceof DeploymentPlanInstallConfig) {
+			cfg = (DeploymentPlanInstallConfig) config;
+		}
+
+		String groupId = cfg != null && hasValue(cfg.getGroupId()) ? cfg.getGroupId()
+				: "default";
+		String artifactId = cfg != null && hasValue(cfg.getArtifactId()) ? cfg.getArtifactId()
+				: getProject().getName();
+		String version = cfg != null && hasValue(cfg.getVersion()) ? cfg.getVersion()
+				: "1.0";
+		String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType()
+				: "car";
+
+		ArtifactType artifact = createArtifact(groupId, artifactId, version, type);
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+   
+		EnvironmentType env = serviceFactory.createEnvironmentType();
+		env.setModuleId(artifact);
+
+		if (cfg != null && cfg.isSharedLib()) {
+			DependenciesType dt = serviceFactory.createDependenciesType();
+			DependencyType sharedLib = createDependency("org.apache.geronimo.configs", "sharedlib", null, "car");
+			dt.getDependency().add(sharedLib);
+			env.setDependencies(dt);
+		}
+
+   	    Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.getConfigEnvironment", env);
+		return env;
+	}
+
+	private static boolean hasValue(String attribute) {
+		return attribute != null && attribute.trim().length() != 0;
+	}
+	
+	public static ArtifactType createArtifact(String groupId, String artifactId, String version, String type) {
+  		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);
+
+  		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		ArtifactType artifact = serviceFactory.createArtifactType();
+
+		if (groupId != null)
+			artifact.setGroupId(groupId);
+		if (artifactId != null)
+			artifact.setArtifactId(artifactId);
+		if (version != null)
+			artifact.setVersion(version);
+		artifact.setType(type);
+		
+  		Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createArtifact", artifact);
+		return artifact;
+	}
+	
+	public static DependencyType createDependency(String groupId, String artifactId, String version, String type) {
+  		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);
+
+  		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		DependencyType dependency = serviceFactory.createDependencyType();
+		if (groupId != null)
+			dependency.setGroupId(groupId);
+		if (artifactId != null)
+			dependency.setArtifactId(artifactId);
+		if (version != null)
+			dependency.setVersion(version);
+		dependency.setType(type);
+		
+        Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.createDependency", dependency);
+		return dependency;
+	}
+
+
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/.classpath
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/.classpath?rev=818883&r1=818882&r2=818883&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/.classpath (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/.classpath Fri Sep 25 15:26:14 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/pom.xml?rev=818883&r1=818882&r2=818883&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/pom.xml Fri Sep 25 15:26:14 2009
@@ -29,6 +29,13 @@
     <build>
         <resources>
             <resource>
+                <directory>..</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>about.html</include>
+                </includes>
+            </resource>
+            <resource>
                 <directory>.</directory>
                 <includes>
                     <include>plugin.xml</include>
@@ -38,7 +45,7 @@
             </resource>
             <resource>
                 <targetPath>org/apache/geronimo/st/v11/ui/internal</targetPath>
-                <directory>src/org/apache/geronimo/st/v11/ui/internal</directory>
+                <directory>src/main/java/org/apache/geronimo/st/v11/ui/internal</directory>
                 <includes>
                     <include>Messages.properties</include>
                 </includes>
@@ -51,6 +58,27 @@
                     <include>NOTICE.txt</include>
                 </includes>
             </resource>
+	        <!-- GERONIMODEVTOOLS-406 Display license and notice in Eclipse Update Manager 
+                 See also http://www.eclipse.org/legal/guidetolegaldoc.php
+                 about.html references about_files to show licenses and notices to the user
+                 at install time using Eclipse Update Manager, and after install.
+              -->
+	    	<resource>
+	    		<targetPath>about_files</targetPath>
+	    		<directory>.</directory>
+	    		<includes>
+	    			<include>LICENSE.txt</include>
+	    			<include>NOTICE.txt</include>
+	    		</includes>
+	    	</resource>
+	    	<resource>
+	    		<targetPath>about_files</targetPath>
+	    		<directory>../..</directory>
+                <filtering>true</filtering>
+	    		<includes>
+                    <include>PLUGIN_RELEASE-NOTES-${pom.version}.txt</include>
+                </includes>
+            </resource>
         </resources>
         <plugins>
             <plugin>
@@ -61,7 +89,21 @@
                 <artifactId>maven-antrun-plugin</artifactId>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                  <execution>
+                    <goals>
+                      <goal>sign</goal>
+                    </goals>
+                  </execution>
+                </executions>
+                <configuration>
+                  <keystore>../../${keystoreFile}</keystore>
+                  <alias>${keystoreAlias}</alias>
+                  <storepass>${keystoreStorepass}</storepass>
+                  <keypass>${keystoreKeypass}</keypass>
+                </configuration>
             </plugin>
             <plugin>
                 <artifactId>maven-dependency-plugin</artifactId>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/Activator.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/Activator.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/Activator.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.apache.geronimo.st.v11.ui";
+
+	// The shared instance
+	private static Activator plugin;
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given plug-in
+	 * relative path.
+	 * 
+	 * @param path
+	 *            the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return AbstractUIPlugin.imageDescriptorFromPlugin("org.apache.geronimo.st.v11.ui", path);
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.editors;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
+import org.apache.geronimo.st.v11.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.core.GeronimoV11Utils;
+import org.apache.geronimo.st.v11.ui.pages.AppClientGeneralPage;
+import org.apache.geronimo.st.v11.ui.pages.AppGeneralPage;
+import org.apache.geronimo.st.v11.ui.pages.ConnectorOverviewPage;
+import org.apache.geronimo.st.v11.ui.pages.DeploymentPage;
+import org.apache.geronimo.st.v11.ui.pages.EjbOverviewPage;
+import org.apache.geronimo.st.v11.ui.pages.NamingFormPage;
+import org.apache.geronimo.st.v11.ui.pages.SecurityPage;
+import org.apache.geronimo.st.v11.ui.pages.WebGeneralPage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoFormContentLoader extends AbstractGeronimoFormContentLoader {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addApplicationPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addApplicationPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new AppGeneralPage(editor, "appgeneralpage", CommonMessages.editorTabGeneral));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addConnectorPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addConnectorPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new ConnectorOverviewPage(editor, "connectoroverview", CommonMessages.editorTabGeneral));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addApplicationPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addApplicationClientPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new AppClientGeneralPage(editor, "appclientgeneralpage", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        //editor.addPage(new AppClientSecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addOpenEjbPlanPages()
+     */
+    public void addOpenEjbPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new EjbOverviewPage(editor, "ejboverview", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addWebPlanPages()
+     */
+    public void addWebPlanPages(FormEditor editor) throws PartInitException {
+        AbstractGeronimoDeploymentPlanEditor geronimoEditor = (AbstractGeronimoDeploymentPlanEditor)editor;
+        JAXBElement plan = geronimoEditor.getDeploymentPlan();
+        editor.addPage(new WebGeneralPage(editor, "generalpage", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#loadDeploymentPlan(org.eclipse.core.resources.IFile)
+     */
+    public JAXBElement loadDeploymentPlan(IFile file) throws Exception {
+        return GeronimoV11Utils.getDeploymentPlan(file);
+    }
+    
+    public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws Exception {
+        JAXBUtils.marshalDeploymentPlan(deploymentPlan, file);
+    }
+
+    private NamingFormPage createNamingFormPage(FormEditor editor) {
+        return new NamingFormPage(editor, "namingpage", CommonMessages.editorTabNaming);
+    }
+
+    private DeploymentPage createDeploymentFormPage(FormEditor editor) {
+        return new DeploymentPage(editor, "deploymentpage", CommonMessages.editorTabDeployment);
+    }
+
+    public void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/internal/Trace.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/internal/Trace.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/internal/Trace.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/internal/Trace.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.internal;
+
+import org.apache.geronimo.st.v11.ui.Activator;
+
+/**
+ * Helper class to route trace output.
+ *
+ * @version $Rev: 471551 $ $Date: 2006-11-05 17:47:11 -0500 (Sun, 05 Nov 2006) $
+ */
+public class Trace {
+
+    /**
+     * Finest trace event.
+     */
+    public static byte INFO = 0;
+
+    /**
+     * Warning trace event.
+     */
+    public static byte WARNING = 1;
+
+    /**
+     * Severe trace event.
+     */
+    public static byte SEVERE = 2;
+
+    /**
+     * Trace constructor comment.
+     */
+    private Trace() {
+        super();
+    }
+
+    /**
+     * Trace the given text.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     */
+    public static void trace(byte level, String s) {
+        trace(level, s, null);
+    }
+
+    /**
+     * Trace the given message and exception.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     * @param t
+     *            a throwable
+     */
+    public static void trace(byte level, String s, Throwable t) {
+        if (!Activator.getDefault().isDebugging())
+            return;
+
+        System.out.println(Activator.PLUGIN_ID + ":  " + s);
+        if (t != null)
+            t.printStackTrace();
+    }
+
+    /**
+     * Trace the given message 
+     * 
+     * @param tracePoint
+     *            The trace point (e.g., "Exit", "Entry", "Constructor", etc....
+     *            
+     * @param classDotMethod
+     *            The class name + method name (e.g., "Class.method()")
+     *            
+     * @param parm1,2,3,4,5
+     *            Method parameters if the trace point is an "Entry"
+     *            or
+     *            Return value if the trace point is an "Exit"
+     */
+    public static void trace(String tracePoint, String classDotMethod) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "()" );
+    }   
+    public static void trace(String tracePoint, String classDotMethod, Object parm1) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null ? null : parm1.toString()) + "] )" );
+    }
+
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object parm2) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null ? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null ? null : parm2.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object parm2, Object parm3) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null ? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null ? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null ? null : parm3.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object parm2, Object parm3, Object parm4) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null ? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null ? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null ? null : parm3.toString()) + "], " +
+                                                                 "parm4=[" + (parm4 == null ? null : parm4.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null ? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null ? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null ? null : parm3.toString()) + "], " +
+                                                                 "parm4=[" + (parm4 == null ? null : parm4.toString()) + "], " +
+                                                                 "parm5=[" + (parm5 == null ? null : parm5.toString()) + "] )" );
+    }
+}
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientGeneralPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientGeneralPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientGeneralPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.AppClientClientGeneralSection;
+import org.apache.geronimo.st.v11.ui.sections.AppClientServerGeneralSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
+ */
+public class AppClientGeneralPage extends AbstractGeronimoFormPage {
+
+	public AppClientGeneralPage(FormEditor editor, String id, String title) {
+		super(editor, id, title);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+	 */
+	protected void fillBody(IManagedForm managedForm) {
+		managedForm.addPart(new AppClientClientGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+		managedForm.addPart(new AppClientServerGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+	 */
+	public String getFormTitle() {
+		return CommonMessages.appClientGeneralPageTitle;
+	}
+
+	@Override
+	protected void triggerGeronimoServerInfoUpdate() {
+		GeronimoServerInfo.getInstance().updateInfo();
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientSecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientSecurityPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientSecurityPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppClientSecurityPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,70 @@
+///*
+// * Licensed to the Apache Software Foundation (ASF) under one or more
+// * contributor license agreements.  See the NOTICE file distributed with
+// * this work for additional information regarding copyright ownership.
+// * The ASF licenses this file to You 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.ui.pages;
+//
+//import org.apache.geronimo.st.ui.CommonMessages;
+//import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+//import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+//import org.apache.geronimo.st.v11.ui.sections.AppClientSecuritySection;
+//import org.eclipse.swt.layout.GridLayout;
+//import org.eclipse.ui.forms.IManagedForm;
+//import org.eclipse.ui.forms.editor.FormEditor;
+//
+///**
+// * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
+// */
+//public class AppClientSecurityPage extends AbstractGeronimoFormPage {
+//
+//    public AppClientSecurityPage(FormEditor editor, String id, String title) {
+//        super(editor, id, title);
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     * 
+//     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+//     */
+//    protected void fillBody(IManagedForm managedForm) {
+//        managedForm.addPart(new AppClientSecuritySection(body, toolkit, getStyle(), getDeploymentPlan()));
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     * 
+//     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getLayout()
+//     */
+//    protected GridLayout getLayout() {
+//        GridLayout layout = super.getLayout();
+//        layout.numColumns = 1;
+//        return layout;
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     * 
+//     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+//     */
+//    public String getFormTitle() {
+//        return CommonMessages.securityPageTitle;
+//    }
+//
+//    @Override
+//    protected void triggerGeronimoServerInfoUpdate() {
+//        GeronimoServerInfo.getInstance().updateInfo();
+//    }
+//
+//}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppGeneralPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppGeneralPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/AppGeneralPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.AppGeneralSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AppGeneralPage extends AbstractGeronimoFormPage {
+
+	public AppGeneralPage(FormEditor editor, String id, String title) {
+		super(editor, id, title);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+	 */
+	protected void fillBody(IManagedForm managedForm) {
+		managedForm.addPart(new AppGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+	 */
+	public String getFormTitle() {
+		return CommonMessages.appGeneralPageTitle;
+	}
+
+	@Override
+	protected void triggerGeronimoServerInfoUpdate() {
+		GeronimoServerInfo.getInstance().updateInfo();
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/ConnectorOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/ConnectorOverviewPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/ConnectorOverviewPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/ConnectorOverviewPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v11.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.ConnectorGeneralSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ConnectorOverviewPage extends AbstractGeronimoFormPage {
+
+	public ConnectorOverviewPage(FormEditor editor, String id, String title) {
+		super(editor, id, title);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+	 */
+	protected void fillBody(IManagedForm managedForm) {
+		managedForm.addPart(new ConnectorGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+	 */
+	public String getFormTitle() {
+		return CommonMessages.connectorOverViewPageTitle;
+	}
+
+	@Override
+	protected void triggerGeronimoServerInfoUpdate() {
+		GeronimoServerInfo.getInstance().updateInfo();
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.ui.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v11.ui.sections.AdminObjectSection;
+import org.apache.geronimo.st.v11.ui.sections.ClassFilterSection;
+import org.apache.geronimo.st.v11.ui.sections.DependencySection;
+import org.apache.geronimo.st.v11.ui.sections.ExtModuleSection;
+import org.apache.geronimo.st.v11.ui.sections.GBeanSection;
+import org.apache.geronimo.st.v11.ui.sections.ModuleSection;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class DeploymentPage extends AbstractGeronimoFormPage {
+    
+    public DeploymentPage(FormEditor editor, String id, String title) {
+        super(editor, id, title);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+     */
+    protected void fillBody(IManagedForm managedForm) {
+        managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle()));
+        managedForm.addPart(new GBeanSection(getDeploymentPlan(), JAXBModelUtils.getGbeans(getDeploymentPlan()), body, toolkit, getStyle()));
+        managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle(), true, true));
+        managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle(), true, false));
+
+        if (ApplicationType.class.isInstance(getDeploymentPlan().getValue())) {
+        	ApplicationType application = (ApplicationType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+            managedForm.addPart(new ModuleSection(getDeploymentPlan(), body, toolkit, getStyle(), application.getModule()));
+            managedForm.addPart(new ExtModuleSection(getDeploymentPlan(), body, toolkit, getStyle(), application.getExtModule()));
+        } 
+        if (ConnectorType.class.isInstance(getDeploymentPlan().getValue())) {
+        	ConnectorType connector = (ConnectorType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+            managedForm.addPart(new AdminObjectSection(getDeploymentPlan(), body, toolkit, getStyle(), connector.getAdminobject()));
+        }
+        if (ApplicationClientType.class.isInstance(getDeploymentPlan().getValue())) {
+            managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false));
+            managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, true));
+            managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, false));
+        }
+    }
+    
+    protected GridLayout getLayout() {
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.horizontalSpacing = 20;
+        return layout;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+     */
+    public String getFormTitle() {
+        return CommonMessages.deploymentPageTitle;
+    }
+
+    @Override
+    protected void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+
+}



Mime
View raw message