Author: roy...@jb... Date: 2006-07-06 12:35:37 -0400 (Thu, 06 Jul 2006) New Revision: 75 Added: portlets/2_4/src/HelloWorldPortal/ portlets/2_4/src/HelloWorldPortal/README.txt portlets/2_4/src/HelloWorldPortal/build.xml portlets/2_4/src/HelloWorldPortal/helloworldportal.war portlets/2_4/src/HelloWorldPortal/lib/ portlets/2_4/src/HelloWorldPortal/lib/explode.jar portlets/2_4/src/HelloWorldPortal/lib/portal-common-lib.jar portlets/2_4/src/HelloWorldPortal/lib/portlet-api-lib.jar portlets/2_4/src/HelloWorldPortal/src/ portlets/2_4/src/HelloWorldPortal/src/main/ portlets/2_4/src/HelloWorldPortal/src/main/org/ portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/ portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/ portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/hello/ portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/hello/MyPortlet.java portlets/2_4/src/HelloWorldPortal/src/resources/ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/helloworld-object.xml portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/lib/ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/lib/helloworldportal-lib.jar portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet-instances.xml portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet.xml portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/web.xml Log: JBPORTAL-934 Property changes on: portlets/2_4/src/HelloWorldPortal ___________________________________________________________________ Name: svn:ignore + HelloWorldPortal.iml *.ipr *.iws output Added: portlets/2_4/src/HelloWorldPortal/README.txt =================================================================== --- portlets/2_4/src/HelloWorldPortal/README.txt 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/README.txt 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,8 @@ +The included descriptor will create two pages under a new portal instance. + +1. Deploy the helloworldportlet.war (you may hot-deploy it.) +2. You can access the new pages, by nagivating to: + - default page: http://localhost:8080/portal/portal/HelloPortal + - foobar page: http://localhost:8080/portal/portal/HelloPortal/foobar + +Additionally, you should be able to see this new portal and its pages in the management portlet ui. Added: portlets/2_4/src/HelloWorldPortal/build.xml =================================================================== --- portlets/2_4/src/HelloWorldPortal/build.xml 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/build.xml 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,86 @@ +<project name="JBoss HelloWorld Portal" + default="deploy" + basedir="."> + + <property name="app.name" value="helloworldportal"/> + + <property name="src.dir" value="${basedir}/src"/> + + <property name="lib.dir" value="${basedir}/lib"/> + + <property name="build.dir" value="${basedir}/output"/> + + <property name="build.lib" value="${build.dir}/lib"/> + + <property name="build.resources" value="${src.dir}/resources"/> + + <property name="build.etc" value="${src.dir}/etc"/> + + <property name="classes.dir" value="${build.dir}/classes"/> + + <property name="dist.dir" value="${src.dir}/resources"/> + + <property name="libs.api" value="${lib.dir}/portlet-api-lib.jar"/> + + <property name="libs.ant" + value="${lib.dir}/explode.jar;${lib.dir}/portal-common-lib.jar"/> + + <property name="libs" value="${libs.api};${libs.ant}"/> + + <available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/> + + <target name="clover-yes" depends="prepare" if="clover.available"> + <property name="compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/> + </target> + + <target name="clover-no" depends="prepare" unless="clover.available"> + <property name="compiler" value="modern"/> + </target> + + <target name="prepare"> + <mkdir dir="${classes.dir}"/> + <mkdir dir="${build.lib}"/> + <mkdir dir="${build.lib}/exploded"/> + </target> + + <target name="clean"> + <delete dir="${build.dir}"/> + </target> + + <target name="deploy" depends="clover-yes, clover-no"> + <javac srcdir="${src.dir}" + destdir="${classes.dir}" + classpath="${libs}" + debug="off" + optimize="on" + deprecation="on" + compiler="${compiler}"> + <include name="main/org/jboss/portlet/**/*.java"/> + </javac> + + <!-- helloworldportal-lib.jar --> + <jar jarfile="${build.lib}/helloworldportal-lib.jar"> + <fileset dir="${classes.dir}"/> + </jar> + + <mkdir dir="${build.resources}/helloworldportal-war/WEB-INF/lib"/> + <copy file="${build.lib}/helloworldportal-lib.jar" todir="${build.resources}/helloworldportal-war/WEB-INF/lib"/> + + <!-- helloworldportal.war --> + <jar jarfile="helloworldportal.war"> + <fileset dir="${build.resources}/helloworldportal-war"/> + </jar> + </target> + + <target name="explode" depends="deploy"> + <taskdef classname="org.jboss.portal.common.ant.Explode" + name="explode" + classpath="${libs}"/> + <explode + file="helloworldportal.war" + todir="${build.lib}/exploded" + name="helloworldportal.war"/> + </target> + <target name="all" depends="deploy"/> +</project> + Added: portlets/2_4/src/HelloWorldPortal/helloworldportal.war =================================================================== (Binary files differ) Property changes on: portlets/2_4/src/HelloWorldPortal/helloworldportal.war ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: portlets/2_4/src/HelloWorldPortal/lib/explode.jar =================================================================== (Binary files differ) Property changes on: portlets/2_4/src/HelloWorldPortal/lib/explode.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: portlets/2_4/src/HelloWorldPortal/lib/portal-common-lib.jar =================================================================== (Binary files differ) Property changes on: portlets/2_4/src/HelloWorldPortal/lib/portal-common-lib.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: portlets/2_4/src/HelloWorldPortal/lib/portlet-api-lib.jar =================================================================== (Binary files differ) Property changes on: portlets/2_4/src/HelloWorldPortal/lib/portlet-api-lib.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/hello/MyPortlet.java =================================================================== --- portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/hello/MyPortlet.java 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/src/main/org/jboss/portlet/hello/MyPortlet.java 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,33 @@ +/***************************************** + * * + * JBoss Portal: The OpenSource Portal * + * * + * Distributable under LGPL license. * + * See terms of license at gnu.org. * + * * + *****************************************/ + +package org.jboss.portlet.hello; + +import javax.portlet.GenericPortlet; +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.UnavailableException; +import java.io.IOException; +import java.io.PrintWriter; + +public class MyPortlet extends GenericPortlet +{ + public void init() + { + } + + protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException + { + rResponse.setContentType("text/html"); + PrintWriter writer = rResponse.getWriter(); + writer.write("Hello World!"); + writer.close(); + } +} \ No newline at end of file Added: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/helloworld-object.xml =================================================================== --- portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/helloworld-object.xml 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/helloworld-object.xml 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<deployments> + <deployment> + <parent-ref/> + <if-exists>overwrite</if-exists> + <portal> + <portal-name>HelloPortal</portal-name> + <properties> + <!-- Set the layout for the default portal --> + <!-- see also portal-layouts.xml --> + <property> + <name>layout.id</name> + <value>generic</value> + </property> + <!-- Set the theme for the default portal --> + <!-- see also portal-themes.xml --> + <property> + <name>theme.id</name> + <value>Nphalanx</value> + </property> + <!-- set the default render set name (used by the render tag in layouts) --> + <!-- see also portal-renderSet.xml --> + <property> + <name>theme.renderSetId</name> + <value>divRenderer</value> + </property> + <!-- set the default strategy name (used by the strategy interceptor) --> + <!-- see also portal-strategies.xml --> + <property> + <name>layout.strategyId</name> + <value>maximizedRegion</value> + </property> + </properties> + <supported-modes> + <mode>view</mode> + <mode>edit</mode> + <mode>help</mode> + </supported-modes> + <supported-window-states> + <window-state>normal</window-state> + <window-state>minimized</window-state> + <window-state>maximized</window-state> + </supported-window-states> + <page> + <page-name>default</page-name> + <properties/> + <window> + <window-name>MyPortletWindow</window-name> + <instance-ref>MyPortletInstance</instance-ref> + <region>center</region> + <height>0</height> + </window> + <security-constraint> + <policy-permission> + <unchecked/> + <action-name>viewrecursive</action-name> + </policy-permission> + </security-constraint> + </page> + <security-constraint> + <policy-permission> + <unchecked/> + <action-name>personalizerecursive</action-name> + </policy-permission> + </security-constraint> + </portal> + </deployment> + <deployment> + <if-exists>overwrite</if-exists> + <parent-ref>HelloPortal</parent-ref> + <page> + <page-name>foobar</page-name> + <window> + <window-name>MyPortletWindow</window-name> + <instance-ref>MyPortletInstance</instance-ref> + <region>center</region> + <height>0</height> + </window> + <security-constraint> + <policy-permission> + <unchecked/> + <action-name>viewrecursive</action-name> + </policy-permission> + </security-constraint> + </page> + </deployment> +</deployments> \ No newline at end of file Added: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/lib/helloworldportal-lib.jar =================================================================== (Binary files differ) Property changes on: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/lib/helloworldportal-lib.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet-instances.xml =================================================================== --- portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet-instances.xml 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet-instances.xml 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,10 @@ +<?xml version="1.0" standalone="yes"?> +<deployments> + <deployment> + <instance> + <instance-id>MyPortletInstance</instance-id> + <portlet-ref>MyPortlet</portlet-ref> + </instance> + </deployment> +</deployments> + Added: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet.xml =================================================================== --- portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet.xml 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/portlet.xml 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd /opt/SUNWps/dtd/portlet.xsd" + version="1.0"> + <portlet> + <portlet-name>MyPortlet</portlet-name> + <portlet-class>org.jboss.portlet.hello.MyPortlet</portlet-class> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <portlet-info> + <title>MyPortlet</title> + </portlet-info> + </portlet> +</portlet-app> Added: portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/web.xml =================================================================== --- portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/web.xml 2006-07-06 16:33:41 UTC (rev 74) +++ portlets/2_4/src/HelloWorldPortal/src/resources/helloworldportal-war/WEB-INF/web.xml 2006-07-06 16:35:37 UTC (rev 75) @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<!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> +</web-app> |