TUSCANY-2391: Apply latest patch from Thilina Buddhika for the GSoC Tuscany SCA support in the Geronimo Admin Console project

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@674279 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
antelder 2008-07-06 09:53:42 +00:00
commit 074ca094df
9 changed files with 272 additions and 86 deletions

View file

@ -1,9 +1,10 @@
How to build the Admin Console Extension
======================================== How to build the Admin Console Extension
========================================
1.Extract the archive.
2.Go to the directory created after extracting the archive. 1.Extract the archive.
3.Type the following command "mvn install" 2.Go to the directory created after extracting the archive.
4.It will create a directory named "target" which contains the "org.apache.tuscany.geronimoace.geronimo-ace-1.0-SNAPSHOT.war". 3.Type the following command "mvn install"
5.Deploy this in geronimo. 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.

View file

@ -1,44 +1,50 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.tuscany.geronimoace</groupId> <groupId>org.apache.tuscany.geronimoace</groupId>
<artifactId>org.apache.tuscany.geronimoace.geronimo-ace</artifactId> <artifactId>org.apache.tuscany.geronimoace.geronimo-ace</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<name>geronimo-ace</name> <name>geronimo-ace</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>portlet-api</groupId> <groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId> <artifactId>portlet-api</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.portlet</groupId> <groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId> <artifactId>portlet-api</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<dependency>
</dependencies> <groupId>javax.servlet</groupId>
<build> <artifactId>servlet-api</artifactId>
<defaultGoal>install</defaultGoal> <version>2.4</version> <!-- to keep compatible with older servlet containers -->
<directory>${basedir}/target</directory> <scope>provided</scope>
<finalName>${artifactId}-${version}</finalName> </dependency>
<resources>
<resource> </dependencies>
<targetPath>WEB-INF</targetPath> <build>
<filtering>false</filtering> <defaultGoal>install</defaultGoal>
<directory>${basedir}/src/webapp/WEB-INF</directory> <directory>${basedir}/target</directory>
<includes> <finalName>${artifactId}-${version}</finalName>
<include>web.xml</include> <resources>
</includes> <resource>
</resource> <targetPath>WEB-INF</targetPath>
</resources> <filtering>false</filtering>
</build> <directory>${basedir}/src/webapp/WEB-INF</directory>
</project> <includes>
<include>web.xml</include>
</includes>
</resource>
</resources>
</build>
</project>

View file

@ -17,6 +17,25 @@
* under the License. * 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; package org.apache.tuscany.geronimoace;
import javax.portlet.*; import javax.portlet.*;
@ -24,17 +43,26 @@ import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
public class GeronimoACE extends GenericPortlet { public class GeronimoACE extends GenericPortlet {
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { private String viewUrl;
// 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(); public void init(PortletConfig config) throws PortletException {
out.println("<html><body>");
out.println("Hello World"); super.init(config);
out.println("</body></html>"); // viewUrl = config.getInitParameter("view_url");
out.flush();
out.close();
} }
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
// Set the response to read HTML
response.setContentType("text/html;charset=UTF-8");
PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/pages/Home.jsp");
dispatcher.include(request,response);
}
} }

View file

@ -18,6 +18,26 @@
--> -->
<!--
~ 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.
-->
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
<environment> <environment>
<moduleId> <moduleId>

View file

@ -18,7 +18,24 @@
--> -->
<?xml version="1.0" encoding="UTF-8"?> <!--
~ 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.
-->
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0" <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -28,7 +45,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http:
<portlet-name>GeronimoACE</portlet-name> <portlet-name>GeronimoACE</portlet-name>
<display-name lang="EN">Geronimo Admin Console for Tuscany</display-name> <display-name lang="EN">Geronimo Admin Console for Tuscany</display-name>
<portlet-class>org.apache.tuscany.geronimoace.GeronimoACE</portlet-class> <portlet-class>org.apache.tuscany.geronimoace.GeronimoACE</portlet-class>
<supports> <supports>
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
@ -38,6 +55,4 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http:
<short-title>Tuscany ACE</short-title> <short-title>Tuscany ACE</short-title>
</portlet-info> </portlet-info>
</portlet> </portlet>
</portlet-app> </portlet-app>

View file

@ -1,22 +1,21 @@
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information * distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file * regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the * to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance * "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at * with the License. You may obtain a copy of the License at
~ *
~ http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
~ *
~ Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an * software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the * KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations * specific language governing permissions and limitations
~ under the License. * under the License.
--> -->
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"> "http://java.sun.com/dtd/web-app_2_3.dtd">

View file

@ -0,0 +1,71 @@
<!--
~ 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.
-->
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Simple jsp page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: large;
color: #0000FF;
}
-->
</style>
</head>
<body>
<table width="398" border="0" align="center">
<tr>
<td width="392" align="center" valign="top"><div align="justify" class="style2">Tuscany SCA Domain Manager </div></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="200" border="0" align="left">
<tr>
<td align="left"><ul>
<li><a href="ListDomains.jsp" class="style1">List Domains </a></li>
</ul></td>
</tr>
<tr>
<td align="left"><ul>
<li><a href="ManageDomain.jsp" class="style1">Manage Domains </a></li>
</ul></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="287" border="0" align="center">
<tr>
<td width="129"><span class="style1">About</span></td>
<td width="130" class="style1"><a href="http://tuscany.apache.org/" target="_blank">Tuscany Home </a></td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!--
~ 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.
-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title>Simple jsp page</title></head>
<body>Place your content here</body>
</html>

View file

@ -0,0 +1,23 @@
<!--
~ 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.
-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title>Simple jsp page</title></head>
<body>Place your content here</body>
</html>