summaryrefslogtreecommitdiffstats
path: root/sandbox/thilina
diff options
context:
space:
mode:
authordims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
committerdims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
commitbdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch)
tree38a92061c0793434c4be189f1d70c3458b6bc41d /sandbox/thilina
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/thilina')
-rw-r--r--sandbox/thilina/geronimo_ACE/README.txt9
-rw-r--r--sandbox/thilina/geronimo_ACE/pom.xml44
-rw-r--r--sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java21
-rw-r--r--sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml30
-rw-r--r--sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml23
-rw-r--r--sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml22
-rw-r--r--sandbox/thilina/geronimo_ACE/src/test/java/org/apache/tuscany/geronimoace/AppTest.java38
7 files changed, 187 insertions, 0 deletions
diff --git a/sandbox/thilina/geronimo_ACE/README.txt b/sandbox/thilina/geronimo_ACE/README.txt
new file mode 100644
index 0000000000..38cdfe0a46
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/README.txt
@@ -0,0 +1,9 @@
+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
new file mode 100644
index 0000000000..9bbeb2ed9d
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/pom.xml
@@ -0,0 +1,44 @@
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.tuscany.geronimoace</groupId>
+ <artifactId>org.apache.tuscany.geronimoace.geronimo-ace</artifactId>
+ <packaging>war</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>geronimo-ace</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>portlet-api</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <directory>${basedir}/target</directory>
+ <finalName>${artifactId}-${version}</finalName>
+ <resources>
+ <resource>
+ <targetPath>WEB-INF</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}/src/webapp/WEB-INF</directory>
+ <includes>
+ <include>web.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+</project>
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
new file mode 100644
index 0000000000..188a29958e
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/src/main/java/org/apache/tuscany/geronimoace/GeronimoACE.java
@@ -0,0 +1,21 @@
+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 {
+ // 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("<html><body>");
+ out.println("Hello World");
+ out.println("</body></html>");
+ out.flush();
+ out.close();
+ }
+
+}
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
new file mode 100644
index 0000000000..1b43643f14
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/geronimo-web.xml
@@ -0,0 +1,30 @@
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
+ <environment>
+ <moduleId>
+ <groupId>org.apache.tuscany.geronimoace</groupId>
+ <artifactId>geronimo-ace</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <type>war</type>
+ </moduleId>
+
+ <dependencies>
+ <dependency> <!-- Put a dependancy on the hosting portal (pluto) -->
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>pluto-support</artifactId>
+ </dependency>
+ </dependencies>
+ </environment>
+
+ <!-- This is where the files are accessed from. (aka - portletContext) -->
+ <context-root>/GeronimoACE</context-root>
+
+ <!-- Start off a ACEGBean, this is the lifecycle for the portlet -->
+ <gbean name="PlutoTest" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
+ <attribute name="pageTitle">Tuscany ACE</attribute>
+ <attribute name="portletContext">/GeronimoACE</attribute>
+ <attribute name="portletList">[GeronimoACE]</attribute>
+ <reference name="PortalContainerServices">
+ <name>PlutoPortalServices</name>
+ </reference>
+ </gbean>
+</web-app>
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
new file mode 100644
index 0000000000..50ba8d0434
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/portlet.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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"
+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">
+ <portlet>
+ <description lang="EN">GeronimoACE</description>
+ <portlet-name>GeronimoACE</portlet-name>
+ <display-name lang="EN">Geronimo Admin Console for Tuscany</display-name>
+ <portlet-class>org.apache.tuscany.geronimoace.GeronimoACE</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <portlet-info>
+ <title>Tuscany Admin Console EXtension</title>
+ <short-title>Tuscany ACE</short-title>
+ </portlet-info>
+ </portlet>
+</portlet-app>
+
+
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
new file mode 100644
index 0000000000..1991da99dc
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <!-- This is pretty standard servlet code -->
+
+ <servlet>
+ <servlet-name>GeronimoACE</servlet-name>
+ <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
+ <init-param>
+ <param-name>portlet-name</param-name>
+ <param-value>GeronimoACE</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>GeronimoACE</servlet-name>
+ <url-pattern>/PlutoInvoker/GeronimoACE</url-pattern>
+ </servlet-mapping>
+
+</web-app>
diff --git a/sandbox/thilina/geronimo_ACE/src/test/java/org/apache/tuscany/geronimoace/AppTest.java b/sandbox/thilina/geronimo_ACE/src/test/java/org/apache/tuscany/geronimoace/AppTest.java
new file mode 100644
index 0000000000..fe66243097
--- /dev/null
+++ b/sandbox/thilina/geronimo_ACE/src/test/java/org/apache/tuscany/geronimoace/AppTest.java
@@ -0,0 +1,38 @@
+package org.apache.tuscany.geronimoace;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}