geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1094850 - in /geronimo/server/trunk/plugins/plancreator: plancreator-console-jetty/src/main/history/ plancreator-console-tomcat/src/main/history/ plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/ plan...
Date Tue, 19 Apr 2011 04:06:07 GMT
Author: genspring
Date: Tue Apr 19 04:06:07 2011
New Revision: 1094850

URL: http://svn.apache.org/viewvc?rev=1094850&view=rev
Log:
Reenable plan creator admin console portlet, patch from Shenghao Fang

Modified:
    geronimo/server/trunk/plugins/plancreator/plancreator-console-jetty/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/plancreator/plancreator-console-tomcat/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/EARConfigData.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/WARConfigData.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/web.xml

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-console-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-console-jetty/src/main/history/dependencies.xml?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-console-jetty/src/main/history/dependencies.xml
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-console-jetty/src/main/history/dependencies.xml
Tue Apr 19 04:06:07 2011
@@ -23,11 +23,6 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
-        <artifactId>geronimo-deploy-jsr88</artifactId>
-        <type>jar</type>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>plugin</artifactId>
         <type>car</type>
     </dependency>

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-console-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-console-tomcat/src/main/history/dependencies.xml?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-console-tomcat/src/main/history/dependencies.xml
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-console-tomcat/src/main/history/dependencies.xml
Tue Apr 19 04:06:07 2011
@@ -18,11 +18,6 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
-        <artifactId>geronimo-deploy-jsr88</artifactId>
-        <type>jar</type>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>plugin</artifactId>
         <type>car</type>
     </dependency>

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/EARConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/EARConfigData.java?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/EARConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/EARConfigData.java
Tue Apr 19 04:06:07 2011
@@ -27,6 +27,8 @@ import javax.portlet.PortletRequest;
 
 import org.apache.geronimo.j2ee.deployment.ApplicationInfo;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.WebModule;
+
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationDocument;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationType;
@@ -59,13 +61,13 @@ public class EARConfigData {
         environmentConfig = new EnvironmentConfigData(getEnterpriseApp().addNewEnvironment());
         environmentConfig.parseEnvironment(applicationInfo.getEnvironment());
 
-        LinkedHashSet modules = applicationInfo.getModules();
-        for (Object module1 : modules) {
-            Module module = (Module) module1;
+        LinkedHashSet<Module<?,?>> modules = applicationInfo.getModules();
+        for (Module<?,?> module : modules) {
+            //Module module = (Module) module1;
             if (ConfigurationModuleType.WAR == module.getType()) {
                 WARConfigData warConfig = new WARConfigData();
-                warConfig.parseReferences(module.getAnnotatedApp());
-                warConfig.parseSecurity(module.getAnnotatedApp());
+                warConfig.parseReferences(((WebModule) module).getSpecDD());
+                warConfig.parseSecurity(((WebModule) module).getSpecDD());
                 webModules.put(module.getName(), warConfig);
             } else if (ConfigurationModuleType.EJB == module.getType()) {
                 EjbConfigData ejbConfig = new EjbConfigData();

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
Tue Apr 19 04:06:07 2011
@@ -20,21 +20,23 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Collection;
 
 import javax.portlet.PortletRequest;
 
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
+import org.apache.openejb.jee.JndiConsumer;
+import org.apache.openejb.jee.EjbRef;
+import org.apache.openejb.jee.EjbLocalRef;
+import org.apache.openejb.jee.ServiceRef;
+import org.apache.openejb.jee.ResourceRef;
+import org.apache.openejb.jee.ResourceEnvRef;
+
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPortType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
-import org.apache.geronimo.xbeans.javaee6.EjbLocalRefType;
-import org.apache.geronimo.xbeans.javaee6.EjbRefType;
-import org.apache.geronimo.xbeans.javaee6.ResourceEnvRefType;
-import org.apache.geronimo.xbeans.javaee6.ResourceRefType;
-import org.apache.geronimo.xbeans.javaee6.ServiceRefType;
 
 /**
  * 
@@ -55,29 +57,29 @@ public class JndiRefsConfigData {
 
     public final static String REF_LINK = "refLink";
 
-    public void parseWebDD(AnnotatedApp annotatedWebAppDD, GerWebAppType webApp) {
-        EjbRefType[] ejbRefs = annotatedWebAppDD.getEjbRefArray();
-        for (int i = 0; i < ejbRefs.length; i++) {
-            String refName = ejbRefs[i].getEjbRefName().getStringValue();
+    public void parseWebDD(JndiConsumer annotatedWebAppDD, GerWebAppType webApp) {
+        Collection<EjbRef> ejbRefs = annotatedWebAppDD.getEjbRef();
+        for (EjbRef ejbRef: ejbRefs) {
+            String refName = ejbRef.getEjbRefName();
             webApp.addNewEjbRef().setRefName(refName);
         }
 
-        EjbLocalRefType[] ejbLocalRefs = annotatedWebAppDD.getEjbLocalRefArray();
-        for (int i = 0; i < ejbLocalRefs.length; i++) {
-            String refName = ejbLocalRefs[i].getEjbRefName().getStringValue();
+        Collection<EjbLocalRef> ejbLocalRefs = annotatedWebAppDD.getEjbLocalRef();
+        for (EjbLocalRef ejbLocalRef: ejbLocalRefs) {
+            String refName = ejbLocalRef.getEjbRefName();
             webApp.addNewEjbLocalRef().setRefName(refName);
         }
 
-        ServiceRefType[] serviceRefs = annotatedWebAppDD.getServiceRefArray();
-        for (int i = 0; i < serviceRefs.length; i++) {
-            String refName = serviceRefs[i].getServiceRefName().getStringValue();
+        Collection<ServiceRef> serviceRefs = annotatedWebAppDD.getServiceRef();
+        for (ServiceRef serviceRef: serviceRefs) {
+            String refName = serviceRef.getServiceRefName();
             webApp.addNewServiceRef().setServiceRefName(refName);
         }
 
-        ResourceRefType[] resourceRefs = annotatedWebAppDD.getResourceRefArray();
-        for (int i = 0; i < resourceRefs.length; i++) {
-            String refName = resourceRefs[i].getResRefName().getStringValue();
-            String refType = resourceRefs[i].getResType().getStringValue();
+        Collection<ResourceRef> resourceRefs = annotatedWebAppDD.getResourceRef();
+        for (ResourceRef resourceRef: resourceRefs) {
+            String refName = resourceRef.getResRefName();
+            String refType = resourceRef.getResType();
             if ("javax.sql.DataSource".equalsIgnoreCase(refType)) {
                 jdbcPoolRefs.add(new ReferenceData(refName));
             } else if ("javax.jms.ConnectionFactory".equalsIgnoreCase(refType)
@@ -89,11 +91,11 @@ public class JndiRefsConfigData {
             }
         }
 
-        ResourceEnvRefType[] resourceEnvRefs = annotatedWebAppDD.getResourceEnvRefArray();
-        for (int i = 0; i < resourceEnvRefs.length; i++) {
-            String refName = resourceEnvRefs[i].getResourceEnvRefName().getStringValue();
-            GerResourceEnvRefType resourceEnvRef = webApp.addNewResourceEnvRef();
-            resourceEnvRef.setRefName(refName);
+        Collection<ResourceEnvRef> resourceEnvRefs = annotatedWebAppDD.getResourceEnvRef();
+        for (ResourceEnvRef resourceEnvRef: resourceEnvRefs) {
+            String refName = resourceEnvRef.getResourceEnvRefName();
+            GerResourceEnvRefType gerResourceEnvRef = webApp.addNewResourceEnvRef();
+            gerResourceEnvRef.setRefName(refName);
             // resourceEnvRef.setMessageDestinationLink(refName);
         }
     }

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
Tue Apr 19 04:06:07 2011
@@ -18,15 +18,16 @@ package org.apache.geronimo.console.conf
 
 import java.util.HashSet;
 import java.util.Map;
+import java.util.List;
 
 import javax.portlet.PortletRequest;
 
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
+import org.apache.openejb.jee.JndiConsumer;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.MessageDestination;
+
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
-import org.apache.geronimo.xbeans.javaee6.MessageDestinationType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
 
 /**
  * 
@@ -37,13 +38,13 @@ public class MessageDestinationConfigDat
 
     private boolean referenceNotResolved = false;
 
-    public void parseWebDD(AnnotatedApp annotatedWebAppDD, GerWebAppType webApp) {
-        if (annotatedWebAppDD instanceof AnnotatedWebApp) {
-            WebAppType webAppDD = ((AnnotatedWebApp) annotatedWebAppDD).getWebApp();
-            MessageDestinationType[] messageDestinations = webAppDD.getMessageDestinationArray();
-            for (int i = 0; i < messageDestinations.length; i++) {
-                String messageDestinationName = messageDestinations[i].getMessageDestinationName().getStringValue();
-                GerMessageDestinationType messageDestination = webApp.addNewMessageDestination();
+    public void parseWebDD(JndiConsumer annotatedWebAppDD, GerWebAppType webApp) {
+        if (annotatedWebAppDD instanceof WebApp) {
+            WebApp webAppDD = (WebApp) annotatedWebAppDD;
+            List<MessageDestination> messageDestinations = webAppDD.getMessageDestination();
+            for (MessageDestination messageDestination: messageDestinations) {
+                String messageDestinationName = messageDestination.getMessageDestinationName();
+                GerMessageDestinationType gerMessageDestination = webApp.addNewMessageDestination();
                 messageDestination.setMessageDestinationName(messageDestinationName);
                 // messageDestination.setAdminObjectLink(messageDestinationName);
             }

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
Tue Apr 19 04:06:07 2011
@@ -18,12 +18,16 @@ package org.apache.geronimo.console.conf
 
 import java.util.HashSet;
 import java.util.Map;
+import java.util.List;
 
 import javax.portlet.PortletRequest;
 
 import org.apache.geronimo.deployment.xbeans.PatternType;
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
+
+import org.apache.openejb.jee.JndiConsumer;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.SecurityRole;
+
 import org.apache.geronimo.xbeans.geronimo.security.GerDistinguishedNameType;
 import org.apache.geronimo.xbeans.geronimo.security.GerLoginDomainPrincipalType;
 import org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType;
@@ -32,8 +36,6 @@ import org.apache.geronimo.xbeans.geroni
 import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
 import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
 import org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType;
-import org.apache.geronimo.xbeans.javaee6.SecurityRoleType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
 
 /**
  * 
@@ -44,15 +46,15 @@ public class SecurityConfigData {
 
     private HashSet<String> dependenciesSet = new HashSet<String>();
 
-    public void parseWebDD(AnnotatedApp annotatedWebAppDD) {
-        if (annotatedWebAppDD instanceof AnnotatedWebApp) {
-            WebAppType webAppDD = ((AnnotatedWebApp) annotatedWebAppDD).getWebApp();
-            SecurityRoleType[] securityRoles = webAppDD.getSecurityRoleArray();
-            if (securityRoles.length > 0) {
+    public void parseWebDD(JndiConsumer annotatedWebAppDD) {
+        if (annotatedWebAppDD instanceof WebApp) {
+            WebApp webAppDD = (WebApp) annotatedWebAppDD;
+            List<SecurityRole> securityRoles = webAppDD.getSecurityRole();
+            if (securityRoles.size() > 0) {
                 security = GerSecurityType.Factory.newInstance();
                 GerRoleMappingsType roleMappings = security.addNewRoleMappings();
-                for (int i = 0; i < securityRoles.length; i++) {
-                    String roleName = securityRoles[i].getRoleName().getStringValue();
+                for (SecurityRole securityRole: securityRoles) {
+                    String roleName = securityRole.getRoleName();
                     roleMappings.addNewRole().setRoleName(roleName);
                 }
             }

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/WARConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/WARConfigData.java?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/WARConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/WARConfigData.java
Tue Apr 19 04:06:07 2011
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import javax.portlet.PortletRequest;
 
 import org.apache.geronimo.j2ee.deployment.WebModule;
-import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
+import org.apache.openejb.jee.JndiConsumer;
 import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
@@ -53,18 +53,18 @@ public class WARConfigData {
         environmentConfig.parseEnvironment(module.getEnvironment());
         getWebApp().setContextRoot(getWebApp().getEnvironment().getModuleId().getArtifactId());
 
-        parseReferences(module.getAnnotatedApp());
-        parseSecurity(module.getAnnotatedApp());
+        parseReferences(module.getSpecDD());
+        parseSecurity(module.getSpecDD());
     }
 
-    public void parseReferences(AnnotatedApp annotatedApp) {
+    public void parseReferences(JndiConsumer annotatedApp) {
         jndiRefsConfig = new JndiRefsConfigData();
         jndiRefsConfig.parseWebDD(annotatedApp, webApp);
         messageDestinationConfig = new MessageDestinationConfigData();
         messageDestinationConfig.parseWebDD(annotatedApp, webApp);
     }
 
-    public void parseSecurity(AnnotatedApp annotatedApp) {
+    public void parseSecurity(JndiConsumer annotatedApp) {
         securityConfig = new SecurityConfigData();
         securityConfig.parseWebDD(annotatedApp);
     }

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/web.xml?rev=1094850&r1=1094849&r2=1094850&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/web.xml
Tue Apr 19 04:06:07 2011
@@ -22,7 +22,7 @@ limitations under the License.
 
     <servlet>
         <servlet-name>PlanCreator</servlet-name>
-        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
+        <servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
         <init-param>
             <param-name>portlet-name</param-name>
             <param-value>PlanCreator</param-value>



Mime
View raw message