You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2016/04/22 10:58:25 UTC

[06/30] portals-pluto git commit: deleted example portlet

deleted example portlet


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/6d561e4b
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/6d561e4b
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/6d561e4b

Branch: refs/heads/master
Commit: 6d561e4b66e6592e3a51ff3b4c602c9691172e1e
Parents: dd3aa9d
Author: Jayendran Anil Kumar <ak...@de.ibm.com>
Authored: Wed Feb 24 13:14:38 2016 +0100
Committer: Jayendran Anil Kumar <ak...@de.ibm.com>
Committed: Wed Feb 24 13:14:38 2016 +0100

----------------------------------------------------------------------
 portlet-tck_3.0/basicPortlet/pom.xml            | 126 -------------------
 .../main/java/basic/portlet/BasicPortlet.java   | 124 ------------------
 .../src/main/resources/logging.properties       |  37 ------
 .../src/main/webapp/WEB-INF/jsp/view.jsp        |  31 -----
 .../src/main/webapp/WEB-INF/portlet.xml         |  53 --------
 .../src/main/webapp/WEB-INF/web.xml             |   4 -
 6 files changed, 375 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/pom.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/pom.xml b/portlet-tck_3.0/basicPortlet/pom.xml
deleted file mode 100644
index c47950e..0000000
--- a/portlet-tck_3.0/basicPortlet/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<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>com.ibm.portal.samples</groupId>
-	<artifactId>BasicPortlet</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<packaging>war</packaging>
-
-	<dependencies>
-		<dependency>
-			<groupId>javax.portlet</groupId>
-			<artifactId>portlet-api</artifactId>
-			<version>2.0</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-			<version>2.5</version>
-			<scope>provided</scope>
-		</dependency>
-
-		<!-- for eclipse JSP tooling purposes -->
-		<dependency>
-			<groupId>javax.servlet.jsp</groupId>
-			<artifactId>jsp-api</artifactId>
-			<version>2.1</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>jstl</artifactId>
-			<version>1.2</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.portals.pluto</groupId>
-			<artifactId>pluto-taglib</artifactId>
-			<version>2.1.0-M3</version>
-			<scope>provided</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<finalName>BasicPortlet</finalName>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>2.5.1</version>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<artifactId>maven-war-plugin</artifactId>
-				<version>2.2</version>
-				<configuration>
-					<archiveClasses>true</archiveClasses>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-
-	<profiles>
-		<profile>
-			<id>pluto</id>
-			
-			<dependencies>
-                <dependency>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>jstl</artifactId>
-                    <version>1.1.2</version>
-                    <scope>compile</scope>
-                    <exclusions>
-                        <exclusion>
-                            <groupId>javax.servlet</groupId>
-                            <artifactId>jsp-api</artifactId>
-                        </exclusion>
-                    </exclusions>
-                </dependency>
-                <dependency>
-                    <groupId>taglibs</groupId>
-                    <artifactId>standard</artifactId>
-                    <version>1.1.2</version>
-                    <scope>compile</scope>
-                </dependency>
-			</dependencies>
-			
-			<build>
-				<plugins>
-                   <plugin>
-                     <artifactId>maven-war-plugin</artifactId>
-                     <configuration>
-                       <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
-                     </configuration>
-                   </plugin>
-                   <!-- bind 'pluto:assemble' goal to 'generate-resources' lifecycle -->
-					<plugin>
-						<groupId>org.apache.portals.pluto</groupId>
-						<artifactId>maven-pluto-plugin</artifactId>
-						<version>2.0.3</version>
-						<dependencies>
-							<dependency>
-								<groupId>org.apache.portals.pluto</groupId>
-								<artifactId>pluto-util</artifactId>
-								<version>2.0.3</version>
-								<scope>runtime</scope>
-							</dependency>
-						</dependencies>
-						<executions>
-							<execution>
-								<phase>generate-resources</phase>
-								<goals>
-									<goal>assemble</goal>
-								</goals>
-							</execution>
-						</executions>
-					</plugin>
-				</plugins>
-			</build>
-		</profile>
-	</profiles>
-
-</project>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/src/main/java/basic/portlet/BasicPortlet.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/src/main/java/basic/portlet/BasicPortlet.java b/portlet-tck_3.0/basicPortlet/src/main/java/basic/portlet/BasicPortlet.java
deleted file mode 100644
index 7057ef7..0000000
--- a/portlet-tck_3.0/basicPortlet/src/main/java/basic/portlet/BasicPortlet.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*  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 basic.portlet;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletSession;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.servlet.ServletContext;
-
-/**
- * A very simple portlet
- */
-public class BasicPortlet extends GenericPortlet {
-
-   // Set up logging
-   private static final String LOG_CLASS = BasicPortlet.class.getName();
-   private final Logger logger = Logger.getLogger(LOG_CLASS);
-
-   protected void doView(RenderRequest request, RenderResponse response)
-         throws PortletException, IOException {
-      
-      if (logger.isLoggable(Level.FINE)) {
-         logger.logp(Level.FINE, this.getClass().getName(), "doView", "Entry");
-      }
-      
-      response.setContentType("text/html");
-      
-      PrintWriter writer = response.getWriter();
-      writer.write("<p>");
-      writer.write(getInitParameter("greeting"));
-      writer.write("</p>");
-      writer.write("<p>PortletContext is ServletContext?: ");
-      writer.write("" + (this.getPortletContext() instanceof ServletContext));
-      writer.write("</p>");
-      
-      String title = "Hello from window: " + request.getWindowID();
-      request.setAttribute("title", title);
-      
-      // dispatch to the viewer JSP
-      PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(
-            "/WEB-INF/jsp/view.jsp");
-      rd.include(request, response);
-      
-      PortletSession ps = request.getPortletSession();
-      
-      writer.write("<h5>Here are our attributes:</h5>");
-      StringBuilder txt = new StringBuilder(128);
-      txt.append("Portlet scoped attribute: ").append(ps.getAttribute("portletScopedNumber")).append("<br>");
-      txt.append("App scoped attribute: ")
-         .append(ps.getAttribute("appScopedNumber", PortletSession.APPLICATION_SCOPE))
-         .append("<br>");
-      
-      txt.append("<p>Auth type: ").append(request.getAuthType()).append("</p>");
-      
-      writer.write(txt.toString());
-      
-      
-   }
-
-   public void processAction(ActionRequest req, ActionResponse resp)
-         throws PortletException, IOException {
-      // the only action for this portlet is to trigger a reload of the
-      // configuration file
-      String actionName = req.getParameter("action");
-      if ("setParms".equals(actionName)) {
-         logger.logp(Level.INFO, this.getClass().getName(), "processAction",
-               "Set some parameters.");
-         resp.setRenderParameter("parm1", "value1");
-         resp.setRenderParameter("parm2", new String[] {"valueX", "valueY"});
-         resp.setRenderParameter("parm3", "value3");
-         resp.setRenderParameter("namespace", resp.getNamespace());
-         resp.setRenderParameter("windowID", req.getWindowID());
-      }
-
-      PortletSession ps = req.getPortletSession();
-
-      if ("invalidateSession".equals(actionName)) {
-         logger.logp(Level.INFO, this.getClass().getName(), "processAction",
-               "Invalidate the session.");
-         
-         ps.invalidate();
-      } else {
-
-         if (ps.getAttribute("portletScopedNumber") == null) {
-            int num = (int)(Math.random() * 1000);
-            ps.setAttribute("portletScopedNumber", num);
-         }
-
-         if (ps.getAttribute("appScopedNumber", PortletSession.APPLICATION_SCOPE) == null) {
-            int num = (int)(Math.random() * 1000);
-            ps.setAttribute("appScopedNumber", num, PortletSession.APPLICATION_SCOPE);
-         }
-         
-      }
-
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/src/main/resources/logging.properties
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/src/main/resources/logging.properties b/portlet-tck_3.0/basicPortlet/src/main/resources/logging.properties
deleted file mode 100644
index ecd3bab..0000000
--- a/portlet-tck_3.0/basicPortlet/src/main/resources/logging.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-# 
-# 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.
-
-handlers = org.apache.juli.FileHandler
-
-############################################################
-#
-# JDK 1.4+ logging handler specific properties for Pluto portal
-# using Tomcat's custom implementation of LogManager.
-# Logging level can be set to any one of:
-# SEVERE, WARN, INFO, CONFIG, FINE, FINEST or ALL. 
-# See the Tomcat documentation for more details.
-# 
-############################################################
-
-org.apache.juli.FileHandler.level = FINEST
-org.apache.juli.FileHandler.directory = ${catalina.base}/logs
-#Log file will be named pluto.<yyyy-mm-dd>.log
-org.apache.juli.FileHandler.prefix = BasicPortlet.
-
-org.apache.pluto.level=FINEST
-basic.portlet.level=FINEST

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/jsp/view.jsp
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/jsp/view.jsp b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/jsp/view.jsp
deleted file mode 100644
index 82f4a6e..0000000
--- a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/jsp/view.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%@ page session="false" %>
-<%@ taglib uri="http://java.sun.com/portlet_2_0"  prefix="portlet" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-
-<portlet:defineObjects />
-
-<H3>${renderRequest.getAttribute("title")}</H3>
-<P>This is just a basic portlet that displays its parameters.</P>
-
-<!-- Display a button that causes some parameters to be set -->
-<FORM METHOD="POST" ACTION="<portlet:actionURL/>">
-	<INPUT NAME='action' VALUE='setParms' TYPE="hidden">
-    <INPUT VALUE="Set Parameters" CLASS="portlet-form-button" TYPE="submit">
-</FORM>
-<FORM METHOD="POST" ACTION="<portlet:actionURL/>">
-   <INPUT NAME='action' VALUE='invalidateSession' TYPE="hidden">
-    <INPUT VALUE="Invalidate Session" CLASS="portlet-form-button" TYPE="submit">
-</FORM>
-
-<!-- Display the parameters for the portlet -->
-<P>Parameters:</P>
-<UL>
-<c:forEach var="name" items="${renderRequest.getParameterNames()}">
-   <c:forEach var="value" items="${renderRequest.getParameterValues(name)}">
-      <LI>
-         Name: ${name}, Val: ${value}
-      </LI>
-   </c:forEach>
-</c:forEach>
-</UL>
-

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/portlet.xml b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/portlet.xml
deleted file mode 100644
index 72652c5..0000000
--- a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/portlet.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
-   version="2.0" id="basic.portlet">
-   
-   <portlet>
-      <portlet-name>BasicPortlet</portlet-name>
-      <display-name>Basic Portlet</display-name>
-
-      <portlet-class>basic.portlet.BasicPortlet</portlet-class>
-
-      <init-param>
-         <name>greeting</name>
-         <value>Hi there!</value>
-      </init-param>
-
-      <supports>
-         <mime-type>text/html</mime-type>
-         <portlet-mode>VIEW</portlet-mode>
-      </supports>
-
-      <supported-locale>en</supported-locale>
-
-      <portlet-info>
-         <title>Basic Portlet</title>
-      </portlet-info>
-
-   </portlet>
-   
-   <portlet>
-      <portlet-name>BasisPortlet</portlet-name>
-      <display-name>Basis Portlet</display-name>
-
-      <portlet-class>basic.portlet.BasicPortlet</portlet-class>
-
-      <init-param>
-         <name>greeting</name>
-         <value>Guten Tag!</value>
-      </init-param>
-
-      <supports>
-         <mime-type>text/html</mime-type>
-         <portlet-mode>VIEW</portlet-mode>
-      </supports>
-
-      <supported-locale>en</supported-locale>
-
-      <portlet-info>
-         <title>Basic Portlet</title>
-      </portlet-info>
-
-   </portlet>
-</portlet-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6d561e4b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/web.xml b/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index f7d2673..0000000
--- a/portlet-tck_3.0/basicPortlet/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-	<display-name>Basic Portlet</display-name>
-</web-app>