geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r565397 [2/3] - in /geronimo/server/trunk: applications/console/geronimo-console-framework/src/main/webapp/WEB-INF/data/ applications/console/geronimo-console-standard/ applications/console/geronimo-console-standard/src/main/java/org/apache...
Date Mon, 13 Aug 2007 16:21:46 GMT
Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java Mon Aug 13 09:21:44 2007
@@ -0,0 +1,495 @@
+/**
+ *  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.console.configcreator;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.jar.JarFile;
+
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.model.exceptions.DDBeanCreateException;
+import javax.enterprise.deploy.shared.factories.DeploymentFactoryManager;
+import javax.enterprise.deploy.spi.DeploymentConfiguration;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.management.ObjectName;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+
+import org.apache.geronimo.connector.deployment.AdminObjectRefBuilder.AdminObjectRefProcessor;
+import org.apache.geronimo.connector.deployment.ResourceRefBuilder.ResourceRefProcessor;
+import org.apache.geronimo.console.configcreator.AbstractHandler.ReferenceData;
+import org.apache.geronimo.console.configcreator.AbstractHandler.WARConfigData;
+import org.apache.geronimo.console.configcreator.JSR77_Util.ReferredData;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.deployment.ConfigurationBuilder;
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
+import org.apache.geronimo.deployment.service.jsr88.EnvironmentData;
+import org.apache.geronimo.deployment.tools.loader.WebDeployable;
+import org.apache.geronimo.j2ee.ApplicationInfo;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
+import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
+import org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.ResourceAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.SecurityAnnotationHelper;
+import org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationHelper;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.naming.deployment.EnvironmentEntryBuilder.EnvEntryRefProcessor;
+import org.apache.geronimo.naming.deployment.SwitchingServiceRefBuilder.ServiceRefProcessor;
+import org.apache.geronimo.naming.deployment.jsr88.EjbLocalRef;
+import org.apache.geronimo.naming.deployment.jsr88.EjbRef;
+import org.apache.geronimo.naming.deployment.jsr88.MessageDestination;
+import org.apache.geronimo.naming.deployment.jsr88.Pattern;
+import org.apache.geronimo.naming.deployment.jsr88.ResourceEnvRef;
+import org.apache.geronimo.naming.deployment.jsr88.ResourceRef;
+import org.apache.geronimo.web.deployment.WebAppDConfigBean;
+import org.apache.geronimo.web.deployment.WebAppDConfigRoot;
+import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
+import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
+import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
+import org.apache.geronimo.xbeans.javaee.EjbLocalRefType;
+import org.apache.geronimo.xbeans.javaee.EjbRefType;
+import org.apache.geronimo.xbeans.javaee.MessageDestinationType;
+import org.apache.geronimo.xbeans.javaee.ResourceEnvRefType;
+import org.apache.geronimo.xbeans.javaee.ResourceRefType;
+import org.apache.geronimo.xbeans.javaee.SecurityRoleType;
+import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.xbean.finder.ClassFinder;
+
+/**
+ * Util class for JSR-88 related functions
+ * 
+ * @version $Rev$ $Date$
+ */
+public class JSR88_Util {
+
+    private static void parseAnnotations(AnnotatedApp annotatedApp, ClassFinder classFinder) throws Exception {
+        ResourceAnnotationHelper.processAnnotations(annotatedApp, classFinder, EnvEntryRefProcessor.INSTANCE);
+        WebServiceRefAnnotationHelper.processAnnotations(annotatedApp, classFinder);
+        HandlerChainAnnotationHelper.processAnnotations(annotatedApp, classFinder);
+        ResourceAnnotationHelper.processAnnotations(annotatedApp, classFinder, ServiceRefProcessor.INSTANCE);
+        ResourceAnnotationHelper.processAnnotations(annotatedApp, classFinder, AdminObjectRefProcessor.INSTANCE);
+        ResourceAnnotationHelper.processAnnotations(annotatedApp, classFinder, ResourceRefProcessor.INSTANCE);
+        PersistenceContextAnnotationHelper.processAnnotations(annotatedApp, classFinder);
+        PersistenceUnitAnnotationHelper.processAnnotations(annotatedApp, classFinder);
+        EJBAnnotationHelper.processAnnotations(annotatedApp, classFinder);
+        if (annotatedApp instanceof AnnotatedWebApp) {
+            SecurityAnnotationHelper.processAnnotations(((AnnotatedWebApp) annotatedApp).getWebApp(), classFinder);
+        }
+    }
+
+    private static ConfigurationBuilder getConfigurationBuilder(PortletRequest request) {
+        Object[] builders = PortletManager.getGBeansImplementing(request, ConfigurationBuilder.class);
+        ConfigurationBuilder configurationBuilder = null;
+        for (int i = 0; i < builders.length; i++) {
+            ObjectName objectName = PortletManager.getNameFor(request, builders[i]).getObjectName();
+            if ("EARBuilder".equalsIgnoreCase(objectName.getKeyProperty(NameFactory.J2EE_NAME))) {
+                configurationBuilder = (ConfigurationBuilder) builders[i];
+                break;
+            }
+        }
+        return configurationBuilder;
+    }
+
+    private static ApplicationInfo createApplicationInfo(PortletRequest request, URL moduleUrl) throws Exception {
+        ConfigurationBuilder configurationBuilderBuilder = getConfigurationBuilder(request);
+        File moduleFile = new File(moduleUrl.toURI());
+        JarFile moduleJar = new JarFile(moduleFile);
+        ApplicationInfo applicationInfo = (ApplicationInfo) configurationBuilderBuilder.getDeploymentPlan(null, moduleJar,
+                new ModuleIDBuilder());
+        return applicationInfo;
+    }
+
+    public static void parseWarReferences(PortletRequest request, WARConfigData data, URL warUrl)
+            throws Exception {
+        WebDeployable webDeployable = new WebDeployable(warUrl);
+        ClassLoader classLoader = webDeployable.getModuleLoader();
+
+        ApplicationInfo applicationInfo = createApplicationInfo(request, warUrl);
+        Module module = (Module) (applicationInfo.getModules().toArray()[0]);
+        WebAppType webApp = (WebAppType) module.getSpecDD();
+
+        ClassFinder classFinder = null;
+        try {
+            classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
+            // classFinder = new ClassFinder(classLoader);
+        } catch (NoClassDefFoundError e1) {
+            // Some of the class types referred in the WAR cannot be resolved.
+            // A typical case would be references to EJBs already deployed into the system, and
+            // hence not packaged inside WEB-INF/lib directory of WAR.
+            // try adding all EJBs deployed in the system as parents of this WAR, and
+            // see if referred classes can now be successfully resolved
+
+            classLoader = new WebDeployable(warUrl, getEjbClassLoaders(request)).getModuleLoader();
+            try {
+                classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
+            } catch (NoClassDefFoundError e2) {
+                return;
+            }
+        }
+        AnnotatedApp annotatedApp = module.getAnnotatedApp();
+        parseAnnotations(annotatedApp, classFinder);
+
+        //DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
+        //DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
+
+        EjbRefType[] ejbRefs = annotatedApp.getEjbRefArray();
+        for (int i = 0; i < ejbRefs.length; i++) {
+            String refName = ejbRefs[i].getEjbRefName().getStringValue();
+            data.getEjbRefs().add(new ReferenceData(refName));
+        }
+        /*DDBean[] ddBeans = ddBean.getChildBean("ejb-ref");
+        for (int i = 0; ddBeans != null && i < ddBeans.length; i++) {
+            String refName = ddBeans[i].getChildBean("ejb-ref-name")[0].getText();
+            data.getEjbRefs().add(new ReferenceData(refName));
+        }*/
+
+        EjbLocalRefType[] ejbLocalRefs = annotatedApp.getEjbLocalRefArray();
+        for (int i = 0; i < ejbLocalRefs.length; i++) {
+            String refName = ejbLocalRefs[i].getEjbRefName().getStringValue();
+            data.getEjbLocalRefs().add(new ReferenceData(refName));
+        }
+        /*ddBeans = ddBean.getChildBean("ejb-local-ref");
+        for (int i = 0; ddBeans != null && i < ddBeans.length; i++) {
+            String refName = ddBeans[i].getChildBean("ejb-ref-name")[0].getText();
+            data.getEjbLocalRefs().add(new ReferenceData(refName));
+        }*/
+
+        ResourceRefType[] resourceRefs = annotatedApp.getResourceRefArray();
+        for(int i = 0; i < resourceRefs.length; i++) {
+            String refName = resourceRefs[i].getResRefName().getStringValue();
+            String refType = resourceRefs[i].getResType().getStringValue();
+            if ("javax.sql.DataSource".equalsIgnoreCase(refType)) {
+                data.getJdbcPoolRefs().add(new ReferenceData(refName));
+            } else if ("javax.jms.ConnectionFactory".equalsIgnoreCase(refType)
+                    || "javax.jms.QueueConnectionFactory".equalsIgnoreCase(refType)
+                    || "javax.jms.TopicConnectionFactory".equalsIgnoreCase(refType)) {
+                data.getJmsConnectionFactoryRefs().add(new ReferenceData(refName));
+            }
+        }
+        /*ddBeans = ddBean.getChildBean("resource-ref");
+        for (int i = 0; ddBeans != null && i < ddBeans.length; i++) {
+            String refName = ddBeans[i].getChildBean("res-ref-name")[0].getText();
+            String refType = ddBeans[i].getChildBean("res-type")[0].getText();
+            if ("javax.sql.DataSource".equalsIgnoreCase(refType)) {
+                data.getJdbcPoolRefs().add(new ReferenceData(refName));
+            } else if ("javax.jms.ConnectionFactory".equalsIgnoreCase(refType)
+                    || "javax.jms.QueueConnectionFactory".equalsIgnoreCase(refType)
+                    || "javax.jms.TopicConnectionFactory".equalsIgnoreCase(refType)) {
+                data.getJmsConnectionFactoryRefs().add(new ReferenceData(refName));
+            }
+        }*/
+
+        ResourceEnvRefType[] resourceEnvRefs = annotatedApp.getResourceEnvRefArray();
+        for(int i = 0; i < resourceEnvRefs.length; i++) {
+            String refName = resourceEnvRefs[i].getResourceEnvRefName().getStringValue();
+            ReferenceData refData = new ReferenceData(refName);
+            refData.setRefLink(refName);
+            data.getJmsDestinationRefs().add(refData);
+        }
+        if(annotatedApp instanceof AnnotatedWebApp) {
+            WebAppType webApp2 = ((AnnotatedWebApp)annotatedApp).getWebApp();
+            MessageDestinationType[] messageDestinations = webApp2.getMessageDestinationArray();
+            for(int i = 0; i < messageDestinations.length; i++) {
+                String refName = messageDestinations[i].getMessageDestinationName().getStringValue();
+                ReferenceData refData = new ReferenceData(refName);
+                refData.setRefLink(refName);
+                data.getMessageDestinations().add(refData);
+            }
+
+            SecurityRoleType[] securityRoles = webApp2.getSecurityRoleArray();
+            if (securityRoles.length > 0) {
+                data.setSecurity(GerSecurityType.Factory.newInstance());
+                data.getSecurity().addNewRoleMappings();
+            }
+            for (int i = 0; i < securityRoles.length; i++) {
+                String roleName = securityRoles[i].getRoleName().getStringValue();
+                GerRoleType role = data.getSecurity().getRoleMappings().addNewRole();
+                role.setRoleName(roleName);
+            }
+        }
+        /*ddBeans = ddBean.getChildBean("message-destination");
+        for (int i = 0; ddBeans != null && i < ddBeans.length; i++) {
+            String refName = ddBeans[i].getChildBean("message-destination-name")[0].getText();
+            ReferenceData refData = new ReferenceData(refName);
+            refData.setRefLink(refName);
+            data.getJmsDestinationRefs().add(refData);
+        }*/
+    }
+
+    private static List getEjbClassLoaders(PortletRequest request) {
+        List deployedEjbs = JSR77_Util.getDeployedEJBs(request);
+        List configurations = new ArrayList();
+        for (int i = 0; i < deployedEjbs.size(); i++) {
+            String ejbPatternName = ((ReferredData) deployedEjbs.get(i)).getPatternName();
+            configurations.add(getDependencyString(ejbPatternName));
+        }
+        return getConfigClassLoaders(configurations);
+    }
+
+    private static List getConfigClassLoaders(List configurationNames) {
+        List classLoaders = new ArrayList();
+        ConfigurationManager configurationManager = PortletManager.getConfigurationManager();
+        for (int i = 0; i < configurationNames.size(); i++) {
+            Artifact configurationId = Artifact.create((String) configurationNames.get(i));
+            classLoaders.add(configurationManager.getConfiguration(configurationId).getConfigurationClassLoader());
+        }
+        return classLoaders;
+    }
+
+    public static String getDependencyString(String patternString) {
+        String[] elements = patternString.split("/");
+        return elements[0] + "/" + elements[1] + "/" + elements[2] + "/" + elements[3];
+    }
+
+    public static String createDeploymentPlan(PortletRequest request, WARConfigData data, URL WarUrl)
+            throws IOException, DDBeanCreateException, InvalidModuleException, ConfigurationException {
+        WebDeployable webDeployable = new WebDeployable(WarUrl);
+        DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
+        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
+
+        DeploymentManager deploymentManager = PortletManager.getDeploymentManager(request);
+        DeploymentConfiguration deploymentConfiguration = deploymentManager.createConfiguration(webDeployable);
+        WebAppDConfigRoot configRoot = (WebAppDConfigRoot) deploymentConfiguration.getDConfigBeanRoot(ddBeanRoot);
+        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);
+
+        webApp.setContextRoot(data.getContextRoot());
+
+        EnvironmentData environment = new EnvironmentData();
+        webApp.setEnvironment(environment);
+        org.apache.geronimo.deployment.service.jsr88.Artifact configId = new org.apache.geronimo.deployment.service.jsr88.Artifact();
+        environment.setConfigId(configId);
+        configId.setGroupId(data.getGroupId());
+        configId.setArtifactId(data.getArtifactId());
+        configId.setVersion(data.getVersion());
+        configId.setType(data.getType());
+        int numDependencies = data.getDependencies().size();
+        if (numDependencies > 0) {
+            org.apache.geronimo.deployment.service.jsr88.Artifact[] dependencies = new org.apache.geronimo.deployment.service.jsr88.Artifact[numDependencies];
+            for (int i = 0; i < numDependencies; i++) {
+                dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
+            }
+            environment.setDependencies(dependencies);
+            for (int i = 0; i < numDependencies; i++) {
+                Artifact artifact = Artifact.create(((String) data.getDependencies().get(i)).trim());
+                org.apache.geronimo.deployment.service.jsr88.Artifact dep = dependencies[i];
+                dep.setArtifactId(artifact.getArtifactId());
+                if (artifact.getGroupId() != null) {
+                    dep.setGroupId(artifact.getGroupId());
+                }
+                if (artifact.getType() != null) {
+                    dep.setType(artifact.getType());
+                }
+                if (artifact.getVersion() != null) {
+                    dep.setVersion(artifact.getVersion().toString());
+                }
+            }
+        }
+        String hiddenClassesString = data.getHiddenClasses();
+        if (hiddenClassesString != null && hiddenClassesString.length() > 0) {
+            String[] hiddenClasses = getNonEmptyStrings(hiddenClassesString.split(";"));
+            if (hiddenClasses.length > 0) {
+                environment.setHiddenClasses(hiddenClasses);
+            }
+        }
+        String nonOverridableClassesString = data.getNonOverridableClasses();
+        if (nonOverridableClassesString != null && nonOverridableClassesString.length() > 0) {
+            String[] nonOverridableClasses = getNonEmptyStrings(nonOverridableClassesString.split(";"));
+            if (nonOverridableClasses.length > 0) {
+                environment.setNonOverridableClasses(nonOverridableClasses);
+            }
+        }
+        if (data.isInverseClassLoading()) {
+            environment.setInverseClassLoading(true);
+        }
+
+        int numEjbRefs = data.getEjbRefs().size();
+        if (numEjbRefs > 0) {
+            EjbRef[] ejbRefs = new EjbRef[numEjbRefs];
+            for (int i = 0; i < numEjbRefs; i++) {
+                ejbRefs[i] = new EjbRef();
+            }
+            webApp.setEjbRefs(ejbRefs);
+            for (int i = 0; i < numEjbRefs; i++) {
+                EjbRef ejbRef = ejbRefs[i];
+                ReferenceData referenceData = (ReferenceData) data.getEjbRefs().get(i);
+                ejbRef.setRefName(referenceData.getRefName());
+                ejbRef.setPattern(createPattern(referenceData.getRefLink()));
+            }
+        }
+
+        int numEjbLocalRefs = data.getEjbLocalRefs().size();
+        if (numEjbLocalRefs > 0) {
+            EjbLocalRef[] ejbLocalRefs = new EjbLocalRef[numEjbLocalRefs];
+            for (int i = 0; i < numEjbLocalRefs; i++) {
+                ejbLocalRefs[i] = new EjbLocalRef();
+            }
+            webApp.setEjbLocalRefs(ejbLocalRefs);
+            for (int i = 0; i < numEjbLocalRefs; i++) {
+                EjbLocalRef ejbLocalRef = ejbLocalRefs[i];
+                ReferenceData referenceData = (ReferenceData) data.getEjbLocalRefs().get(i);
+                ejbLocalRef.setRefName(referenceData.getRefName());
+                ejbLocalRef.setPattern(createPattern(referenceData.getRefLink()));
+            }
+        }
+
+        int numResourceRefs = data.getJdbcPoolRefs().size() + data.getJmsConnectionFactoryRefs().size();
+        if (numResourceRefs > 0) {
+            ResourceRef[] resourceRefs = new ResourceRef[numResourceRefs];
+            for (int i = 0; i < numResourceRefs; i++) {
+                resourceRefs[i] = new ResourceRef();
+            }
+            webApp.setResourceRefs(resourceRefs);
+            int i = 0;
+            for (int l = 0; l < data.getJdbcPoolRefs().size(); l++, i++) {
+                ResourceRef resourceRef = resourceRefs[i];
+                ReferenceData referenceData = (ReferenceData) data.getJdbcPoolRefs().get(l);
+                resourceRef.setRefName(referenceData.getRefName());
+                resourceRef.setPattern(createPattern(referenceData.getRefLink()));
+            }
+            for (int m = 0; m < data.getJmsConnectionFactoryRefs().size(); m++, i++) {
+                ResourceRef resourceRef = resourceRefs[i];
+                ReferenceData referenceData = (ReferenceData) data.getJmsConnectionFactoryRefs().get(m);
+                resourceRef.setRefName(referenceData.getRefName());
+                resourceRef.setPattern(createPattern(referenceData.getRefLink()));
+            }
+        }
+
+        int numMessageDestinations = data.getMessageDestinations().size();
+        if (numMessageDestinations > 0) {
+            MessageDestination[] messageDestinations = new MessageDestination[numMessageDestinations];
+            for (int i = 0; i < numMessageDestinations; i++) {
+                messageDestinations[i] = new MessageDestination();
+            }
+            webApp.setMessageDestinations(messageDestinations);
+            for (int i = 0; i < numMessageDestinations; i++) {
+                MessageDestination messageDestination = messageDestinations[i];
+                ReferenceData referenceData = (ReferenceData) data.getMessageDestinations().get(i);
+                messageDestination.setMessageDestinationName(referenceData.getRefName());
+                // messageDestination.setPattern(createPattern(referenceData.getRefLink()));
+                messageDestination.setAdminObjectLink(createPattern(referenceData.getRefLink()).getName());
+            }
+        }
+
+        int numResourceEnvRefs = data.getJmsDestinationRefs().size();
+        if (numResourceEnvRefs > 0) {
+            ResourceEnvRef[] resourceEnvRefs = new ResourceEnvRef[numResourceEnvRefs];
+            for (int i = 0; i < numResourceEnvRefs; i++) {
+                resourceEnvRefs[i] = new ResourceEnvRef();
+            }
+            webApp.setResourceEnvRefs(resourceEnvRefs);
+            for (int i = 0; i < numResourceEnvRefs; i++) {
+                ResourceEnvRef resourceEnvRef = resourceEnvRefs[i];
+                ReferenceData referenceData = (ReferenceData) data.getJmsDestinationRefs().get(i);
+                resourceEnvRef.setRefName(referenceData.getRefName());
+                resourceEnvRef.setPattern(createPattern(referenceData.getRefLink()));
+                // resourceEnvRef.setAdminObjectLink(createPattern(referenceData.getRefLink()).getName());
+            }
+        }
+
+        if (data.getSecurity() != null) {
+            webApp.setSecurityRealmName(data.getSecurityRealmName());
+            webApp.setSecurity(data.getSecurity());
+        }
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        deploymentConfiguration.save(out);
+        out.close();
+        return new String(out.toByteArray(), "US-ASCII");
+    }
+
+    private static Pattern createPattern(String patternString) {
+        Pattern pattern = new Pattern();
+        String[] elements = patternString.split("/");
+        pattern.setGroupId(elements[0]);
+        pattern.setArtifactId(elements[1]);
+        pattern.setVersion(elements[2]);
+        pattern.setType(elements[3]);
+        pattern.setModule(elements[4]);
+        pattern.setName(elements[5]);
+        return pattern;
+    }
+
+    private static String[] getNonEmptyStrings(String[] strings) {
+        ArrayList list = new ArrayList();
+        for (int i = 0; i < strings.length; i++) {
+            if (strings[i].trim().length() > 0)
+                list.add(strings[i].trim());
+        }
+        return (String[]) list.toArray(new String[list.size()]);
+    }
+
+    public static String[] deploy(PortletRequest actionRequest, File moduleFile, File planFile)
+            throws PortletException {
+        // TODO this is a duplicate of the code from
+        // org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction()
+        // TODO need to eliminate this duplicate code
+        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
+        String[] statusMsgs = new String[2];
+        try {
+            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
+            try {
+                if (mgr instanceof JMXDeploymentManager) {
+                    ((JMXDeploymentManager) mgr).setLogConfiguration(false, true);
+                }
+                ProgressObject progress = mgr.distribute(mgr.getTargets(), moduleFile, planFile);
+                while (progress.getDeploymentStatus().isRunning()) {
+                    Thread.sleep(100);
+                }
+
+                String abbrStatusMessage;
+                String fullStatusMessage = null;
+                if (progress.getDeploymentStatus().isCompleted()) {
+                    abbrStatusMessage = "The application was successfully deployed.<br/>";
+                    // start installed app/s
+                    progress = mgr.start(progress.getResultTargetModuleIDs());
+                    while (progress.getDeploymentStatus().isRunning()) {
+                        Thread.sleep(100);
+                    }
+                    abbrStatusMessage += "The application was successfully started";
+                } else {
+                    fullStatusMessage = progress.getDeploymentStatus().getMessage();
+                    // for the abbreviated status message clip off everything
+                    // after the first line, which in most cases means the gnarly stacktrace
+                    abbrStatusMessage = "Deployment failed:<br/>"
+                            + fullStatusMessage.substring(0, fullStatusMessage.indexOf('\n'));
+                }
+                statusMsgs[0] = abbrStatusMessage;
+                statusMsgs[1] = fullStatusMessage;
+            } finally {
+                mgr.release();
+            }
+        } catch (Exception e) {
+            throw new PortletException(e);
+        }
+        return statusMsgs;
+    }
+}

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java Mon Aug 13 09:21:44 2007
@@ -0,0 +1,91 @@
+/**
+ *  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.console.configcreator;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.List;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+
+/**
+ * A handler for ...
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ReferencesHandler extends AbstractHandler {
+    private static final Log log = LogFactory.getLog(ReferencesHandler.class);
+
+    public ReferencesHandler() {
+        super(REFERENCES_MODE, "/WEB-INF/view/configcreator/references.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        WARConfigData data = getSessionData(request);
+        request.setAttribute(DATA_PARAMETER, data);
+        request.setAttribute(DEPLOYED_EJBS_PARAMETER, JSR77_Util.getDeployedEJBs(request));
+        request.setAttribute(DEPLOYED_JDBC_CONNECTION_POOLS_PARAMETER, JSR77_Util.getJDBCConnectionPools(request));
+        request.setAttribute(DEPLOYED_JMS_CONNECTION_FACTORIES_PARAMETER, JSR77_Util.getJMSConnectionFactories(request));
+        request.setAttribute(DEPLOYED_JMS_DESTINATIONS_PARAMETER, JSR77_Util.getJMSDestinations(request));
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        WARConfigData data = getSessionData(request);
+        data.readReferencesData(request);
+        HashSet dependenciesSet = new HashSet();
+        if (processRefs(data.getEjbRefs(), dependenciesSet)
+                && processRefs(data.getEjbLocalRefs(), dependenciesSet)
+                && processRefs(data.getJdbcPoolRefs(), dependenciesSet)
+                && processRefs(data.getJmsConnectionFactoryRefs(), dependenciesSet)
+                && processRefs(data.getJmsDestinationRefs(), dependenciesSet)) {
+            data.getDependencies().addAll(dependenciesSet);
+            if (data.getSecurity() != null) {
+                return SECURITY_MODE + "-before";
+            }
+            return DEPENDENCIES_MODE + "-before";
+        }
+        data.setReferenceNotResolved(true);
+        return getMode() + "-before";
+    }
+
+    private boolean processRefs(List refList, HashSet dependenciesSet) {
+        for (int i = 0; i < refList.size(); i++) {
+            ReferenceData referenceData = (ReferenceData) refList.get(i);
+            String referenceLink = referenceData.getRefLink();
+            if (referenceLink == null || referenceLink.length() <= 0) {
+                return false;
+            }
+            dependenciesSet.add(JSR88_Util.getDependencyString(referenceLink));
+        }
+        return true;
+    }
+}

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java Mon Aug 13 09:21:44 2007
@@ -0,0 +1,61 @@
+/**
+ *  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.console.configcreator;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+
+/**
+ * A handler for ...
+ * 
+ * @version $Rev$ $Date$
+ */
+public class SecurityHandler extends AbstractHandler {
+    private static final Log log = LogFactory.getLog(SecurityHandler.class);
+
+    public SecurityHandler() {
+        super(SECURITY_MODE, "/WEB-INF/view/configcreator/security.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        WARConfigData data = getSessionData(request);
+        request.setAttribute(DATA_PARAMETER, data);
+        request.setAttribute(DEPLOYED_SECURITY_REALMS_PARAMETER, JSR77_Util.getDeployedSecurityRealms(request));
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        WARConfigData data = getSessionData(request);
+        data.readSecurityData(request);
+        return DEPENDENCIES_MODE + "-before";
+    }
+}

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configcreator/SecurityHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java?view=diff&rev=565397&r1=565396&r2=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java Mon Aug 13 09:21:44 2007
@@ -489,7 +489,7 @@
                     if(artifact.getGroupId() != null) {
                         dep.setGroupId(artifact.getGroupId());
                     }
-                    if(artifact.getGroupId() != null) {
+                    if(artifact.getType() != null) {
                         dep.setType(artifact.getType());
                     }
                     if(artifact.getVersion() != null) {
@@ -643,4 +643,5 @@
         return null;
     }
 }
+
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java?view=diff&rev=565397&r1=565396&r2=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java Mon Aug 13 09:21:44 2007
@@ -41,7 +41,9 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -107,6 +109,10 @@
             log.error(e.getMessage(), e);
             return null;
         }
+    }
+
+    public static ConfigurationManager getConfigurationManager() {
+        return ConfigurationUtil.getConfigurationManager(getKernel());
     }
 
     public static ManagementHelper getManagementHelper(PortletRequest request) {

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml?view=diff&rev=565397&r1=565396&r2=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml Mon Aug 13 09:21:44 2007
@@ -772,6 +772,29 @@
     </portlet>
 
     <portlet>
+        <description>Portlet for creating Geronimo Deployment Plan</description>
+        <portlet-name>CreatePlan</portlet-name>
+        <display-name>Create Deployment Plan Portlet</display-name>
+
+        <portlet-class>org.apache.geronimo.console.configcreator.CreatePlanPortlet</portlet-class>
+
+        <expiration-cache>-1</expiration-cache>
+
+        <supports>
+            <mime-type>text/html</mime-type>
+            <portlet-mode>VIEW</portlet-mode>
+        </supports>
+
+        <supported-locale>en</supported-locale>
+
+        <portlet-info>
+            <title>Create Geronimo Deployment Plan</title>
+            <short-title>Create Deployment Plan</short-title>
+            <keywords>Create Deployment Plan</keywords>
+        </portlet-info>
+    </portlet>
+
+    <portlet>
         <description>Portlet for displaying EAR modules</description>
         <portlet-name>EARModules</portlet-name>
         <display-name>EAR Modules Portlet</display-name>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp Mon Aug 13 09:21:44 2007
@@ -0,0 +1,69 @@
+<%--
+   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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<p><b>WAR - Dependencies</b> -- Select the dependencies your WAR has on other Archives</p>
+
+<p>Description goes here ...</p>
+
+<!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
+<form name="<portlet:namespace/>DependenciesForm" action="<portlet:actionURL/>" method="POST">
+<input type="hidden" name="mode" value="dependencies-after" />
+
+<table border="0">
+  <!-- SUBMIT BUTTON -->
+  <tr>
+    <th>
+    <div align="right"></div>
+    </th>
+    <td><input type="submit" value="Next" /></td>
+  </tr>
+
+  <!-- Dependencies -->
+  <c:forEach var="commonLib" items="${commonLibs}">
+    <tr>
+      <td><input type="checkbox" name="selectedLibs" value="${commonLib}"
+        <c:forEach var="dependency" items="${data.dependencies}">
+          <c:if test="${commonLib == dependency}">checked="checked"
+          </c:if>
+        </c:forEach> />
+      </td>
+      <td>
+      ${commonLib}
+      </td>
+    </tr>
+  </c:forEach>
+
+  <!-- SUBMIT BUTTON -->
+  <tr>
+    <th>
+    <div align="right"></div>
+    </th>
+    <td><input type="submit" value="Next" /></td>
+  </tr>
+</table>
+</form>
+<!--   END OF FORM TO COLLECT DATA FOR THIS PAGE   -->
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/dependencies.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp Mon Aug 13 09:21:44 2007
@@ -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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<script>
+// toggle the display state of an element
+function <portlet:namespace/>toggleDisplay(id) {
+  var element = document.getElementById("<portlet:namespace/>"+id);
+  if (element.style.display == 'inline') {
+      element.style.display='none';
+  } else {
+      element.style.display='inline';
+  }
+}
+</script>
+
+<!-- Abbreviated status message -->
+<c:if test="${!(empty abbrStatusMessage)}">
+    <div id="<portlet:namespace/>abbrStatusMessage" style="display:inline">
+     ${abbrStatusMessage}<br/>
+    <c:if test="${!(empty fullStatusMessage)}">
+    <button onclick="<portlet:namespace/>toggleDisplay('fullStatusMessage');<portlet:namespace/>toggleDisplay('abbrStatusMessage');return false;">Show full details</button>
+    </c:if>
+    </div>
+</c:if>
+<!-- Full status message -->
+<c:if test="${!(empty fullStatusMessage)}">
+    <div id="<portlet:namespace/>fullStatusMessage" style="display:none">
+    <pre>
+<c:out escapeXml="true" value="${fullStatusMessage}"/>
+    </pre>
+    </div>
+</c:if>
+
+<c:if test="${empty fullStatusMessage}">
+<p><a href="/${data.contextRoot}">Launch Web App</a></p>
+</c:if>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Finish</a></p>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp Mon Aug 13 09:21:44 2007
@@ -0,0 +1,50 @@
+<%--
+   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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<p><b>Created Plan</b> -- Show Deployment Plan</p>
+
+<p>Description goes here ...</p>
+
+<!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
+<form name="<portlet:namespace/>DisplayPlan" action="<portlet:actionURL/>" method="POST">
+    <input type="hidden" name="mode" value="displayPlan-after" />
+    <table border="0">
+    <!-- STATUS FIELD: Deployment Plan -->
+      <tr>
+        <th valign="top" style="min-width: 140px"><div align="right">Deployment Plan:</div></th>
+        <td><textarea rows="30" cols="60" name="deploymentPlan">${data.deploymentPlan}</textarea></td>
+      </tr>
+    <!-- SUBMIT BUTTON -->
+      <tr>
+        <td></td>
+        <td>
+            <input type="submit" value="Deploy WAR" />
+        </td>
+      </tr>
+    </table>
+</form>
+<!--   END OF FORM TO COLLECT DATA FOR THIS PAGE   -->
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/displayPlan.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp Mon Aug 13 09:21:44 2007
@@ -0,0 +1,136 @@
+<%--
+   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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<p><b>WAR - Environment</b> -- Configure Web Application Identity and Class Path</p>
+
+<p>Enter description about the configuration elements being created in this page</p>
+
+<!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
+<form name="<portlet:namespace/>EnvironmentForm" action="<portlet:actionURL/>" method="POST">
+<input type="hidden" name="mode" value="environment-after" />
+
+<table border="0">
+  <!-- ENTRY FIELD: Context Root -->
+  <tr>
+    <th>
+    <div align="right">Web Context Root:</div>
+    </th>
+    <td><input name="contextRoot" type="text" size="20" value="${data.contextRoot}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about context-root here</td>
+  </tr>
+  <!-- ENTRY FIELD: Module Id -->
+  <tr>
+    <th colspan="2">Web Application Identity</th>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">GroupId:</div>
+    </th>
+    <td><input name="groupId" type="text" size="20" value="${data.groupId}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about groupId here</td>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">ArtifactId:</div>
+    </th>
+    <td><input name="artifactId" type="text" size="20" value="${data.artifactId}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about artifactId here</td>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">Version:</div>
+    </th>
+    <td><input name="version" type="text" size="20" value="${data.version}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about version here</td>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">Type:</div>
+    </th>
+    <td><input name="type" type="text" size="20" value="${data.type}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about type here</td>
+  </tr>
+  <!-- ENTRY FIELD: Hidden Classes, Non Overridable Classes and Inverse Class Loading -->
+  <tr>
+    <th colspan="2">Class Path Settings</th>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">HiddenClasses:</div>
+    </th>
+    <td><input name="hiddenClasses" type="text" size="20" value="${data.hiddenClasses}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about HiddenClasses here. Separate multiple entries with a semicolon(;)</td>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">NonOverridableClasses:</div>
+    </th>
+    <td><input name="nonOverridableClasses" type="text" size="20" value="${data.nonOverridableClasses}" /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about nonOverridableClasses here. Separate multiple entries with a semicolon(;)</td>
+  </tr>
+  <tr>
+    <th>
+    <div align="right">InverseClassLoading:</div>
+    </th>
+    <td><input name="inverseClassLoading" type="checkbox" value="true" <c:if test="${data.inverseClassLoading}">CHECKED </c:if> /></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td>Enter description about inverseClassLoading here</td>
+  </tr>
+  <!-- SUBMIT BUTTON -->
+  <tr>
+    <th>
+    <div align="right"></div>
+    </th>
+    <td><input type="submit" value="Next" /></td>
+  </tr>
+</table>
+
+</form>
+<!--   END OF FORM TO COLLECT DATA FOR THIS PAGE   -->
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/environment.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp Mon Aug 13 09:21:44 2007
@@ -0,0 +1,41 @@
+<%--
+   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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<!-- Archive uploaded is not a WAR -->
+<c:if test="${!(empty archiveNotSupported)}">
+  <br />The archive you provided is not a WAR. Please note that only WARs are supported as of now. <br /> <br />
+</c:if>
+
+<form enctype="multipart/form-data" name="<portlet:namespace/>GetArchiveForm" action="<portlet:actionURL/>" method="POST">
+  <input type="hidden" name="mode" value="index-after" />
+<table>
+  <tr>
+    <th align="right">Archive:</th>
+    <td><input type="file" name="moduleURI" value="" /></td>
+  </tr>
+  <tr></tr>
+  <tr>
+    <td><input type="submit" value="Configure" value="" /></td>
+  </tr>
+</table>
+</form>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp?view=auto&rev=565397
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp Mon Aug 13 09:21:44 2007
@@ -0,0 +1,179 @@
+<%--
+   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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects />
+
+<p><b>WAR - References</b> -- Resolve following objects referred in the WAR</p>
+
+<p>Description goes here ...</p>
+
+<!-- References not resolved -->
+<c:if test="${data.referenceNotResolved}">
+  <p>Some of the references are not resolved. Please resolve them and only then press Next button.
+</c:if>
+
+<!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
+<form name="<portlet:namespace/>ReferencesForm" action="<portlet:actionURL/>" method="POST">
+<input type="hidden" name="mode" value="references-after" />
+
+<table border="0">
+  <!-- ENTRY FIELD: EJB References -->
+  <c:if test="${!empty(data.ejbRefs)}">
+    <tr>
+      <th colspan="2" align="left">
+      <div>EJB References</div>
+      </th>
+    </tr>
+    <c:forEach var="refData" items="${data.ejbRefs}" varStatus="status">
+      <input type="hidden" name="ejbRef.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="ejbRef.${status.index}.refLink">
+          <c:forEach var="ejb" items="${deployedEjbs}">
+            <option value="${ejb.patternName}">${ejb.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+  </c:if>
+
+  <!-- ENTRY FIELD: EJB Local References -->
+  <c:if test="${!empty(data.ejbLocalRefs)}">
+    <tr>
+      <th colspan="2" align="left">
+      <div>EJB Local References</div>
+      </th>
+    </tr>
+    <c:forEach var="refData" items="${data.ejbLocalRefs}" varStatus="status">
+      <input type="hidden" name="ejbLocalRef.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="ejbLocalRef.${status.index}.refLink">
+          <c:forEach var="ejb" items="${deployedEjbs}">
+            <option value="${ejb.patternName}">${ejb.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+  </c:if>
+
+  <!-- ENTRY FIELD: JDBC Connection Pool References -->
+  <c:if test="${!empty(data.jdbcPoolRefs)}">
+    <tr>
+      <th colspan="2" align="left">
+      <div>JDBC Pool References</div>
+      </th>
+    </tr>
+    <c:forEach var="refData" items="${data.jdbcPoolRefs}" varStatus="status">
+      <input type="hidden" name="jdbcPoolRef.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="jdbcPoolRef.${status.index}.refLink">
+          <c:forEach var="jdbcPool" items="${deployedJdbcConnectionPools}">
+            <option value="${jdbcPool.patternName}">${jdbcPool.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+  </c:if>
+
+  <!-- ENTRY FIELD: JMS Connection Factory References -->
+  <c:if test="${!empty(data.jmsConnectionFactoryRefs)}">
+    <tr>
+      <th colspan="2" align="left">
+      <div>JMS Connection Factory References</div>
+      </th>
+    </tr>
+    <c:forEach var="refData" items="${data.jmsConnectionFactoryRefs}" varStatus="status">
+      <input type="hidden" name="jmsConnectionFactoryRef.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="jmsConnectionFactoryRef.${status.index}.refLink">
+          <c:forEach var="jmsFactory" items="${deployedJmsConnectionFactories}">
+            <option value="${jmsFactory.patternName}">${jmsFactory.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+  </c:if>
+
+  <!-- ENTRY FIELD: JMS Destination References -->
+  <c:if test="${!empty(data.jmsDestinationRefs) || !empty(data.messageDestinations)}">
+    <tr>
+      <th colspan="2" align="left">
+      <div>JMS Destination References</div>
+      </th>
+    </tr>
+    <c:forEach var="refData" items="${data.jmsDestinationRefs}" varStatus="status">
+      <input type="hidden" name="jmsDestinationRef.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="jmsDestinationRef.${status.index}.refLink">
+          <c:forEach var="jmsDestination" items="${deployedJmsDestinations}">
+            <option value="${jmsDestination.patternName}" 
+              <c:if test="${fn:startsWith(jmsDestination.displayName, refData.refLink)}"> selected="selected"</c:if>
+            >${jmsDestination.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+    <c:forEach var="refData" items="${data.messageDestinations}" varStatus="status">
+      <input type="hidden" name="messageDestination.${status.index}.refName" value="${refData.refName}" />
+      <tr>
+        <td>
+        <div align="right">${refData.refName}</div>
+        </td>
+        <td><select name="messageDestination.${status.index}.refLink">
+          <c:forEach var="jmsDestination" items="${deployedJmsDestinations}">
+            <option value="${jmsDestination.patternName}" 
+              <c:if test="${fn:startsWith(jmsDestination.displayName, refData.refLink)}"> selected="selected"</c:if>
+            >${jmsDestination.displayName}</option>
+          </c:forEach>
+        </select></td>
+      </tr>
+    </c:forEach>
+  </c:if>
+
+  <!-- SUBMIT BUTTON -->
+  <tr>
+    <th>
+    <div align="right"></div>
+    </th>
+    <td><input type="submit" value="Next" /></td>
+  </tr>
+</table>
+</form>
+<!--   END OF FORM TO COLLECT DATA FOR THIS PAGE   -->
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configcreator/references.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message