From ce68bf67996b12a5359e8bb539e9b1537e74ed4c Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 7 Jul 2008 09:05:36 +0000 Subject: TUSCANY-2391: Apply latest patch from Thilina Buddhika for GSoC project Tuscany SCA support in the Geronimo Admin Console git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@674426 13f79535-47bb-0310-9956-ffa450edef68 --- sandbox/thilina/geronimo_ACE/README.txt | 38 ++++++-- sandbox/thilina/geronimo_ACE/pom.xml | 108 ++++++++++++--------- .../apache/tuscany/geronimoace/GeronimoACE.java | 57 +++++++++-- .../src/main/webapp/WEB-INF/geronimo-web.xml | 26 ++++- .../src/main/webapp/WEB-INF/portlet.xml | 77 +++++++-------- .../geronimo_ACE/src/main/webapp/WEB-INF/web.xml | 38 ++++---- .../geronimo_ACE/src/main/webapp/pages/Home.jsp | 87 +++++++++++++++++ .../src/main/webapp/pages/ListDomains.jsp | 62 ++++++++++++ .../src/main/webapp/pages/ManageDomain.jsp | 75 ++++++++++++++ .../geronimo_ACE/src/main/webapp/pages/header.jsp | 21 ++++ 10 files changed, 465 insertions(+), 124 deletions(-) create mode 100644 sandbox/thilina/geronimo_ACE/src/main/webapp/pages/Home.jsp create mode 100644 sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ListDomains.jsp create mode 100644 sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ManageDomain.jsp create mode 100644 sandbox/thilina/geronimo_ACE/src/main/webapp/pages/header.jsp (limited to 'sandbox/thilina') diff --git a/sandbox/thilina/geronimo_ACE/README.txt b/sandbox/thilina/geronimo_ACE/README.txt index 38cdfe0a46..d6cd1b4339 100644 --- a/sandbox/thilina/geronimo_ACE/README.txt +++ b/sandbox/thilina/geronimo_ACE/README.txt @@ -1,9 +1,29 @@ -How to build the Admin Console Extension -======================================== - -1.Extract the archive. -2.Go to the directory created after extracting the archive. -3.Type the following command "mvn install" -4.It will create a directory named "target" which contains the "org.apache.tuscany.geronimoace.geronimo-ace-1.0-SNAPSHOT.war". -5.Deploy this in geronimo. - + + + +How to build the Admin Console Extension +======================================== + +1.Extract the archive. +2.Go to the directory created after extracting the archive. +3.Type the following command "mvn install" +4.It will create a directory named "target" which contains the "org.apache.tuscany.geronimoace.geronimo-ace-1.0-SNAPSHOT.war". +5.Deploy this in geronimo. + diff --git a/sandbox/thilina/geronimo_ACE/pom.xml b/sandbox/thilina/geronimo_ACE/pom.xml index 9bbeb2ed9d..f5f2a8e7b6 100644 --- a/sandbox/thilina/geronimo_ACE/pom.xml +++ b/sandbox/thilina/geronimo_ACE/pom.xml @@ -1,44 +1,64 @@ - - 4.0.0 - org.apache.tuscany.geronimoace - org.apache.tuscany.geronimoace.geronimo-ace - war - 1.0-SNAPSHOT - geronimo-ace - http://maven.apache.org - - - junit - junit - 3.8.1 - test - - - portlet-api - portlet-api - 1.0 - - - javax.portlet - portlet-api - 1.0 - - - - - install - ${basedir}/target - ${artifactId}-${version} - - - WEB-INF - false - ${basedir}/src/webapp/WEB-INF - - web.xml - - - - - + + + + 4.0.0 + org.apache.tuscany.geronimoace + org.apache.tuscany.geronimoace.geronimo-ace + war + 1.0-SNAPSHOT + geronimo-ace + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + javax.portlet + portlet-api + 1.0 + + + javax.servlet + servlet-api + 2.4 + provided + + + + + install + ${basedir}/target + ${artifactId}-${version} + + + WEB-INF + false + ${basedir}/src/webapp/WEB-INF + + web.xml + + + + + diff --git a/sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java b/sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java index eb52936bb6..f55776fc0a 100644 --- a/sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java +++ b/sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java @@ -17,24 +17,63 @@ * under the License. */ +/* + * 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.tuscany.geronimoace; import javax.portlet.*; import java.io.IOException; -import java.io.PrintWriter; public class GeronimoACE extends GenericPortlet { - public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { + private String viewUrl = "/pages/Home.jsp"; + + + public void init(PortletConfig config) throws PortletException { + super.init(config); + // viewUrl = config.getInitParameter("view_url"); + } + + public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { + String task = request.getParameter("task"); + String domain = request.getParameter("domainName"); + if (task != null) { + if (task.equals("list")) { + viewUrl = "/pages/ListDomains.jsp"; + } + } + if (domain != null) { + request.setAttribute("domain", domain); + viewUrl = "/pages/ManageDomain.jsp"; + } + response.setPortletMode(PortletMode.VIEW); + } + + public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { // Set the response to read HTML response.setContentType("text/html;charset=UTF-8"); - // Required call for use of getWriter() and getPortletOutputStream() - PrintWriter out = response.getWriter(); - out.println(""); - out.println("Hello World"); - out.println(""); - out.flush(); - out.close(); + PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher(viewUrl); + dispatcher.include(request, response); + + } + } diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml index 7b0c484c49..cfd05c1866 100644 --- a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml @@ -18,6 +18,26 @@ --> + + + @@ -39,12 +59,12 @@ /GeronimoACE - + Tuscany ACE /GeronimoACE [GeronimoACE] - PlutoPortalServices + PlutoPortalServices - + diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml index f8f722e8cd..7989f30ed3 100644 --- a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml @@ -1,43 +1,40 @@ - - - - + - - GeronimoACE - GeronimoACE - Geronimo Admin Console for Tuscany - org.apache.tuscany.geronimoace.GeronimoACE - - text/html - view - - en - - Tuscany Admin Console EXtension - Tuscany ACE - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"> + + GeronimoACE + GeronimoACE + Geronimo Admin Console for Tuscany + org.apache.tuscany.geronimoace.GeronimoACE + + text/html + view + edit + help + + en + + Tuscany Admin Console EXtension + Tuscany ACE + - - - + \ No newline at end of file diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml index c40f92057e..fea2878551 100644 --- a/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml @@ -1,25 +1,25 @@ + + * 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. +--> - + "http://java.sun.com/dtd/web-app_2_3.dtd"> diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/Home.jsp b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/Home.jsp new file mode 100644 index 0000000000..27cb1665b6 --- /dev/null +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/Home.jsp @@ -0,0 +1,87 @@ + + +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" %> +<%@ include file="header.jsp" %> + + + + Simple jsp page + + + + + + + + +
+
Tuscany SCA Domain Manager
+
+

 

+ +
+ + + + + + + + +
List Domains
+
+ +
+
+
+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ + + + + +
AboutTuscany Home
+

 

+ + \ No newline at end of file diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ListDomains.jsp b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ListDomains.jsp new file mode 100644 index 0000000000..980fc3d3ce --- /dev/null +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ListDomains.jsp @@ -0,0 +1,62 @@ + +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ include file="header.jsp" %> + + + Untitled Document + + +

List of Domains

+ +
+

+ + Test Domain1

+ +

+ + Test Domain2

+ +

+ + Test Domain3

+ +

+ +

+
+

 

+ + \ No newline at end of file diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ManageDomain.jsp b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ManageDomain.jsp new file mode 100644 index 0000000000..9fe6f72175 --- /dev/null +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/ManageDomain.jsp @@ -0,0 +1,75 @@ + +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ include file="header.jsp" %> + + + + Untitled Document + + +

Managing the domain

+ + + + + + + + + + + + + + + + + + + + + +
Contributionsstartstop
+
test contribution1
+
+
start
+
+
stop
+
+

 

+ \ No newline at end of file diff --git a/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/header.jsp b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/header.jsp new file mode 100644 index 0000000000..99687d12d2 --- /dev/null +++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/pages/header.jsp @@ -0,0 +1,21 @@ + +<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> + + -- cgit v1.2.3