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/01/18 13:41:19 UTC

[17/35] portals-pluto git commit: Adapted method annotations to match spec draft 1

Adapted method annotations to match spec draft 1


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

Branch: refs/heads/V3Prototype
Commit: 9d5855d46bb901d9c2b6ad26dff2537d424871be
Parents: a05e156
Author: Scott Nicklous <ms...@apache.org>
Authored: Sun Dec 27 18:57:04 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Sun Dec 27 18:57:04 2015 +0100

----------------------------------------------------------------------
 .../javax/portlet/annotations/EventMethod.java  |  31 +---
 .../javax/portlet/annotations/HeaderMethod.java |   2 +-
 .../portlet/annotations/PortletResources.java   | 153 -------------------
 3 files changed, 2 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/9d5855d4/portlet-api/src/main/java/javax/portlet/annotations/EventMethod.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/EventMethod.java b/portlet-api/src/main/java/javax/portlet/annotations/EventMethod.java
index 8790e33..b735580 100644
--- a/portlet-api/src/main/java/javax/portlet/annotations/EventMethod.java
+++ b/portlet-api/src/main/java/javax/portlet/annotations/EventMethod.java
@@ -63,39 +63,10 @@ public @interface EventMethod {
    String   portletName();
    
    /**
-    * If set to <code>true</code>, render parameters will be automatically copied
-    * from the <code>EventRequest</code> to the <code>EventResponse</code>.
-    * <p>
-    * The copy will take place before the code body of the annotated method
-    * is executed.
-    * 
-    * @return     <code>true</code> if parameters are to be copied.
-    */
-   boolean  copyParameters() default true; 
-   
-   /**
-    * The event name.
-    * <p>
-    * TODO: rework / remove this.
-    * <p>
-    * If an event name is specified, the bean enabler will dispatch portlet events with 
-    * matching event names to this method. 
-    * <p>
-    * An EventMethod with an empty event 
-    * name will receive all event requests not dispatched to other named EventMethods.
-    * 
-    * 
-    * @return  The event name
-    */
-   String   eventName() default "";
-   
-   /**
     * <div class='container-change'>
     * The processing event QName definitions supported by this method.
     * <p>
     * At least one processing event QName must be specified.
-    * <p>
-    * TODO: remove the default clause after rework above.
     * </div>
     * 
     * @see     EventDefinition
@@ -103,7 +74,7 @@ public @interface EventMethod {
     * 
     * @return  The processing event QNames
     */
-   PortletQName[]   processingEvents() default {};
+   PortletQName[]   processingEvents();
    
    /**
     * <div class='container-change'>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/9d5855d4/portlet-api/src/main/java/javax/portlet/annotations/HeaderMethod.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/HeaderMethod.java b/portlet-api/src/main/java/javax/portlet/annotations/HeaderMethod.java
index 7c0a05a..42935b1 100644
--- a/portlet-api/src/main/java/javax/portlet/annotations/HeaderMethod.java
+++ b/portlet-api/src/main/java/javax/portlet/annotations/HeaderMethod.java
@@ -91,7 +91,7 @@ public @interface HeaderMethod {
     * 
     * @return     The portlet mode
     */
-   String   portletMode() default "view";
+   String   portletMode() default "";
    
    /**
     * Sets the content type, or the MIME type, of content generated by the method.

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/9d5855d4/portlet-api/src/main/java/javax/portlet/annotations/PortletResources.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletResources.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletResources.java
deleted file mode 100644
index 232e000..0000000
--- a/portlet-api/src/main/java/javax/portlet/annotations/PortletResources.java
+++ /dev/null
@@ -1,153 +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.
- */
-
-/*
- * This source code implements specifications defined by the Java
- * Community Process. In order to remain compliant with the specification
- * DO NOT add / change / or delete method signatures!
- */
-
-package javax.portlet.annotations;
-
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-
-/**
- * <div class='changed_added_3_0'>
- * Declares resources needed by one or more portlets in a portlet application. 
- * The resources may be provided by the portlet for inclusion into the header section
- * through the <code>GenericPortlet#doHeaders</code> method 
- * or may represent dependencies on external resources.
- * <p>
- * The annotated method must have one of the following signatures:
- * <ul>
- * <li>
- * <code>public void &lt;methodName&gt;(RenderRequest, RenderResponse)</code>
- * <p>
- * This corresponds to the <code>doHeaders</code> method. Output written through the
- * render response object will be placed in the document <code>&lt;head&gt;</code> section.
- * </li>   
- * <li>
- * <code>String &lt;methodName&gt;()</code>
- * <p>
- * The String returned by the method will be placed 
- * in the document <code>&lt;head&gt;</code> section.
- * </li>   
- * </ul> 
- * <p> 
- * The method name can be freely selected.
- * <p>
- * The method declaration may contain a throws clause. Exceptions declared in the 
- * throws clause should be of type {@link javax.portlet.PortletException} or
- * {@link java.io.IOException}. 
- * Checked exceptions of any other type will be caught, wrapped with a PortletException, 
- * and rethrown.
- * <p>
- * This annotation may be applied to a type or to a method. 
- * If applied to a type, it behaves as though it were applied to an empty 
- * <code>doHeaders</code> method.  
- * </div>
- *    
- * @see javax.portlet.GenericPortlet#doHeaders(javax.portlet.RenderRequest, javax.portlet.RenderResponse) doHeaders
- */
-
-@Retention(RUNTIME) @Target({METHOD})
-public @interface PortletResources {
-   
-   /**
-    * <div class='container-change'>
-    * The portlet names for which the resources apply.
-    * <p>
-    * The annotated method can apply to multiple portlets within the portlet
-    * application. The names of the portlets to which the resources apply must be 
-    * specified in this field.
-    * <p>
-    * A wildcard character '*' can be specified in the first portletName array element 
-    * to indicate that the resource declarations are to apply to all portlets in 
-    * the portlet application.
-    * If specified, the wildcard character must appear alone in the first array element.
-    * </div>
-    * 
-    * @return     The portlet names
-    */
-   String[]   portletNames();
-   
-   /**
-    * <div class='container-change'>
-    * Sets the content type, or the MIME type, of content generated by the method.
-    * The content type will be set before the annotated method body is executed.
-    * <p>
-    * If this field is empty, no content type will be set.
-    * The portlet can then set the content type using the portlet API
-    * <code>RenderResponse#setContentType</code> method.
-    * </div>
-    * 
-    * @see        javax.portlet.RenderResponse#setContentType(String) RenderResponse#setContentType
-    * 
-    * @return     The content type
-    */
-   String   contentType() default "text/html";
-   
-   /**
-    * <div class='container-change'>
-    * Specifies a resource, such as a JSP, an HTML file, or a servlet, to be included.
-    * <p>
-    * The resource will be included using the 
-    * <code>PortletRequestDispatcher#include</code> method after the method body 
-    * has been executed.
-    * <p>
-    * If this field is empty, no resource will be included.
-    * </div>
-    * 
-    * @see        javax.portlet.PortletRequestDispatcher
-    * @see        javax.portlet.PortletRequestDispatcher#include(javax.portlet.PortletRequest, javax.portlet.PortletResponse) PortletRequestDispatcher#include
-    * 
-    * @return     The resource to be included
-    */
-   String   include() default "";
-   
-   /**
-    * <div class='container-change'>
-    * The dependencies the portlet may have on external resources.
-    * The resources can represent client-side prerequisites such as JavaScript libraries
-    * or stylesheet resources that are shared among portlets.
-    * </div>
-    * 
-    * @return     The dependencies
-    */
-   Dependency[]      dependencies() default {};
-   
-   /**
-    * <div class='container-change'>
-    * The ordinal number for this annotated method.
-    * <p>
-    * The ordinal number determines the order of execution if multiple methods
-    * are annotated.
-    * Annotated methods with a lower ordinal number are executed before methods with
-    * a higher ordinal number.
-    * </div>
-    * 
-    * @return     The ordinal number
-    */
-   int        ordinal() default 0;
-}