http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletConfiguration.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletConfiguration.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletConfiguration.java
new file mode 100644
index 0000000..58bc397
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletConfiguration.java
@@ -0,0 +1,236 @@
+/* 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'>
+ * Annotation for the portlet configuration.
+ * Many of these configuration parameters also appear in
+ * the portlet deployment descriptor.
+ * <p>
+ * The portlet deployment descriptor can continue to be used.
+ * Values of configuration parameters appearing in the deployment descriptor have
+ * precedence over the corresponding values defined in the annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({TYPE})
+public @interface PortletConfiguration {
+
+ /**
+ * The portlet name for the annotated type.
+ *
+ * @return The portlet name
+ */
+ String portletName();
+
+ /**
+ * The portlet initialization parameters.
+ *
+ * @return An array of initialization parameters
+ */
+ InitParameter[] initParams() default {};
+
+ /**
+ * The portlet container runtime options.
+ *
+ * @return An array of portlet runtime options
+ */
+ RuntimeOption[] runtimeOptions() default {};
+
+ /**
+ * <div class='container-change'>
+ * The locales supported by the portlet.
+ * An array of String values, each of which represents a single locale.
+ * <p>
+ * The locale is specified as a language tag as defined in
+ * IETF BCP 47, "Tags for Identifying Languages".
+ * </div>
+ *
+ * @see java.util.Locale
+ * @see java.util.Locale#forLanguageTag forLanguageTag
+ * @see <a href="https://tools.ietf.org/html/bcp47">IETF BCP 47</a>
+ *
+ * @return An array of language tag strings
+ */
+ String[] supportedLocales() default {"en"};
+
+ /**
+ * <div class='not-supported'>
+ * Locale specific static title for this portlet.
+ * </div>
+ *
+ * @return The portlet title
+ */
+ LocaleString[] title() default {};
+
+ /**
+ * <div class='container-change'>
+ * Locale specific short version of the static title.
+ * </div>
+ *
+ * @return The short title
+ */
+ LocaleString[] shortTitle() default {};
+
+ /**
+ * <div class='container-change'>
+ * The display-name type contains a locale-specific short name that is intended to be displayed by tools.
+ * It is used by display-name elements.
+ * The display name need not be unique.
+ * </div>
+ *
+ * @return The display name
+ */
+ LocaleString[] displayName() default {};
+
+ /**
+ * <div class='container-change'>
+ * The portlet description.
+ * It provides locale-specific text describing the portlet for use by the portal application or by tools.
+ * </div>
+ *
+ * @return The portlet description
+ */
+ LocaleString[] description() default {};
+
+ /**
+ * <div class='container-change'>
+ * Locale specific keywords associated with this portlet.
+ * The keywords are separated by commas within the value of the
+ * <code>LocaleString</code> array element.
+ * </div>
+ *
+ * @return The keywords
+ */
+ LocaleString[] keywords() default {};
+
+ /**
+ * <div class='container-change'>
+ * The portlet preferences.
+ * </div>
+ *
+ * @return The portlet preferences
+ */
+ Preference[] prefs() default {};
+
+ /**
+ * <div class='container-change'>
+ * The public render parameter identifiers used by the portlet.
+ * </div>
+ *
+ * @return The array of public render parameters.
+ */
+ String[] publicParams() default {};
+
+ /**
+ * <div class='container-change'>
+ * Defines the content types supported by the portlet along with
+ * the associated portlet modes and window states.
+ * </div>
+ *
+ * @return An array of content type support items
+ */
+ ContentTypeSupport[] contentTypes() default {@ContentTypeSupport};
+
+ /**
+ * <div class='container-change'>
+ * The resource bundle name for this portlet.
+ * Name of the resource bundle containing the language specific
+ * portlet information in different languages.
+ * <p>
+ * the file name is specified without
+ * the language specific part (e.g. _en) or the file extension.
+ * </div>
+ *
+ * @return The resource bundle name
+ */
+ String resourceBundle() default "";
+
+ /**
+ * <div class='container-change'>
+ * The supported portlet modes and window states.
+ * </div>
+ *
+ * @return The supported portlet modes and window states
+ */
+ Supports[] supports() default {};
+
+ /**
+ * <div class='not-supported'>
+ * The cache scope, which defines whether generated portlet content is private
+ * for the user or can be shared across different users.
+ * <p>
+ * If this field is set to <code>TRUE</code>, cached information can be shared
+ * between users.
+ * Otherwise cached information will be considered private
+ * to the user.
+ * <p>
+ * This value is set before the annotated method is called.
+ * </div>
+ *
+ * @return The cache scope
+ */
+ boolean cacheScopePublic() default false;
+
+ /**
+ * <div class='not-supported'>
+ * Expiration-time defines the time in seconds after which the portlet output expires.
+ * A value of -1 indicates that the output never expires.
+ * <p>
+ * This value is set before the annotated method is called.
+ * </div>
+ *
+ * @return The expiration time
+ */
+ int cacheExpirationTime() default 0;
+
+ /**
+ * <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 security role references.
+ * </div>
+ *
+ * @return The security role references
+ */
+ SecurityRoleRef[] roleRefs() default {};
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletConfigurations.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletConfigurations.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletConfigurations.java
new file mode 100644
index 0000000..cf05926
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletConfigurations.java
@@ -0,0 +1,51 @@
+/* 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'>
+ * Annotation for configuration of multiple portlets.
+ * @see PortletConfiguration
+ * </div>
+ */
+@Retention(RUNTIME) @Target({TYPE})
+public @interface PortletConfigurations {
+
+ /**
+ * The portlet configurations. Each array entry contains the configuration
+ * for a single portlet.
+ *
+ * @return An array of portlet configurations
+ */
+ PortletConfiguration[] configurations();
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletQName.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletQName.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletQName.java
new file mode 100644
index 0000000..3c5fccd
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletQName.java
@@ -0,0 +1,92 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * represent a QName for use in portlet event and public render parameter definitions.
+ * It cannot be used as a stand-alone portlet annotation.
+ * <p>
+ * The qname is specified as a string of the form
+ * <code>namespace-name:local-part</code>, where
+ * <ul>
+ * <li>
+ * namespace-name is a URI specifying the namespace.
+ * </li>
+ * <li>
+ * local-part is a non-empty String.
+ * </li>
+ * </ul>
+ * </div>
+ *
+ * @see javax.xml.namespace.QName javax.xml.namespace.QName
+ * @see <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#QName">W3C Qname definition</a>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface PortletQName {
+
+ /**
+ * The QName namespace URI.
+ * <p>
+ * If the QName namespace URI is empty, the default value is used.
+ * The default value is taken from the following locations, specified in order of precedence:
+ * <ul>
+ * <li>
+ * The value defined in the {@literal <}default-namespace{@literal >} element in the portlet
+ * deployment descriptor.
+ * </li>
+ * <li>
+ * The value defined in the {@literal <}defaultNamespace{@literal >} element in the
+ * {@literal @}PortletApplication annotation.
+ * </li>
+ * <li>
+ * The value javax.xml.XMLConstants.NULL_NS_URI
+ * </li>
+ * </ul>
+ *
+ * @return The QName namespace URI.
+ *
+ * @see PortletApplication#defaultNamespaceURI()
+ */
+ String namespaceURI();
+
+ /**
+ * The local part.
+ * <p>
+ * local-part should be a non-empty String.
+ *
+ * @return The qname local part.
+ */
+ String localPart();
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletRequestFilter.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletRequestFilter.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletRequestFilter.java
new file mode 100644
index 0000000..258aaed
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletRequestFilter.java
@@ -0,0 +1,129 @@
+/* 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'>
+ * Designates a portlet request filter class.
+ * The request filter performs filtering tasks on either the request to a portlet,
+ * on the response from a portlet, or on both.
+ * <p>
+ * Request filters perform filtering in the doFilter method.
+ * Every Filter has access to a FilterConfig object from which it can obtain its
+ * initialization parameters and a reference to the PortletContext object.
+ * It can to load resources needed for filtering tasks through the PortletContext object.
+ * <p>
+ * Request filters can be applied to the Action phase, the Event phase, the Render phase
+ * or the Resource phase depending on which of the filter interfaces the request filter class
+ * implements.
+ * <p>
+ * The annotated type must implement one or more of the following interfaces:
+ * <ul>
+ * <li>javax.portlet.filter.PortletFilter</li>
+ * <li>javax.portlet.filter.ActionFilter</li>
+ * <li>javax.portlet.filter.EventFilter</li>
+ * <li>javax.portlet.filter.RenderFilter</li>
+ * <li>javax.portlet.filter.ResourceFilter</li>
+ * </ul>
+ * </div>
+ *
+ * @see javax.portlet.filter.PortletFilter
+ * @see javax.portlet.filter.ActionFilter
+ * @see javax.portlet.filter.EventFilter
+ * @see javax.portlet.filter.RenderFilter
+ * @see javax.portlet.filter.ResourceFilter
+ *
+ */
+
+@Retention(RUNTIME) @Target({TYPE})
+public @interface PortletRequestFilter {
+
+ /**
+ * <div class='not-supported'>
+ * The portlet names for which the request filter applies.
+ * <p>
+ * The annotated request filter can apply to multiple portlets within the portlet
+ * application. The names of the portlets to which the request filter applies must be
+ * specified in this field.
+ * <p>
+ * A wildcard character '*' can be specified in the first portletName array element
+ * to indicate that the request filter is 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='not-supported'>
+ * The filter initialization parameters.
+ * </div>
+ *
+ * @return An array of initialization parameters
+ */
+ InitParameter[] initParams() default {};
+
+ /**
+ * <div class='not-supported'>
+ * The display-name type contains a language-specific short name that is intended to be displayed by tools.
+ * </div>
+ *
+ * @return The display name
+ */
+ LocaleString[] displayName() default {};
+
+ /**
+ * <div class='not-supported'>
+ * The portlet filter description
+ * providing locale-specific text describing the portlet filter for use by the portal application or by tools.
+ * </div>
+ *
+ * @return The portlet description
+ */
+ LocaleString[] description() default {};
+
+ /**
+ * <div class='not-supported'>
+ * The ordinal number for this annotated method.
+ * <p>
+ * The ordinal number determines the order of execution if multiple methods
+ * are annotated for a given request type.
+ * 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;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/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
new file mode 100644
index 0000000..232e000
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletResources.java
@@ -0,0 +1,153 @@
+/* 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 <methodName>(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><head></code> section.
+ * </li>
+ * <li>
+ * <code>String <methodName>()</code>
+ * <p>
+ * The String returned by the method will be placed
+ * in the document <code><head></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;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletSerializable.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletSerializable.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletSerializable.java
new file mode 100644
index 0000000..0e1e20a
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletSerializable.java
@@ -0,0 +1,84 @@
+/* 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;
+
+/**
+ * <div class='changed_added_3_0'>
+ * This interface must be implemented by {@link PortletStateScoped} beans
+ * in order to allow the bean portlet container to intialize the bean at the
+ * beginning of a request and passivate the bean at the end of the request.
+ * <p>
+ * These methods are not intended to be called by application code.
+ * <p>
+ * A <code>{@literal @}PortletStateScoped</code> bean must be a valid bean; in particular,
+ * it must provide a default constructor or be constructable through an
+ * <code>{@literal @}Produces</code> method or field.
+ * <p>
+ * Note that only changes made to the bean state during <code>ActionMethod</code>
+ * or <code>EventMethod</code> execution are stored in the portlet state.
+ * Changes made during <code>RenderMethod</code>, <code>ServeResourceMethod</code>,
+ * or <code>HeaderMethod</code> execution will not be available during subsequent requests.
+ * </div>
+ *
+ * @see PortletStateScoped
+ */
+public interface PortletSerializable {
+
+ /**
+ * The portlet bean container calls this method after {@link ActionMethod}
+ * or {@link EventMethod} execution to obtain the bean state.
+ * <p>
+ * The bean developer should take care to include all internal bean data in the
+ * returned state that is necessary for properly initializing the bean when the
+ * portlet bean container calls the
+ * {@link PortletSerializable#deserialize(String[]) deserialize} method.
+ * <p>
+ * If no bean data has been set, this method should return an empty array or
+ * <code>null</code> in order to avoid setting extraneous parameters.
+ *
+ * @return The bean state as a string array.
+ */
+ public String[] serialize();
+
+ /**
+ * The bean portlet container calls this method at the beginning of every portlet
+ * request method that uses the bean.
+ * <p>
+ * The string array portlet state data is the same array provided to the container
+ * by the {@link PortletSerializable#serialize() serialize} method.
+ * The bean should reconstruct its internal state during execution of this method.
+ * <p>
+ * If no data is available for the portlet, for example because because no
+ * {@link ActionMethod} or {@link EventMethod} has been executed for the portlet,
+ * the state parameter will be an empty array.
+ * <p>
+ * If the state array is empty, the bean implementation should provide approriate
+ * default values for its internal variables.
+ *
+ * @param state The bean state as string array.
+ * The array will be empty if bean data has not yet been set.
+ */
+ public void deserialize(String[] state);
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletSessionScoped.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletSessionScoped.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletSessionScoped.java
new file mode 100644
index 0000000..f10d83a
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletSessionScoped.java
@@ -0,0 +1,76 @@
+/* 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.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+import javax.portlet.PortletSession;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Provides a CDI custom scope that is scoped to the portlet session rather than to the
+ * servlet session.
+ * <p>
+ * Note that a portlet session scoped bean must implement
+ * <code>java.io.Serializable</code>, since it will be stored in the portlet session.
+ * </div>
+ *
+ */
+
+@Retention(RUNTIME)
+@Target({TYPE})
+@NormalScope(passivating=true)
+@Inherited
+@Documented
+public @interface PortletSessionScoped {
+
+ /**
+ * The portlet scope into which the annotated bean is to be placed. Can be set to
+ * the following values:
+ * <ul>
+ * <li>
+ * PortletSession.PORTLET_SCOPE - scopes the bean to the portlet session
+ * </li>
+ * <li>
+ * PortletSession.APPLICATION_SCOPED - Scopes the bean to the portlet application session.
+ * The effect of this scope is the same as using the CDI @SessionScoped annotation.
+ * </li>
+ * </ul>
+ *
+ * @return The portlet scope
+ *
+ * @see PortletSession#PORTLET_SCOPE
+ * @see PortletSession#APPLICATION_SCOPE
+ */
+ int value() default PortletSession.PORTLET_SCOPE;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletStateScoped.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletStateScoped.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletStateScoped.java
new file mode 100644
index 0000000..3c7d4a1
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletStateScoped.java
@@ -0,0 +1,96 @@
+/* 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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Provides a CDI custom scope that is scoped to the portlet state.
+ * The purpose of this scope is to allow portlet render parameters to be handled like
+ * beans.
+ * <p>
+ * If an <code>{@literal @}PortletStateScoped</code> bean is injected into a class containing
+ * an <code>{@literal @}EventMethod</code> or an <code>{@literal @}ActionMethod</code>,
+ * the bean is associated with the corresponding portlet.
+ * The bean state is stored as a render parameter of the that portlet.
+ * <p>
+ * A bean annotated with this scope must implement the {@link PortletSerializable}
+ * interface,
+ * which provides methods used by the portlet bean container to synchronize the bean
+ * according to the portlet state.
+ * <p>
+ * An <code>{@literal @}PortletStateScoped</code> bean is similar to an
+ * <code>{@literal @}RequestScoped</code> bean in that a new instance is created at the
+ * beginning of each request.
+ * However, for <code>{@literal @}PortletStateScopedScoped</code> beans, the portlet bean
+ * container calls the
+ * {@link PortletSerializable#deserialize(String[]) PortletSerializable#deserialize}
+ * method at the beginning of each request to initialize the bean and the
+ * {@link PortletSerializable#serialize() PortletSerializable#serialize} method
+ * at the end of an action request or event request to obtain the serialized bean data.
+ * <p>
+ * A <code>{@literal @}PortletStateScoped</code> bean must be a valid bean and
+ * must provide a default constructor.
+ * <p>
+ * Note that only changes made to the bean state during <code>ActionMethod</code>
+ * or <code>EventMethod</code> execution are stored in the portlet state.
+ * Changes made during <code>RenderMethod</code>, <code>ServeResourceMethod</code>,
+ * or <code>HeaderMethod</code> execution will not be available during subsequent requests.
+ * </div>
+ *
+ * @see PortletSerializable
+ */
+
+@Retention(RUNTIME)
+@Target({TYPE})
+@NormalScope()
+@Inherited
+public @interface PortletStateScoped {
+
+ /**
+ * The name of the render parameter under which the bean state is to be stored.
+ * <p>
+ * If the name is not specified through the annotation, the portlet container
+ * will assign a render parameter name.
+ * <p>
+ * If this element is a public render parameter identifier as declared in the
+ * portlet application configuration,
+ * the render parameter represented by the annotated class will be treated as
+ * a public render parameter.
+ *
+ * @return The parameter name
+ */
+ String paramName() default "";
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PortletURLGenerationListener.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PortletURLGenerationListener.java b/portlet-api/src/main/java/javax/portlet/annotations/PortletURLGenerationListener.java
new file mode 100644
index 0000000..1ad3af0
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PortletURLGenerationListener.java
@@ -0,0 +1,129 @@
+/* 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'>
+ * Designates a portlet URL generation listener method.
+ * The listener method will be invoked before a URL of the corresponding type is
+ * generated.
+ * <p>
+ * The annotated method must have one of the following signatures:
+ * <p>
+ * <code>public void <methodName>(ActionURL actionURL)</code>
+ * <p>
+ * <p>
+ * <code>public void <methodName>(RenderURL renderURL)</code>
+ * <p>
+ * <p>
+ * <code>public void <methodName>(ResourceURL resourceURL)</code>
+ * <p>
+ * where the method name can be freely selected.
+ * </div>
+ *
+ * @see javax.portlet.PortletURLGenerationListener
+ *
+ */
+
+@Retention(RUNTIME) @Target({METHOD})
+public @interface PortletURLGenerationListener {
+
+ /**
+ * <div class='changed_added_3_0'>
+ * Needed for V2.0 portlets to discern between a Render URL and an Action URL
+ * since both are represented by the interface PortletURL.
+ *
+ * Not needed for v3.0 portlets.
+ * </div>
+ */
+ public enum URLType {RENDER, ACTION, RESOURCE}
+
+ /**
+ * The portlet names for which the listener applies.
+ * <p>
+ * The annotated listener method can apply to multiple portlets within the portlet
+ * application. The names of the portlets to which the listener applies must be
+ * specified in this field.
+ * <p>
+ * A wildcard character '*' can be specified in the first portletName array element
+ * to indicate that the listener is to apply to all portlets in the portlet application.
+ * If specified, the wildcard character must appear alone in the first array element.
+ *
+ * @return The portlet names
+ */
+ String[] portletNames();
+
+ /**
+ * The ordinal number for this annotated method.
+ * <p>
+ * The ordinal number determines the order of execution if multiple methods
+ * are annotated for a given URL type.
+ * Annotated methods with a lower ordinal number are executed before methods with
+ * a higher ordinal number.
+ *
+ * @return The ordinal number
+ */
+ int ordinal() default 0;
+
+ /**
+ * <div class='not-supported'>
+ * The display-name type contains a language-specific short name that is intended to be displayed by tools.
+ * </div>
+ *
+ * @return The display name
+ */
+ LocaleString[] displayName() default {};
+
+ /**
+ * <div class='not-supported'>
+ * The portlet filter description
+ * providing locale-specific text describing the portlet filter for use by the portal application or by tools.
+ * </div>
+ *
+ * @return The portlet description
+ */
+ LocaleString[] description() default {};
+
+ /**
+ * The URL Type.
+ * This field is needed for v2.0 portlets to discern between render URLs and
+ * action URLs, since both are represented by the interface PortletURL.
+ *
+ * Needs not be specified for ResourceURLs, as they are identified by the
+ * ResourceURL interface.
+ *
+ * Not needed for v3.0 portlets
+ *
+ * @return The URL type
+ */
+ URLType type() default URLType.RENDER;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/Preference.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/Preference.java b/portlet-api/src/main/java/javax/portlet/annotations/Preference.java
new file mode 100644
index 0000000..1bfa5ca
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/Preference.java
@@ -0,0 +1,73 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * represent a single portlet preference.
+ * It cannot be used as a stand-alone portlet annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface Preference {
+
+ /**
+ * The preference name.
+ *
+ * @return The preference name
+ */
+ String name();
+
+ /**
+ * The preference values array.
+ *
+ * @return The preference values.
+ */
+ String[] values();
+
+ /**
+ * Marks the preference as being read-only.
+ *
+ * @return The read-only flag
+ */
+ boolean isReadOnly() default false;
+
+ /**
+ * <div class='container-change'>
+ * Provides locale-specific text describing the portlet preference for use by the portal application or by tools.
+ * </div>
+ *
+ * @return The portlet preference description
+ */
+ LocaleString[] description() default {};
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PreferencesValidator.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PreferencesValidator.java b/portlet-api/src/main/java/javax/portlet/annotations/PreferencesValidator.java
new file mode 100644
index 0000000..2fe4751
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PreferencesValidator.java
@@ -0,0 +1,83 @@
+/* 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'>
+ * Designates a preferences validator method.
+ * The PreferencesValidator allows validation of the set of portlet preferences
+ * before they are stored in the persistent store.
+ * The validator method is invoked during execution of the
+ * store method of the PortletPreferences.
+ * <p>
+ * The annotated method must have the following signature:
+ * <p>
+ * <code>public void <methodName>(PortletPreferences preferences) throws ValidatorException</code>
+ * <p>
+ * where the method name can be freely selected.
+ * <p>
+ * </div>
+ *
+ * @see javax.portlet.PreferencesValidator#validate(javax.portlet.PortletPreferences) PreferencesValidator#validate
+ *
+ */
+
+@Retention(RUNTIME) @Target({METHOD})
+public @interface PreferencesValidator {
+
+ /**
+ * The portlet names for which the validator applies.
+ * <p>
+ * The annotated validator method can apply to multiple portlets within the portlet
+ * application. The names of the portlets to which the validator applies must be
+ * specified in this field.
+ * <p>
+ * A wildcard character '*' can be specified in the first portletName array element
+ * to indicate that the validator is to apply to all portlets in the portlet application.
+ * If specified, the wildcard character must appear alone in the first array element.
+ *
+ * @return The portlet names
+ */
+ String[] portletNames();
+
+ /**
+ * 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.
+ *
+ * @return The ordinal number
+ */
+ int ordinal() default 0;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/PublicRenderParameterDefinition.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/PublicRenderParameterDefinition.java b/portlet-api/src/main/java/javax/portlet/annotations/PublicRenderParameterDefinition.java
new file mode 100644
index 0000000..fed9df8
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/PublicRenderParameterDefinition.java
@@ -0,0 +1,93 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * represent a single public render parameter.
+ * It cannot be used as a stand-alone portlet annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface PublicRenderParameterDefinition {
+
+ /**
+ * <div class='container-change'>
+ * The public render parameter identifier.
+ * <p>
+ * This identifier is used as the public render parameter name in the
+ * portlet parameter handling interfaces.
+ * <p>
+ * The public render parameter identifier must be unique within the portlet application.
+ * </div>
+ *
+ * @see javax.portlet.PortletConfig#getPublicRenderParameterNames() PortletConfig#getPublicRenderParameterNames
+ *
+ * @return The public render parameter identifier
+ */
+ String identifier();
+
+ /**
+ * <div class='container-change'>
+ * The public render parameter Qname.
+ * <p>
+ * The public render parameter qname must be unique within the portlet application.
+ * </div>
+ *
+ * @see javax.xml.namespace.QName
+ * @see <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#QName">Qname definition</a>
+ *
+ * @return The qname
+ */
+ PortletQName qname();
+
+ /**
+ * <div class='container-change'>
+ * Provides locale-specific text describing the public render parameter for use by the portal application or by tools.
+ * </div>
+ *
+ * @return The public render parameter description
+ */
+ LocaleString[] description() default {};
+
+ /**
+ * <div class='container-change'>
+ * The display-name type contains a locale-specific short name that is intended to be displayed by tools.
+ * It is used by display-name elements.
+ * The display name need not be unique.
+ * </div>
+ *
+ * @return The display name
+ */
+ LocaleString[] displayName() default {};
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/RenderMethod.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/RenderMethod.java b/portlet-api/src/main/java/javax/portlet/annotations/RenderMethod.java
new file mode 100644
index 0000000..7ccc463
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/RenderMethod.java
@@ -0,0 +1,143 @@
+/* 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 static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Designates a method corresponding to the portlet API render method.
+ * The annotated method must have one of the following signatures:
+ * <p>
+ * The annotated method must have one of the following signatures:
+ * <ul>
+ * <li>
+ * <code>public void <methodName>(RenderRequest, RenderResponse)</code>
+ * <p>
+ * This corresponds to the <code>render</code> method.
+ * </li>
+ * <li>
+ * <code>public String <methodName>()</code>
+ * <p>
+ * The String returned by the method will be written to the response unchanged.
+ * </li>
+ * <li>
+ * <code>public void <methodName>()</code>
+ * <p>
+ * Intended for use when only a resource include is needed.
+ * </li>
+ * </ul>
+ * where 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.
+ * </div>
+ *
+ * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse) Portlet#render
+ *
+ */
+
+@Retention(RUNTIME) @Target({METHOD})
+public @interface RenderMethod {
+
+ /**
+ * The portlet names for which the render method applies.
+ * <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.
+ *
+ * @return The portlet names
+ */
+ String[] portletNames();
+
+ /**
+ * The portlet mode rendered by the annotated method.
+ * <p>
+ * If an portlet mode is specified, the bean enabler will dispatch Render requests with
+ * matching portlet mode values to this method.
+ * <p>
+ * If this field is empty, the method will be executed for all
+ * Render requests not dispatched by portlet mode to other RenderMethods.
+ *
+ * @return The portlet mode
+ */
+ String portletMode() default "view";
+
+ /**
+ * 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.
+ *
+ * @see javax.portlet.RenderResponse#setContentType(String) RenderResponse#setContentType
+ *
+ * @return The content type
+ */
+ String contentType() default "text/html";
+
+ /**
+ * 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.
+ *
+ * @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 "";
+
+ /**
+ * 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.
+ *
+ * @return The ordinal number
+ */
+ int ordinal() default 0;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/RenderParam.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/RenderParam.java b/portlet-api/src/main/java/javax/portlet/annotations/RenderParam.java
new file mode 100644
index 0000000..3246fd3
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/RenderParam.java
@@ -0,0 +1,68 @@
+/* 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 javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Qualifier that specifies an action parameter for injection.
+ * The parameter will be <code>null</code> if accessed during action
+ * request execution.
+ * <p>
+ * The type of the injection target must be <code>String</code> or <code>String[]</code>.
+ * <p>
+ * This annotation may only be used in an <code>{@literal @}RequestScoped</code> or
+ * <code>{@literal @}PortletStateScoped</code> bean.
+ * <p>
+ * Example:
+ * <div class='codebox'>
+ * {@literal @}Inject {@literal @}RenderParam("paramName")<br/>
+ * private String param;
+ * </div>
+ * </div>
+ *
+ * @see javax.portlet.PortletRequest#getParameter(String) getParameter
+ * @see javax.portlet.PortletRequest#getParameterValues(String) getParameterValues
+ */
+
+@Qualifier @Retention(RUNTIME) @Target({METHOD, FIELD, PARAMETER})
+public @interface RenderParam {
+
+ /**
+ * The parameter name.
+ *
+ * @return The parameter name.
+ */
+ @Nonbinding String value();
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/ResourceParam.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/ResourceParam.java b/portlet-api/src/main/java/javax/portlet/annotations/ResourceParam.java
new file mode 100644
index 0000000..5956c8a
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/ResourceParam.java
@@ -0,0 +1,77 @@
+/* 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 javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Qualifier that specifies an resource parameter for injection.
+ * The parameter will be <code>null</code> if accessed outside of a serve resource method.
+ * <p>
+ * Note that this method will only return resource parameters, not render parameters.
+ * To access render parameters within a serve resource method, use the
+ * {@link RenderParam} annotation.
+ * However, if the specified name addresses both a resource parameter and a private render
+ * parameter, the injected bean will contain both sets of values, with the
+ * render parameter entries following the resource parameter entries in the values array.
+ * <p>
+ * The type of the injection target must be <code>String</code> or <code>String[]</code>.
+ * <p>
+ * This annotation may only be used in <code>{@literal @}RequestScoped</code> or
+ * <code>{@literal @}PortletStateScoped</code> beans.
+ * <p>
+ * Example:
+ * <div class='codebox'>
+ * {@literal @}Inject {@literal @}ResourceParam("paramName")<br/>
+ * private String[] paramValues;
+ * </div>
+ * </div>
+ *
+ * @see javax.portlet.PortletRequest#getParameter(String) getParameter
+ * @see javax.portlet.PortletRequest#getParameterValues(String) getParameterValues
+ * @see javax.portlet.ResourceRequest#getPrivateRenderParameterMap() getPrivateRenderParameterMap
+ *
+ * @see RenderParam
+ */
+
+@Qualifier @Retention(RUNTIME) @Target({METHOD, FIELD, PARAMETER})
+public @interface ResourceParam {
+
+ /**
+ * The parameter name.
+ *
+ * @return The parameter name.
+ */
+ @Nonbinding String value();
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/RuntimeOption.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/RuntimeOption.java b/portlet-api/src/main/java/javax/portlet/annotations/RuntimeOption.java
new file mode 100644
index 0000000..98a8da0
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/RuntimeOption.java
@@ -0,0 +1,58 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * represent portlet container runtime option name-value pairs.
+ * It cannot be used as a stand-alone portlet annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface RuntimeOption {
+
+ /**
+ * The container runtime option name.
+ *
+ * @return The parameter name
+ */
+ String name();
+
+ /**
+ * The container runtime options value
+ *
+ * @return The parameter value
+ */
+ String value();
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/SecurityRoleRef.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/SecurityRoleRef.java b/portlet-api/src/main/java/javax/portlet/annotations/SecurityRoleRef.java
new file mode 100644
index 0000000..a371110
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/SecurityRoleRef.java
@@ -0,0 +1,61 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * represent a single security role reference.
+ * It cannot be used as a stand-alone portlet annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface SecurityRoleRef {
+
+ /**
+ * <div class='container-change'>
+ * The role name.
+ * </div>
+ *
+ * @return The role name
+ */
+ String roleName();
+
+ /**
+ * <div class='container-change'>
+ * The application role that the role name is mapped to.
+ * </div>
+ *
+ * @return The role link
+ */
+ String roleLink() default "";
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/ServeResourceMethod.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/ServeResourceMethod.java b/portlet-api/src/main/java/javax/portlet/annotations/ServeResourceMethod.java
new file mode 100644
index 0000000..af64501
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/ServeResourceMethod.java
@@ -0,0 +1,157 @@
+/* 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 static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+
+/**
+ * <div class='changed_added_3_0'>
+ * Designates a method corresponding to the portlet API serveResource method.
+ * <p>
+ * The annotated method must have one of the following signatures:
+ * <ul>
+ * <li>
+ * <code>public void <methodName>(ResourceRequest, ResourceResponse)</code>
+ * <p>
+ * This corresponds to the <code>serveResource</code> method.
+ * </li>
+ * <li>
+ * <code>public String <methodName>()</code>
+ * <p>
+ * The String returned by the method will be written to the response unchanged.
+ * </li>
+ * <li>
+ * <code>public void <methodName>()</code>
+ * <p>
+ * Intended for use when only a resource include is needed.
+ * </li>
+ * </ul>
+ * where 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.
+ * </div>
+ *
+ * @see javax.portlet.ResourceServingPortlet#serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse) ResourceServingPortlet#serveResource
+ *
+ */
+
+@Retention(RUNTIME) @Target({METHOD})
+public @interface ServeResourceMethod {
+
+ /**
+ * The portlet names for which the serve resource method applies.
+ * <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.
+ *
+ * @return The portlet names
+ */
+ String[] portletNames();
+
+ /**
+ * The resource ID.
+ * <p>
+ * If a resource ID is specified, the bean enabler will dispatch Resource requests with
+ * matching values of the resource ID to this method.
+ * <p>
+ * If this field is empty,
+ * the method will be executed for all Resource requests not dispatched
+ * to other named ResourceMethods.
+ *
+ * @return The resource ID
+ */
+ String resourceID() default "";
+
+ /**
+ * Sets the character encoding for content generated by the annotated method.
+ * The character encoding will be set before the annotated method body is executed.
+ * <p>
+ * If this field is empty, the character encoding will not be set.
+ * The portlet can then set the character encoding using the portlet API
+ * <code>ResourceResponse#setCharacterEncoding</code> method.
+ *
+ * @see javax.portlet.ResourceResponse#setCharacterEncoding(String) ResourceResponse#setCharacterEncoding
+ *
+ * @return The character encoding
+ */
+ String characterEncoding() default "UTF-8";
+
+ /**
+ * 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>ResourceResponse#setContentType</code> method.
+ *
+ * @see javax.portlet.ResourceResponse#setContentType(String) ResourceResponse#setContentType
+ *
+ * @return The content type
+ */
+ String contentType() default "text/html";
+
+ /**
+ * 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.
+ *
+ * @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 "";
+
+ /**
+ * 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.
+ *
+ * @return The ordinal number
+ */
+ int ordinal() default 0;
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7fb0624d/portlet-api/src/main/java/javax/portlet/annotations/Supports.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/annotations/Supports.java b/portlet-api/src/main/java/javax/portlet/annotations/Supports.java
new file mode 100644
index 0000000..c9c0e37
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/annotations/Supports.java
@@ -0,0 +1,74 @@
+/* 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'>
+ * This annotation is used within composite portlet configuration annotations to
+ * specify the supported portlet modes and window states for a given locale.
+ * It cannot be used as a stand-alone portlet annotation.
+ * </div>
+ */
+@Retention(RUNTIME) @Target({ANNOTATION_TYPE})
+public @interface Supports {
+
+ /**
+ * <div class='container-change'>
+ * The MIME type for the supported portlet modes and window
+ * states listed in this annotation, for example <code>"text{@literal /}html"</code>.
+ * <p>
+ * The MIME type may also contain the wildcard character '*',
+ * for example <code>"text{@literal /}*"</code> or <code>"*{@literal /}*"</code>.
+ * </div>
+ *
+ * @return The mime type
+ */
+ String mimeType() default "text/html";
+
+ /**
+ * <div class='container-change'>
+ * The names of the supported portlet modes.
+ * </div>
+ *
+ * @return The supported portlet modes
+ */
+ String[] portletModes() default "";
+
+ /**
+ * <div class='container-change'>
+ * The names of the supported window states.
+ * </div>
+ *
+ * @return The supported window states
+ */
+ String[] windowStates() default "";
+}
|