geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r387985 - in /geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console: jmsmanager/server/ securitymanager/realm/ util/ webmanager/
Date Thu, 23 Mar 2006 01:02:26 GMT
Author: djencks
Date: Wed Mar 22 17:02:24 2006
New Revision: 387985

URL: http://svn.apache.org/viewcvs?rev=387985&view=rev
Log:
console (new3) compiles but almost certainly won't work

Modified:
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java?rev=387985&r1=387984&r2=387985&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
Wed Mar 22 17:02:24 2006
@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.List;
 import java.util.ArrayList;
+import java.net.URI;
+
 import javax.portlet.PortletRequestDispatcher;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -34,6 +36,7 @@
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
 import org.apache.geronimo.management.geronimo.JMSConnector;
 import org.apache.geronimo.management.geronimo.JMSManager;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -116,7 +119,7 @@
                 actionResponse.setRenderParameter("mode", "edit");
             } else if(mode.equals("delete")) {
                 String objectName = actionRequest.getParameter("objectName");
-                PortletManager.getJMSManager(actionRequest, managerName).removeConnector(objectName);
+                PortletManager.getJMSManager(actionRequest, managerName).removeConnector(new
AbstractName(URI.create(objectName)));
                 actionResponse.setRenderParameter("mode", "list");
             }
         } catch (Throwable e) {

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java?rev=387985&r1=387984&r2=387985&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
Wed Mar 22 17:02:24 2006
@@ -343,10 +343,12 @@
         realmName.setStringValue(data.getName());
         ReferenceType serverInfo = realm.addNewReference();
         serverInfo.setName2("ServerInfo");
-        serverInfo.setGbeanName(PortletManager.getCurrentServer(request).getServerInfo());
+        //TODO configid unlikely to be correct
+        serverInfo.setName(PortletManager.getCurrentServer(request).getServerInfo());
         ReferenceType loginService = realm.addNewReference();
         loginService.setName2("LoginService");
-        loginService.setGbeanName(PortletManager.getCurrentServer(request).getLoginService());
+        //TODO configid unlikely to be correct
+        loginService.setName(PortletManager.getCurrentServer(request).getLoginService());
         XmlAttributeType config = realm.addNewXmlReference();
         // Construct the content to put in the XmlAttributeType
         GerLoginConfigDocument lcDoc = GerLoginConfigDocument.Factory.newInstance();

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java?rev=387985&r1=387984&r2=387985&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
Wed Mar 22 17:02:24 2006
@@ -46,6 +46,7 @@
 import org.apache.geronimo.security.realm.SecurityRealm;
 import org.apache.geronimo.system.logging.SystemLog;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.gbean.AbstractName;
 
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
@@ -63,6 +64,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.net.URI;
 
 /**
  * @version $Rev$ $Date$
@@ -272,7 +274,17 @@
     public static String[] getWebContainerNames(PortletRequest request, String managerObjectName)
{
         ManagementHelper helper = getManagementHelper(request);
         WebManager manager = (WebManager) helper.getObject(managerObjectName);
-        return manager.getContainers();
+        AbstractName[] names =  manager.getContainers();
+        return namesToStrings(names);
+    }
+
+    private static String[] namesToStrings(AbstractName[] names) {
+        String[] result = new String[names.length];
+        for (int i = 0; i < names.length; i++) {
+            AbstractName name = names[i];
+            result[i] = name.toURI().toString();
+        }
+        return result;
     }
 
     public static WebAccessLog getWebAccessLog(PortletRequest request, String managerObjectName,
String containerObjectName) {
@@ -289,7 +301,7 @@
     public static WebConnector createWebConnector(PortletRequest request, String managerObjectName,
String containerObjectName, String name, String protocol, String host, int port) {
         ManagementHelper helper = getManagementHelper(request);
         WebManager manager = (WebManager) helper.getObject(managerObjectName);
-        String objectName = manager.addConnector(containerObjectName, name, protocol, host,
port);
+        String objectName = manager.addConnector(new AbstractName(URI.create(containerObjectName)),
name, protocol, host, port).toURI().toString();
         return (WebConnector) helper.getObject(objectName);
     }
 
@@ -339,7 +351,8 @@
     public static String[] getJMSBrokerNames(PortletRequest request, String managerObjectName)
{
         ManagementHelper helper = getManagementHelper(request);
         JMSManager manager = (JMSManager) helper.getObject(managerObjectName);
-        return manager.getContainers();
+        AbstractName[] names =  manager.getContainers();
+        return namesToStrings(names);
     }
 
     public static JMSBroker getJMSBroker(PortletRequest request, String brokerObjectName)
{

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=387985&r1=387984&r2=387985&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
Wed Mar 22 17:02:24 2006
@@ -27,6 +27,7 @@
 import org.apache.geronimo.management.geronimo.WebConnector;
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.gbean.AbstractName;
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -42,6 +43,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.net.URI;
 
 /**
  * A portlet that lets you list, add, remove, start, stop, and edit web
@@ -265,7 +267,7 @@
 
         } else if(mode.equals("delete")) { // User chose to delete a connector
             String objectName = actionRequest.getParameter("name");
-            PortletManager.getWebManager(actionRequest, managerName).removeConnector(objectName);
+            PortletManager.getWebManager(actionRequest, managerName).removeConnector(new
AbstractName(URI.create(objectName)));
             actionResponse.setRenderParameter("mode", "list");
         }
     }



Mime
View raw message