You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by jf...@apache.org on 2004/04/22 05:54:10 UTC

cvs commit: jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/src/java/modules/actions/portlets MyAction.java

jford       2004/04/21 20:54:10

  Added:       plugin/src/plugin-resources/default/template-resources/src/webapp/WEB-INF/conf
                        MyPortlet.xreg My.properties
               plugin/src/plugin-resources/default/template-resources/src/webapp/WEB-INF/template/vm/portlet/html
                        mytemplate.vm
               plugin/src/plugin-resources/default/template-resources
                        project.xml project.properties
               plugin/src/plugin-resources/default template.properties
               plugin/src/plugin-resources/default/template-resources/src/java/modules/actions/portlets
                        MyAction.java
  Log:
  Example project
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/src/webapp/WEB-INF/conf/MyPortlet.xreg
  
  Index: MyPortlet.xreg
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed 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.
  -->
  <registry>
  	<portlet-entry name="MyFirstPortlet" hidden="false" type="ref" application="false" parent="GenericMVCPortlet">
          <meta-info>
              <title>Search Portlet</title>
              <description>Sample Search Portlet to index and search web sites</description>
          </meta-info>
          <parameter name="template" value="mytemplate" hidden="true"/>
          <parameter name="viewtype" value="Velocity" hidden="true"/>
          <parameter name="action" value="portlets.MyAction" hidden="true"/>
          <media-type ref="html"/>
          <category>example</category>
      </portlet-entry>
  </registry>
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/src/webapp/WEB-INF/conf/My.properties
  
  Index: My.properties
  ===================================================================
  module.packages=@PACKAGE@.modules
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/src/webapp/WEB-INF/template/vm/portlet/html/mytemplate.vm
  
  Index: mytemplate.vm
  ===================================================================
  This is my first velocity portlet.
  
  $data.getClass().getName() <br />
  
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
  
    <!-- the version of maven's project object model -->
    <pomVersion>3</pomVersion>
    
    <!-- a unique name for this project -->
    <id>@ID@</id>
    
    <!-- a short but descriptive name for the project -->
    <name>@NAME@</name>
    
    <!-- The version of the project under development, e.g.
         1.1, 1.2, 2.0-SNAPSHOT -->
    <currentVersion>1.0</currentVersion>
    
    <!-- details about the organization that 'owns' the project -->
    <organization>
      <name>Apache Software Foundation</name>
      <url>http://www.apache.org/</url>
      <logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
    </organization>
    
    <!-- the year the project started -->
    <inceptionYear>2002</inceptionYear>
    <package>@PACKAGE@</package>
    <logo>http://maven.apache.org/images/maven.jpg</logo>
    <description>
      A collection of example projects showing how to use maven in different
      situations   
    </description>
    <!-- a short description of what the project does -->
    <shortDescription>
      How to use maven in different situations
    </shortDescription>
  
    <!-- the project home page -->
    <url>http://maven.apache.org/reference/plugins/examples/</url>
    <issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
    <siteAddress>jakarta.apache.org</siteAddress>
    <siteDirectory>/www/maven.apache.org/reference/plugins/examples/</siteDirectory>
    <distributionDirectory>/www/maven.apache.org/builds/</distributionDirectory>
  
    <!-- the version control repository and http url for online access
         the connection element has the form:
         scm:<system>:<system specific connection string> -->
    <repository>
      <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/examples</connection>
      <url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/examples/</url>
    </repository>
  
    <!-- any mailing lists for the project -->
    <mailingLists/>
    
    <!-- who the developers are for the project -->
    <developers/>
  
    <!-- jar files the project is dependent on -->
    <dependencies/>
    
    <!-- build information for the project -->
    <build>
      <nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
      <sourceDirectory>src/java</sourceDirectory>
      <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  
      <unitTest>
        <includes>
          <include>**/*Test.java</include>
        </includes>
        <excludes>
          <exclude>**/NaughtyTest.java</exclude>
        </excludes>
      </unitTest>
  
      <resources>
        <resource>
          <directory>src/conf</directory>
          <includes>
            <include>*.properties</include>
          </includes>
        </resource>
      </resources>
    </build>
  
  
  </project>
  
  
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/project.properties
  
  Index: project.properties
  ===================================================================
  maven.xdoc.date=left
  maven.xdoc.version=${pom.currentVersion}
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template.properties
  
  Index: template.properties
  ===================================================================
  maven.jetspeed.genapp.repackage=java,test
  maven.jetspeed.genapp.properties=webapp/WEB-INF/conf
  maven.jetspeed.genapp.filter=project.xml
  
  maven.jetspeed.genapp.default.package=default.example.app
  
  
  
  1.1                  jakarta-jetspeed/plugin/src/plugin-resources/default/template-resources/src/java/modules/actions/portlets/MyAction.java
  
  Index: MyAction.java
  ===================================================================
  /*
   * Copyright 2000-2004 The Apache Software Foundation.
   * 
   * Licensed 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 @PACKAGE@.modules.actions.portlets;
  
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Comparator;
  import java.util.Iterator;
  import java.util.List;
  
  import org.apache.jetspeed.om.registry.RegistryEntry;
  import org.apache.jetspeed.portal.Portlet;
  import org.apache.jetspeed.services.Registry;
  import org.apache.jetspeed.util.PortletSessionState;
  import org.apache.turbine.util.RunData;
  import org.apache.velocity.context.Context;
  
  /**
   * This action enables to browse any of the system registries for displaying
   * available entries and information on these entries
   * 
   * @author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
   * @version $ID$
   */
  public class MyAction extends GenericMVCAction
  {
  	/** 
       * Subclasses must override this method to provide default behavior 
       * for the portlet action
       */
      protected void buildNormalContext( Portlet portlet, 
                                         Context context,
                                         RunData rundata )
      {
      }
      }
  }
  
  
  

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