portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF portlet.tld portlet.xml veltag.tld web.xml
Date Tue, 30 Dec 2003 06:21:43 GMT
taylor      2003/12/29 22:21:43

  Added:       applications/pam maven.xml project.properties project.xml
               applications/pam/src/java/org/apache/jetspeed/apps/pam
                        PortletApplicationBrowser.java
               applications/pam/src/webapp hello.jsp snipet.html
               applications/pam/src/webapp/WEB-INF portlet.tld portlet.xml
                        veltag.tld web.xml
  Log:
  PAM (Portlet Application Manager) Portlet Application
  This is the first 'local' portlet application.
  It does nothing more than just test out the basics right now, ensures that:
  - class loader is operating correctly
  - getResource(AsStream) from the PortletAPI functions
  - request dispatchers function correctly
  
  The goal of the PAM PA is to provide deployment functions and portlet application management
from a portlet application.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/applications/pam/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar"
           xmlns:j="jelly:core" 
           xmlns:define="jelly:define"
           xmlns:reactor="reactor">
  
   
    <!-- ================================================================ -->
    <!-- Hot Deploy for mundane everyday development under Catalina       -->
    <!-- ================================================================ -->
    <goal name="hotdeploy">
      <echo message="Hot Deploying ${portlet.app.name} to ${deploy.war.dir}/jetspeed/WEB-INF/apps/${portlet.app.name}"/>
      <copy todir="${deploy.war.dir}/jetspeed/WEB-INF/apps/${portlet.app.name}/WEB-INF/classes">
          <fileset dir="${maven.build.dir}/classes">
          </fileset>
      </copy>       
      <copy todir="${deploy.war.dir}/jetspeed/WEB-INF/apps/${portlet.app.name}/">
        <fileset dir="${webapp.dir}">
        </fileset>
      </copy>
    </goal>
  
    <preGoal name="hotdeploy">
     <attainGoal name= "java:compile"/> 
    </preGoal>
  
  </project>
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/project.properties
  
  Index: project.properties
  ===================================================================
  #
  # $Id: project.properties,v 1.1 2003/12/30 06:21:42 taylor Exp $
  #
  # Display the date on the Maven web site
  maven.xdoc.date = left
  
  # Display the maven version the web site is documenting
  maven.xdoc.version = ${pom.currentVersion}
  
  maven.checkstyle.properties = ${basedir}/../../checkstyle.properties
  
  deploy.war.dir=/apache/tomcat5/webapps
  portlet.app.name = pam
  webapp.dir=${basedir}/src/webapp
  
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
    $Id: project.xml,v 1.1 2003/12/30 06:21:42 taylor Exp $
  -->
  <project>
    <extend>${basedir}/../project.xml</extend>
    <id>pam</id>
    <name>Jetspeed-2 PAM Portlet Application</name>
    <currentVersion>2.0-a1-dev</currentVersion>
    <package>org.apache.jetspeed</package>
    <description>PAM (Portlet Application Manager) Portlet Application (PA)</description>
    <shortDescription>PAM App</shortDescription>
    <dependencies>
      <dependency>
        <id>jetspeed-cps</id>
        <groupId>jetspeed2</groupId>
        <version>2.0-a1-dev</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties> 
      </dependency>
  	 <dependency>
        <id>portlet-api</id>
        <version>1.0</version>
        <properties>
          <war.bundle.jar>false</war.bundle.jar>
        </properties>
      </dependency>
      <dependency>
        <id>jstl</id>
        <version>1.0.2</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
      </dependency>
      <dependency>
        <id>taglibs:standard</id>
        <version>1.0.2</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
      </dependency>
      <dependency>
        <id>taglibs:request</id>
        <version>1.0.1</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
      </dependency>
          <dependency>
        <id>mx4j-jmx</id>
        <groupId>mx4j</groupId>
        <version>1.1.1</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
      </dependency>
      <dependency>
        <id>mx4j-tools</id>
        <groupId>mx4j</groupId>
        <version>1.1.1</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
       </dependency>
       <dependency>
        <id>velocity-dep</id>
        <groupId>velocity</groupId>
        <version>1.3.1</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
       </dependency>
       <dependency>
        <id>servletapi</id>
        <version>2.3</version>
        <properties>
          <war.bundle.jar>false</war.bundle.jar>
        </properties> 
      </dependency>
       <!--
        <dependency>
        <id>veltag</id>
        <groupId>velocity</groupId>
        <version>0.01-dev</version>
        <properties>
          <war.bundle.jar>true</war.bundle.jar>
        </properties>
       </dependency>      
      -->
     </dependencies>
  
  
    <build>
      <sourceDirectory>src/java</sourceDirectory>
    </build>
  
  </project>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/apps/pam/PortletApplicationBrowser.java
  
  Index: PortletApplicationBrowser.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.jetspeed.apps.pam;
  
  import java.io.IOException;
  import java.io.InputStream;
  
  import javax.portlet.GenericPortlet;
  import javax.portlet.PortletConfig;
  import javax.portlet.PortletContext;
  import javax.portlet.PortletException;
  import javax.portlet.PortletRequestDispatcher;
  import javax.portlet.PortletURL;
  import javax.portlet.RenderRequest;
  import javax.portlet.RenderResponse;
  
  import org.apache.jetspeed.cps.util.Streams;
  
  /**
   * This portlet is a browser over all the portlet applications in the system.
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: PortletApplicationBrowser.java,v 1.1 2003/12/30 06:21:43 taylor Exp $
   */
  public class PortletApplicationBrowser extends GenericPortlet
  {
      
      public void init(PortletConfig config)
      throws PortletException 
      {
          System.out.println("ApplicationBrowserPortlet: initializing portlet, config = "
+ config.getPortletName());
          super.init(config);
      }
      
      /*
       * The content is generated by <pre>/WEB-INF/hello.jsp</pre>
       */
      public void doEdit(RenderRequest request, RenderResponse response)
      throws PortletException, IOException
      {
          PortletContext context = getPortletContext();
          PortletRequestDispatcher rd = context.getRequestDispatcher("/hello.jsp");
          rd.include(request,response);
      }
      
      public void doHelp(RenderRequest request, RenderResponse response)
      throws PortletException, IOException
      {
          PortletContext context = getPortletContext();
          PortletRequestDispatcher rd = context.getRequestDispatcher("/hello.jsp");
          rd.include(request,response);
      }
  
      public void doView(RenderRequest request, RenderResponse response)
      throws PortletException, IOException
      {
          PortletContext context = getPortletContext();
          response.setContentType("text/html");
  
          PortletURL url = response.createRenderURL();
          // url.addParameter("test", "value");
          
          response.getWriter().println("<br/><b>Init Param 'Template' = " + this.getInitParameter("template")
+  "</b>");
          response.getWriter().println("<br/><b>Render URL = " + url +  "</b>");
          response.getWriter().println("<br/><b>Request dispatching now</b>");
          
          PortletRequestDispatcher rd = context.getRequestDispatcher("/hello.jsp");
          rd.include(request, response);
          
          InputStream is = context.getResourceAsStream("/snipet.html");
          if (is != null)
          {
              Streams.drain(is, response.getWriter());
          }
          
          response.getWriter().println("<br/><b>Done Request dispatching.</b>");
      }
  }
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/hello.jsp
  
  Index: hello.jsp
  ===================================================================
  <%@ page session="false"%>
  <p>This page was invoked from a LOCAL portlet app</P>
  <a href='/snipet.html'>somelink</a>
  
  
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/snipet.html
  
  Index: snipet.html
  ===================================================================
  <p>
  <b>
  some snipet of html
  </b>
  </p>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/portlet.tld
  
  Index: portlet.tld
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  <!DOCTYPE taglib PUBLIC
    "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
  <taglib>
      <tlibversion>1.0</tlibversion>
      <jspversion>1.1</jspversion>
      <shortname>Tags for portlets</shortname>
      <tag>
          <name>defineObjects</name>
          <tagclass>org.apache.pluto.tags.DefineObjectsTag</tagclass>
          <teiclass>org.apache.pluto.tags.DefineObjectsTag$TEI</teiclass>
          <bodycontent>empty</bodycontent>
      </tag>
      <tag>
          <name>param</name>
          <tagclass>org.apache.pluto.tags.ParamTag</tagclass>
          <bodycontent>empty</bodycontent>
          <attribute>
              <name>name</name>
              <required>true</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>value</name>
              <required>true</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
      </tag>
      <tag>
          <name>actionURL</name>
          <tagclass>org.apache.pluto.tags.ActionURLTag</tagclass>
          <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>
          <bodycontent>JSP</bodycontent>
          <attribute>
              <name>windowState</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>portletMode</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>secure</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>var</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
      </tag>
      <tag>
          <name>renderURL</name>
          <tagclass>org.apache.pluto.tags.RenderURLTag</tagclass>
          <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>
          <bodycontent>JSP</bodycontent>
          <attribute>
              <name>windowState</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>portletMode</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>secure</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
              <name>var</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
          </attribute>
      </tag>
      <tag>
          <name>namespace</name>
          <tagclass>org.apache.pluto.tags.NamespaceTag</tagclass>
          <bodycontent>empty</bodycontent>
      </tag>
  </taglib>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <portlet-app id="PAM" version="1.0">
  
    <portlet id="PortletApplicationBrowser">
      <init-param>
  			<description>This parameter sets the template used to format the browser.</description>
  			<name>template</name>
  			<value>pam-browser.jsp</value>
       </init-param>   
      <portlet-name>PortletApplicationBrowser</portlet-name>
      <display-name>Portlet Application Browser</display-name>
      <description>The PAM (Portlet Application Manager) Portlet Application Browser
displays a list of portlet applications deployed to this portal. From here you can add, edit,
and delete portlet applications.</description>
      <portlet-class>org.apache.jetspeed.apps.pam.PortletApplicationBrowser</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>EDIT</portlet-mode>
        <portlet-mode>VIEW</portlet-mode>
        <portlet-mode>HELP</portlet-mode>
      </supports>
      <portlet-info>
        <title>Portlet Application Browser</title>
        <short-title>Apps</short-title>
        <keywords>applications,apps,PAM</keywords>
      </portlet-info>
    </portlet>
    
  
  </portlet-app>
  
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/veltag.tld
  
  Index: veltag.tld
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
  
  <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>vel</short-name>
    <uri>/tags/velocity</uri>  
    <display-name>Velocity</display-name>
    <description>Velocity</description>
    
   <tag>
  		<name>velocity</name>
  		<tag-class>org.apache.taglibs.velocity.VelocityTag</tag-class>
  		<body-content>JSP</body-content>
  		<description>Velocity and JSP, together at last</description>
  		<attribute>
  			<name>strictaccess</name>
  			<required>false</required>
  		</attribute>
  	</tag>
  <!--
  	 <tag>
  		<name>velocity12</name>
  		<tag-class>org.apache.taglibs.velocity.VelocityTag12</tag-class>
  		<body-content>JSP</body-content>
  		<description>Velocity and JSP, together at last</description>
  		<attribute>
  			<name>strictaccess</name>
  			<required>false</required>
  		</attribute>
  	</tag>
  -->
  </taglib>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?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>
    <display-name>PAM</display-name>
    <description>PAM (Portlet Application Manager) Portlet Application</description>
  
    <servlet>
      <servlet-name>JetspeedContainer</servlet-name>
      <display-name>Jetspeed Container</display-name>
      <description>MVC Servlet for Jetspeed Portlet Applications</description>
      <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
    </servlet>
  
    <servlet-mapping>
       <servlet-name>
          JetspeedContainer
       </servlet-name>
       <url-pattern>
         /container/*
       </url-pattern>
    </servlet-mapping>    
  
  </web-app>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message