diff --git a/api/pom.xml b/api/pom.xml
index 8c9e2d80c..ce9bbd3e3 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -34,6 +34,7 @@
PortletRequest
defines the base interface to provide client
- * request information to a portlet. The portlet container uses two specialized
- * versions of this interface when invoking a portlet, ActionRequest
- * and RenderRequest
. The portlet container creates these objects and
- * passes them as arguments to the portlet's processAction
and
- * render
methods.
- *
- * @see ActionRequest
- * @see RenderRequest
- */
-public interface PortletRequest
-{
-
- /** Used to retrieve user information attributes with the
- * getAttribute
call. The user information is returned
- * as a Map
object. The portlet must define the
- * user information attribute it is interested in inside the
- * user-attribute
section of the deployment descriptor.
- * If an attribute is not supported
- * by the current runtime system it will not show up in the user
- * attribute map.
- * If the user-attribute is supported by the runtime system, but not
- * defined for a particular user, then for that user the attribute
- * exists in the returned map and the attribute has a null
value.
- *
- * If the user-attribute is not defined for the current user it - * will not show up in the Map. - *
- * The value is javax.portlet.userinfo
.
- */
- public static final String USER_INFO = "javax.portlet.userinfo";
-
- /**
- * Used to retrieve an instance of the javax.ccpp.Profile
- * with the getAttribute
call. The returned profile is based
- * on the current portlet request and may contain additional CC/PP
- * information set by the portal / portlet container.
- *
- * The value is javax.portlet.ccpp
.
- *
- * @since 2.0
- */
- public static final String CCPP_PROFILE = "javax.portlet.ccpp";
-
- /**
- * String identifier for Basic authentication. Value "BASIC".
- */
- public static final String BASIC_AUTH = "BASIC";
-
- /**
- * String identifier for Form based authentication. Value "FORM".
- */
- public static final String FORM_AUTH = "FORM";
-
- /**
- * String identifier for Certification based authentication. Value "CLIENT_CERT".
- */
- public static final String CLIENT_CERT_AUTH = "CLIENT_CERT";
-
- /**
- * String identifier for Digest based authentication. Value "DIGEST".
- */
- public static final String DIGEST_AUTH = "DIGEST";
-
- /**
- * P3P user information constants.
- *
- * Note: these are only available in the Java SE 5.0 supported version
- * of the API.
- *
- * @since 2.0
- */
- public enum P3PUserInfos {
- USER_BDATE_YMD_YEAR("user.bdate.ymd.year"), USER_BDATE_YMD_MONTH("user.bdate.ymd.month"),
- USER_BDATE_YMD_DAY("user.bdate.ymd.day"), USER_BDATE_HMS_HOUR("user.bdate.hms.hour"),
- USER_BDATE_HMS_MINUTE("user.bdate.hms.minute"), USER_BDATE_HMS_SECOND("user.bdate.hms.second"),
- USER_BDATE_FRACTIONSECOND("user.bdate.fractionsecond"), USER_BDATE_TIMEZONE("user.bdate.timezone"),
- USER_GENDER("user.gender"), USER_EMPLOYER("user.employer"),
- USER_DEPARTMENT("user.department"), USER_JOBTITLE("user.jobtitle"),
- USER_NAME_PREFIX("user.name.prefix"), USER_NAME_GIVEN("user.name.given"),
- USER_NAME_FAMILY("user.name.family"), USER_NAME_MIDDLE("user.name.middle"),
- USER_NAME_SUFFIX("user.name.suffix"), USER_NAME_NICKNAME("user.name.nickName"),
- USER_LOGIN_ID("user.login.id"),
- USER_HOMEINFO_POSTAL_NAME("user.home-info.postal.name"),
- USER_HOMEINFO_POSTAL_STREET("user.home-info.postal.street"),
- USER_HOMEINFO_POSTAL_CITY("user.home-info.postal.city"),
- USER_HOMEINFO_POSTAL_STATEPROV("user.home-info.postal.stateprov"),
- USER_HOMEINFO_POSTAL_POSTALCODE("user.home-info.postal.postalcode"),
- USER_HOMEINFO_POSTAL_COUNTRY("user.home-info.postal.country"),
- USER_HOMEINFO_POSTAL_ORGANIZATION("user.home-info.postal.organization"),
- USER_HOMEINFO_TELECOM_TELEPHONE_INTCODE("user.home-info.telecom.telephone.intcode"),
- USER_HOMEINFO_TELECOM_TELEPHONE_LOCCODE("user.home-info.telecom.telephone.loccode"),
- USER_HOMEINFO_TELECOM_TELEPHONE_NUMBER("user.home-info.telecom.telephone.number"),
- USER_HOMEINFO_TELECOM_TELEPHONE_EXT("user.home-info.telecom.telephone.ext"),
- USER_HOMEINFO_TELECOM_TELEPHONE_COMMENT("user.home-info.telecom.telephone.comment"),
- USER_HOMEINFO_TELECOM_FAX_INTCODE("user.home-info.telecom.fax.intcode"),
- USER_HOMEINFO_TELECOM_FAX_LOCCODE("user.home-info.telecom.fax.loccode"),
- USER_HOMEINFO_TELECOM_FAX_NUMBER("user.home-info.telecom.fax.number"),
- USER_HOMEINFO_TELECOM_FAX_EXT("user.home-info.telecom.fax.ext"),
- USER_HOMEINFO_TELECOM_FAX_COMMENT("user.home-info.telecom.fax.comment"),
- USER_HOMEINFO_TELECOM_MOBILE_INTCODE("user.home-info.telecom.mobile.intcode"),
- USER_HOMEINFO_TELECOM_MOBILE_LOCCODE("user.home-info.telecom.mobile.loccode"),
- USER_HOMEINFO_TELECOM_MOBILE_NUMBER("user.home-info.telecom.mobile.number"),
- USER_HOMEINFO_TELECOM_MOBILE_EXT("user.home-info.telecom.mobile.ext"),
- USER_HOMEINFO_TELECOM_MOBILE_COMMENT("user.home-info.telecom.mobile.comment"),
- USER_HOMEINFO_TELECOM_PAGER_INTCODE("user.home-info.telecom.pager.intcode"),
- USER_HOMEINFO_TELECOM_PAGER_LOCCODE("user.home-info.telecom.pager.loccode"),
- USER_HOMEINFO_TELECOM_PAGER_NUMBER("user.home-info.telecom.pager.number"),
- USER_HOMEINFO_TELECOM_PAGER_EXT("user.home-info.telecom.pager.ext"),
- USER_HOMEINFO_TELECOM_PAGER_COMMENT("user.home-info.telecom.pager.comment"),
- USER_HOMEINFO_ONLINE_EMAIL("user.home-info.online.email"),
- USER_HOMEINFO_ONLINE_URI("user.home-info.online.uri"),
- USER_BUSINESSINFO_POSTAL_NAME("user.business-info.postal.name"),
- USER_BUSINESSINFO_POSTAL_STREET("user.business-info.postal.street"),
- USER_BUSINESSINFO_POSTAL_CITY("user.business-info.postal.city"),
- USER_BUSINESSINFO_POSTAL_STATEPROV("user.business-info.postal.stateprov"),
- USER_BUSINESSINFO_POSTAL_POSTALCODE("user.business-info.postal.postalcode"),
- USER_BUSINESSINFO_POSTAL_COUNTRY("user.business-info.postal.country"),
- USER_BUSINESSINFO_POSTAL_ORGANIZATION("user.business-info.postal.organization"),
- USER_BUSINESSINFO_TELECOM_TELEPHONE_INTCODE("user.business-info.telecom.telephone.intcode"),
- USER_BUSINESSINFO_TELECOM_TELEPHONE_LOCCODE("user.business-info.telecom.telephone.loccode"),
- USER_BUSINESSINFO_TELECOM_TELEPHONE_NUMBER("user.business-info.telecom.telephone.number"),
- USER_BUSINESSINFO_TELECOM_TELEPHONE_EXT("user.business-info.telecom.telephone.ext"),
- USER_BUSINESSINFO_TELECOM_TELEPHONE_COMMENT("user.business-info.telecom.telephone.comment"),
- USER_BUSINESSINFO_TELECOM_FAX_INTCODE("user.business-info.telecom.fax.intcode"),
- USER_BUSINESSINFO_TELECOM_FAX_LOCCODE("user.business-info.telecom.fax.loccode"),
- USER_BUSINESSINFO_TELECOM_FAX_NUMBER("user.business-info.telecom.fax.number"),
- USER_BUSINESSINFO_TELECOM_FAX_EXT("user.business-info.telecom.fax.ext"),
- USER_BUSINESSINFO_TELECOM_FAX_COMMENT("user.business-info.telecom.fax.comment"),
- USER_BUSINESSINFO_TELECOM_MOBILE_INTCODE("user.business-info.telecom.mobile.intcode"),
- USER_BUSINESSINFO_TELECOM_MOBILE_LOCCODE("user.business-info.telecom.mobile.loccode"),
- USER_BUSINESSINFO_TELECOM_MOBILE_NUMBER("user.business-info.telecom.mobile.number"),
- USER_BUSINESSINFO_TELECOM_MOBILE_EXT("user.business-info.telecom.mobile.ext"),
- USER_BUSINESSINFO_TELECOM_MOBILE_COMMENT("user.business-info.telecom.mobile.comment"),
- USER_BUSINESSINFO_TELECOM_PAGER_INTCODE("user.business-info.telecom.pager.intcode"),
- USER_BUSINESSINFO_TELECOM_PAGER_LOCCODE("user.business-info.telecom.pager.loccode"),
- USER_BUSINESSINFO_TELECOM_PAGER_NUMBER("user.business-info.telecom.pager.number"),
- USER_BUSINESSINFO_TELECOM_PAGER_EXT("user.business-info.telecom.pager.ext"),
- USER_BUSINESSINFO_TELECOM_PAGER_COMMENT("user.business-info.telecom.pager.comment"),
- USER_BUSINESSINFO_ONLINE_EMAIL("user.business-info.online.email"),
- USER_BUSINESSINFO_ONLINE_URI("user.business-info.online.uri");
- P3PUserInfos(String value) {this.value = value; }
- private final String value;
- public String toString() {return value;}
- }
-
- /**
- * String identifier for the portlet action lifecycle phase. In this
- * phase the portlet request and response are from type
- * ActionRequest
and ActionResponse
.
- *
- * The value of the constant is ACTION_PHASE
.
- *
- * @since 2.0
- */
- public static final String ACTION_PHASE = "ACTION_PHASE";
-
- /**
- * String identifier for the portlet event lifecycle phase. In this
- * phase the portlet request and response are from type
- * EventRequest
and EventResponse
.
- *
- * The value of the constant is EVENT_PHASE
.
- *
- * @since 2.0
- */
- public static final String EVENT_PHASE = "EVENT_PHASE";
-
- /**
- * String identifier for the portlet render lifecycle phase. In this
- * phase the portlet request and response are from type
- * RenderRequest
and RenderResponse
.
- *
- * The value of the constant is RENDER_PHASE
.
- *
- * @since 2.0
- */
- public static final String RENDER_PHASE = "RENDER_PHASE";
-
- /**
- * String identifier for the portlet resource serving lifecycle phase. In this
- * phase the portlet request and response are from type
- * ResourceRequest
and ResourceResponse
.
- *
- * The value of the constant is RESOURCE_PHASE
.
- *
- * @since 2.0
- */
- public static final String RESOURCE_PHASE = "RESOURCE_PHASE";
-
- /**
- * Provides the portlet lifecycle phase of the current request
- * as request attribute.
- *
- * Valid values are: ACTION_PHASE, EVENT_PHASE, RENDER_PHASE, - * RESOURCE_SERVING_PHASE. - *
- * The value of the constant is javax.portlet.lifecylce_phase
.
- *
- * @since 2.0
- */
- public static final String LIFECYCLE_PHASE = "javax.portlet.lifecycle_phase";
-
-
- /**
- * The RENDER_PART portlet request attribute is set by portals
- * that are streaming based and therefore need to split the
- * render phase into two parts: first the RENDER_HEADERS part
- * where the portlet should only set the header related data
- * and the portlet title, and second the RENDER_MARKUP part
- * in which the portlet should produce its markup.
- *
- * Non-streaming portals will not set this attribute and thus - * the portlet should set headers, portlet title and produce - * its markup in a single render request. - *
- * The value of the constant is javax.portlet.render_part
.
- *
- * @since 2.0
- */
- public static final String RENDER_PART = "javax.portlet.render_part";
-
- /**
- * The RENDER_HEADERS is a possible value of the RENDER_PART
- * request attribute and denotes that the portlet should set
- * the intended headers and the portlet title of this render
- * request.
- *
- * The value of the constant is RENDER_HEADERS
.
- *
- * @since 2.0
- */
- public static final String RENDER_HEADERS = "RENDER_HEADERS";
-
- /**
- * The RENDER_MARKUP is a possible value of the RENDER_PART
- * request attribute and denotes that the portlet should
- * produce its markup for this render request.
- *
- * The value of the constant is RENDER_MARKUP
.
- *
- * @since 2.0
- */
- public static final String RENDER_MARKUP = "RENDER_MARKUP";
-
- /**
- * The action scope ID that the portlet container uses
- * for storing the current action scope as render parameter
- * if the javax.portlet.actionScopedRequestAttributes
- * container runtime option is used by the portlet.
- *
- * The value is javax.portlet.as
.
- * @since 2.0
- */
- public static final String ACTION_SCOPE_ID = "javax.portlet.as";
-
-
- /**
- * Returns true, if the given window state is valid
- * to be set for this portlet in the context
- * of the current request.
- *
- * @param state window state to checked
- *
- * @return true, if it is valid for this portlet
- * in this request to change to the
- * given window state
- *
- */
- public boolean isWindowStateAllowed(WindowState state);
-
-
-/**
- * Returns true, if the given portlet mode is a valid
- * one to set for this portlet in the context
- * of the current request.
- *
- * @param mode portlet mode to check
- *
- * @return true, if it is valid for this portlet
- * in this request to change to the
- * given portlet mode
- *
- */
-
- public boolean isPortletModeAllowed(PortletMode mode);
-
-
- /**
- * Returns the current portlet mode of the portlet.
- *
- * @return the portlet mode
- */
-
- public PortletMode getPortletMode ();
-
-
- /**
- * Returns the current window state of the portlet.
- *
- * @return the window state
- */
-
- public WindowState getWindowState ();
-
-
- /**
- * Returns the preferences object associated with the portlet.
- *
- * @return the portlet preferences
- */
- public PortletPreferences getPreferences ();
-
-
- /**
- * Returns the current portlet session or, if there is no current session,
- * creates one and returns the new session.
- *
- * Creating a new portlet session will result in creating
- * a new HttpSession
on which the portlet session is based on.
- *
- * @return the portlet session
- */
-
- public PortletSession getPortletSession ();
-
-
- /**
- * Returns the current portlet session or, if there is no current session
- * and the given flag is true
, creates one and returns
- * the new session.
- *
- * If the given flag is false
and there is no current
- * portlet session, this method returns null
.
- *
- * Creating a new portlet session will result in creating
- * a new HttpSession
on which the portlet session is based on.
- *
- * @param create
- * true
to create a new session,
- * false
to return null
if there
- * is no current session
- * @return the portlet session
- *
- */
-
- public PortletSession getPortletSession (boolean create);
-
-
- /**
- * Returns the value of the specified request property
- * as a String
. If the request did not include a property
- * of the specified name, this method returns null
.
- *
- * A portlet can access portal/portlet-container specific properties - * through this method and, if available, the - * headers of the HTTP client request. - *
- * This method should only be used if the - * property has only one value. If the property might have - * more than one value, use {@link #getProperties}. - *
- * If this method is used with a multivalued
- * parameter, the value returned is equal to the first value
- * in the Enumeration returned by getProperties
.
- *
- * @param name a String
specifying the
- * property name
- *
- * @return a String
containing the
- * value of the requested
- * property, or null
- * if the request does not
- * have a property of that name.
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- */
-
- public String getProperty(String name);
-
-
- /**
- * Returns all the values of the specified request property
- * as a Enumeration
of String
objects.
- *
- * If the request did not include any properties
- * of the specified name, this method returns an empty
- *
- * To encode a URL the {@link PortletResponse#encodeURL} method must be used.
- *
- * @return a
- * Attribute names should follow the same conventions as package
- * names. This specification reserves names matching
- * In a distributed portlet web application the
- * Only parameters targeted to the current portlet are accessible.
- *
- * This method should only be used if the
- * parameter has only one value. If the parameter might have
- * more than one value, use {@link #getParameterValues}.
- *
- * If this method is used with a multivalued
- * parameter, the value returned is equal to the first value
- * in the array returned by
- * Only parameters targeted to the current portlet are returned.
- *
- *
- * @return an
- * If the parameter has a single value, the array has a length
- * of 1.
- *
- *
- * @param name a
- * The values in the returned
- * If no parameters exist this method returns an empty Attribute names should follow the same conventions as
- * package names. Names beginning with Attribute names should follow the same conventions as
- * package names. Names beginning with
- * The following restrictions apply:
- *
- * The following restrictions apply:
- *
- * This ID is the same that is used by the portlet container for
- * scoping the portlet-scope session attributes.
- *
- * @since 2.0
- * @return the portlet window ID
- */
- public String getWindowID();
-
-
- /**
- * Returns an array containing all of the Cookie properties.
- *
- * This method returns
- * The values in the returned
- * If no private parameters exist this method returns an empty
- * The values in the returned
- * If no public parameters exist this method returns an empty
- * This method allows response properties to have multiple values.
- *
- * Response properties can be viewed as header values set for the portal application.
- * If these header values are intended to be transmitted to the client they should be
- * set before the response is committed.
- *
- * @param key
- * the key of the property to be returned to the portal
- * @param value
- * the value of the property to be returned to the portal
- *
- * @exception java.lang.IllegalArgumentException
- * if key is
- * Response properties can be viewed as header values set for the portal application.
- * If these header values are intended to be transmitted to the client they should be
- * set before the response is committed.
- *
- * This method resets all properties previously added with the same key.
- *
- * @param key
- * the key of the property to be returned to the portal
- * @param value
- * the value of the property to be returned to the portal
- *
- * @exception java.lang.IllegalArgumentException
- * if key is
- * Portlets should encode all resource URLs pointing to resources in the
- * portlet application via this method in order to ensure that they get
- * served via the portal application.
- *
- * Some portal/portlet-container implementation may require those URLs to
- * contain implementation specific data encoded in it. Because of that,
- * portlets should use this method to create such URLs.
- *
- * The
- * Portlet developer should be aware that the returned URL might not be a well formed
- * URL but a special token at the time the portlet is generating its content.
- * Thus portlets should not add additional parameters on the resulting URL or
- * expect to be able to parse the URL. As a result, the outcome of the encodeURL
- * call may be different than calling encodeURL in the servlet world.
- *
- * @param path
- * the URI path to the resource. This must be either an absolute
- * URL (e.g.
- *
- * The namespace value must be constant for the lifetime of the portlet
- * window.
- *
- * @return the namespace
- */
-
- public String getNamespace();
-
- /**
- * Adds a HTTP Cookie property to the response.
- * This method allows response properties to have multiple cookies.
- *
- *
- * @param cookie the cookie to be added to the response
- *
- * @exception java.lang.IllegalArgumentException
- * if cookie is
- * If a DOM element with the provided key already exists
- * the provided element will be stored in addition to the
- * existing element under the same key.
- *
- * If the element is
- * Response XML DOM element properties can be viewed as
- * additional response document sections
- * set for the portal application.
- * If these header values are intended to be transmitted to the client they should be
- * set before the response is committed.
- *
- * @param key
- * the key of the property to be returned to the portal
- * @param element
- * the XML DOM element to be added to the response
- *
- * @exception java.lang.IllegalArgumentException
- * if key is Enumeration
.
- * The property name is case insensitive. You can use
- * this method with any request property.
- *
- * @param name a String
specifying the
- * property name
- *
- * @return a Enumeration
containing
- * the values of the requested property. If
- * the request does not have any properties of
- * that name return an empty Enumeration
.
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- */
-
- public java.util.EnumerationEnumeration
of all the property names
- * this request contains. If the request has no
- * properties, this method returns an empty Enumeration
.
- *
- *
- * @return an Enumeration
of all the
- * property names sent with this
- * request; if the request has
- * no properties, an empty Enumeration
.
- */
-
- public java.util.EnumerationBASIC_AUTH
, CLIENT_CERT_AUTH
,
- * a custom one or null
if there was no authentication.
- *
- * @return one of the static members BASIC_AUTH
,
- * FORM_AUTH
, CLIENT_CERT_AUTH
,
- * DIGEST_AUTH
(suitable for == comparison)
- * indicating the authentication scheme,
- * a custom one, or
- * null
if the request was
- * not authenticated.
- */
-
- public java.lang.String getAuthType();
-
-
- /**
- * Returns the context path which is the path prefix associated with the deployed
- * portlet application. If the portlet application is rooted at the
- * base of the web server URL namespace (also known as "default" context),
- * this path must be an empty string. Otherwise, it must be the path the
- * portlet application is rooted to, the path must start with a '/' and
- * it must not end with a '/' character.
- * String
specifying the
- * portion of the request URL that indicates the context
- * of the request
- *
- * @see PortletResponse#encodeURL
- */
-
- public String getContextPath();
-
-
- /**
- * Returns the login of the user making this request, if the user
- * has been authenticated, or null if the user has not been authenticated.
- *
- * @return a String
specifying the login
- * of the user making this request, or null
- * if the user login is not known.
- *
- */
-
- public java.lang.String getRemoteUser();
-
-
- /**
- * Returns a java.security.Principal object containing the name of the
- * current authenticated user.
- *
- * @return a java.security.Principal
containing
- * the name of the user making this request, or
- * null
if the user has not been
- * authenticated.
- */
-
- public java.security.Principal getUserPrincipal();
-
-
- /**
- * Returns a boolean indicating whether the authenticated user is
- * included in the specified logical "role". Roles and role membership can be
- * defined using deployment descriptors. If the user has not been
- * authenticated, the method returns false
.
- *
- * @param role a String
specifying the name
- * of the role
- *
- * @return a boolean
indicating whether
- * the user making this request belongs to a given role;
- * false
if the user has not been
- * authenticated.
- */
-
- public boolean isUserInRole(java.lang.String role);
-
-
- /**
- *
- * Returns the value of the named attribute as an Object
,
- * or null
if no attribute of the given name exists.
- * java.*
,
- * and javax.*
.
- * Object
- * needs to be serializable.
- *
- * @param name a String
specifying the name of
- * the attribute
- *
- * @return an Object
containing the value
- * of the attribute, or null
if
- * the attribute does not exist.
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- *
- */
-
- public Object getAttribute(String name);
-
-
- /**
- * Returns an Enumeration
containing the
- * names of the attributes available to this request.
- * This method returns an empty Enumeration
- * if the request has no attributes available to it.
- *
- *
- * @return an Enumeration
of strings
- * containing the names
- * of the request attributes, or an empty
- * Enumeration
if the request
- * has no attributes available to it.
- */
-
- public java.util.EnumerationString
,
- * or null
if the parameter does not exist. Request parameters
- * are extra information sent with the request. The returned parameter
- * are "x-www-form-urlencoded" decoded.
- * getParameterValues
.
- *
- *
- *
- * @param name a String
specifying the
- * name of the parameter
- *
- * @return a String
representing the
- * single value of the parameter
- *
- * @see #getParameterValues
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- *
- */
-
- public String getParameter(String name);
-
-
- /**
- *
- * Returns an Enumeration
of String
- * objects containing the names of the parameters contained
- * in this request. If the request has
- * no parameters, the method returns an
- * empty Enumeration
.
- * Enumeration
of String
- * objects, each String
containing
- * the name of a request parameter; or an
- * empty Enumeration
if the
- * request has no parameters.
- */
-
- public java.util.EnumerationString
objects containing
- * all of the values the given request parameter has, or
- * null
if the parameter does not exist.
- * The returned parameters are "x-www-form-urlencoded" decoded.
- * String
containing the name of
- * the parameter the value of which is requested
- *
- * @return an array of String
objects
- * containing the parameter values.
- *
- * @see #getParameter
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- *
- */
-
- public String[] getParameterValues(String name);
-
-
- /**
- * Returns a Map
of the parameters of this request.
- * Request parameters are extra information sent with the request.
- * The returned parameters are "x-www-form-urlencoded" decoded.
- * Map
are from type
- * String array (String[]
).
- * Map
.
- *
- * @return an immutable Map
containing parameter names as
- * keys and parameter values as map values, or an empty Map
- * if no parameters exist. The keys in the parameter
- * map are of type String. The values in the parameter map are of type
- * String array (String[]
).
- */
-
- public java.util.Mapjava.*
,
- * javax.*
, and com.sun.*
are
- * reserved.
- *
If the value passed into this method is null
,
- * the effect is the same as calling {@link #removeAttribute}.
- *
- *
- * @param name a String
specifying
- * the name of the attribute
- *
- * @param o the Object
to be stored
- *
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- */
-
- public void setAttribute(String name, Object o);
-
-
- /**
- *
- * Removes an attribute from this request. This method is not
- * generally needed, as attributes only persist as long as the request
- * is being handled.
- *
- * java.*
,
- * javax.*
, and com.sun.*
are
- * reserved.
- *
- * @param name a String
specifying
- * the name of the attribute to be removed
- *
- *
- * @exception java.lang.IllegalArgumentException
- * if name is null
.
- */
-
- public void removeAttribute(String name);
-
-
- /**
- *
- * Returns the session ID indicated in the client request.
- * This session ID may not be a valid one, it may be an old
- * one that has expired or has been invalidated.
- * If the client request
- * did not specify a session ID, this method returns
- * null
.
- *
- * @return a String
specifying the session
- * ID, or null
if the request did
- * not specify a session ID
- *
- * @see #isRequestedSessionIdValid
- *
- */
-
- public String getRequestedSessionId();
-
-
- /**
- *
- * Checks whether the requested session ID is still valid.
- *
- * @return true
if this
- * request has an id for a valid session
- * in the current session context;
- * false
otherwise
- *
- * @see #getRequestedSessionId
- * @see #getPortletSession
- */
-
- public boolean isRequestedSessionIdValid();
-
-
- /**
- * Returns the portal preferred content type for the response.
- *
- *
- *
- * @return preferred MIME type of the response
- */
-
- public String getResponseContentType();
-
-
- /**
- * Gets a list of content types which the portal accepts for the response.
- * This list is ordered with the most preferable types listed first.
- * '*'
or '* / *'
as supported content
- * types, these may also be valid return values.
- *
- *
- * @return ordered list of MIME types for the response
- */
-
- public java.util.Enumeration'*'
or '* / *'
as supported content
- * types, these may also be valid return values.http
, https
, or ftp
.
- * Different schemes have different rules for constructing URLs,
- * as noted in RFC 1738.
- *
- * @return a String
containing the name
- * of the scheme used to make this request
- */
-
- public String getScheme();
-
-
- /**
- * Returns the host name of the server that received the request.
- *
- * @return a String
containing the name
- * of the server to which the request was sent
- */
-
- public String getServerName();
-
-
- /**
- * Returns the port number on which this request was received.
- *
- * @return an integer specifying the port number
- */
-
- public int getServerPort();
-
- /**
- * Returns the portlet window ID. The portlet window ID is
- * unique for this portlet window and is constant for the lifetime
- * of the portlet window.
- * null
if no cookies exist.
- *
- * @since 2.0
- * @return array of cookie properties, or
- * null
if no cookies exist.
- * @see MimeResponse#addProperty(Cookie)
- */
- public Cookie[] getCookies();
-
- /**
- * Returns a Map
of the private parameters of this request.
- * Private parameters are not shared with other portlets or components.
- * The returned parameters are "x-www-form-urlencoded" decoded.
- * Map
are from type
- * String array (String[]
).
- * Map
.
- *
- * @since 2.0
- * @return an immutable Map
containing private parameter names as
- * keys and private parameter values as map values, or an empty Map
- * if no private parameters exist. The keys in the parameter
- * map are of type String. The values in the parameter map are of type
- * String array (String[]
).
- */
- public java.util.MapMap
of the public parameters of this request.
- * Public parameters may be shared with other portlets or components and
- * defined in the portlet deployment descriptor with the
- * supported-public-render-parameter
element.
- * The returned parameters are "x-www-form-urlencoded" decoded.
- * Map
are from type
- * String array (String[]
).
- * Map
.
- *
- * @since 2.0
- * @return an immutable Map
containing public parameter names as
- * keys and public parameter values as map values, or an empty Map
- * if no public parameters exist. The keys in the parameter
- * map are of type String. The values in the parameter map are of type
- * String array (String[]
).
- */
- public java.util.MapPortletResponse
defines the base interface to assist a
- * portlet in creating and sending a response to the client. The portlet
- * container uses specialized versions of this interface when invoking a
- * portlet.
- * The portlet container creates these objects and passes them as arguments to
- * the portlet's processAction, processEvent, serveResource
and render
methods.
- *
- * @see ActionResponse
- * @see RenderResponse
- * @see EventResponse
- * @see ResourceResponse
- */
-public interface PortletResponse {
-
-
- /**
- * Adds a String property to an existing key to be returned to the portal.
- * If there are no property values already associated with the key,
- * a new key is created.
- * null
.
- */
-
- public void addProperty(String key, String value);
-
-
- /**
- * Sets a String property to be returned to the portal.
- * null
.
- */
-
- public void setProperty(String key, String value);
-
- /**
- * Returns the encoded URL of the resource, like servlets, JSPs, images and
- * other static files, at the given path.
- * encodeURL
method may include the session ID and other
- * portal/portlet-container specific information into the URL. If encoding
- * is not needed, it returns the URL unchanged.
- * http://my.co/myportal/mywebap/myfolder/myresource.gif
)
- * or a full path URI (e.g.
- * /myportal/mywebap/myfolder/myresource.gif
).
- *
- * @exception java.lang.IllegalArgumentException
- * if path doesn't have a leading slash or is not an absolute
- * URL
- *
- * @return the encoded resource URL as string, may not be a valid URL
- */
-
- public String encodeURL(String path);
-
- /**
- * The value returned by this method should be prefixed or appended to
- * elements, such as JavaScript variables or function names, to ensure they
- * are unique in the context of the portal page.
- *
- * The portlet should note that the cookie may not make
- * it to the client, but may be stored at the portal.
- * null
.
- * @since 2.0
- */
-
- public void addProperty(Cookie cookie);
-
- /**
- * Adds an XML DOM element property to the response.
- * null
the key is removed from
- * the response.
- * null
.
- * @since 2.0
- */
- void addProperty(String key, org.w3c.dom.Element element);
-
- /**
- * Creates an element of the type specified to be used in the
- * {@link #addProperty(String,Element)} method.
- *
- * @param tagName name of the element type to instantiate
- * @return A new Element object with the nodeName attribute set to tagName,
- * and localName, prefix, and namespaceURI set to null.
- * @throws org.w3c.dom.DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name
- * contains an illegal character.
- */
- org.w3c.dom.Element createElement(String tagName) throws org.w3c.dom.DOMException;
-
-
-}
diff --git a/api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java b/api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
deleted file mode 100644
index 08c6d9b9e..000000000
--- a/api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
+++ /dev/null
@@ -1,400 +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.
- */
-/*
- * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
- * implementations. This file may change or vanish in the final version of the JSR 286 specification.
- */
-/*
- * 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!
- */
-/*
- * Copyright 2006 IBM Corporation.
- *
- */
-package javax.portlet.filter;
-
-import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.portlet.PortalContext;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletPreferences;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletSession;
-import javax.portlet.WindowState;
-
-import jakarta.servlet.http.Cookie;
-
-/**
- * The PortletRequestWrapper
provides a convenient
- * implementation of the PortletRequest
interface
- * and is extended by other request wrappers.
- * This class implements the Wrapper or Decorator pattern.
- * Methods default to calling through to the wrapped request object.
- *
- * @since 2.0
- * @see PortletRequest
- */
-public class PortletRequestWrapper implements PortletRequest {
-
- PortletRequest request;
-
- /**
- * Creates an PortletRequest
adaptor
- * wrapping the given request object.
- *
- * @param request the portlet request to wrap
- * @throws java.lang.IllegalArgumentException if the request is null
- */
- public PortletRequestWrapper(PortletRequest request) {
- if ( request == null)
- throw new java.lang.IllegalArgumentException("Request is null");
-
- this.request = request;
- }
-
- /**
- * The default behavior of this method is to call
- * getAttribute(String name)
on the wrapped request object.
- */
- public Object getAttribute(String name) {
- return request.getAttribute(name);
- }
-
- /**
- * The default behavior of this method is to call
- * getAttributeNames()
on the wrapped request object.
- */
- public EnumerationgetAuthType()
on the wrapped request object.
- */
- public String getAuthType() {
- return request.getAuthType();
- }
-
- /**
- * The default behavior of this method is to call
- * getContextPath()
on the wrapped request object.
- */
- public String getContextPath() {
- return request.getContextPath();
- }
-
- /**
- * The default behavior of this method is to call
- * getLocale()
on the wrapped request object.
- */
- public Locale getLocale() {
- return request.getLocale();
- }
-
- /**
- * The default behavior of this method is to call
- * getLocales()
on the wrapped request object.
- */
- public EnumerationgetParameter(String name)
on the wrapped request object.
- */
- public String getParameter(String name) {
- return request.getParameter(name);
- }
-
- /**
- * The default behavior of this method is to call
- * getParameterMap()
on the wrapped request object.
- */
- public MapgetParameterNames()
on the wrapped request object.
- */
- public EnumerationgetParameterValues(name)
on the wrapped request object.
- */
- public String[] getParameterValues(String name) {
- return request.getParameterValues(name);
- }
-
- /**
- * The default behavior of this method is to call
- * getPortalContext()
on the wrapped request object.
- */
- public PortalContext getPortalContext() {
- return request.getPortalContext();
- }
-
- /**
- * The default behavior of this method is to call
- * getPortletMode()
on the wrapped request object.
- */
- public PortletMode getPortletMode() {
- return request.getPortletMode();
- }
-
- /**
- * The default behavior of this method is to call
- * getPortletSession()
on the wrapped request object.
- */
- public PortletSession getPortletSession() {
- return request.getPortletSession();
- }
-
- /**
- * The default behavior of this method is to call
- * getPortletSession(create)
on the wrapped request object.
- */
- public PortletSession getPortletSession(boolean create) {
- return request.getPortletSession(create);
- }
-
- /**
- * The default behavior of this method is to call
- * getPreferences()
on the wrapped request object.
- */
- public PortletPreferences getPreferences() {
- return request.getPreferences();
- }
-
- /**
- * The default behavior of this method is to call
- * getProperteis(name)
on the wrapped request object.
- */
- public EnumerationgetProperty(name)
on the wrapped request object.
- */
- public String getProperty(String name) {
- return request.getProperty(name);
- }
-
- /**
- * The default behavior of this method is to call
- * getPropertyNames()
on the wrapped request object.
- */
- public EnumerationgetRemoteUser()
on the wrapped request object.
- */
- public String getRemoteUser() {
- return request.getRemoteUser();
- }
-
- /**
- * The default behavior of this method is to call
- * getRequestedSessionId()
on the wrapped request object.
- */
- public String getRequestedSessionId() {
- return request.getRequestedSessionId();
- }
-
- /**
- * The default behavior of this method is to call
- * getResponseContentType()
on the wrapped request object.
- */
- public String getResponseContentType() {
- return request.getResponseContentType();
- }
-
- /**
- * The default behavior of this method is to call
- * getResponseContentTypes()
on the wrapped request object.
- */
- public EnumerationgetScheme()
on the wrapped request object.
- */
- public String getScheme() {
- return request.getScheme();
- }
-
- /**
- * The default behavior of this method is to call
- * getServerName()
on the wrapped request object.
- */
- public String getServerName() {
- return request.getServerName();
- }
-
- /**
- * The default behavior of this method is to call
- * getServerPort()
on the wrapped request object.
- */
- public int getServerPort() {
- return request.getServerPort();
- }
-
- /**
- * The default behavior of this method is to call
- * getUserPrincipal()
on the wrapped request object.
- */
- public Principal getUserPrincipal() {
- return request.getUserPrincipal();
- }
-
- /**
- * The default behavior of this method is to call
- * getWindowId()
on the wrapped request object.
- */
- public String getWindowID() {
- return request.getWindowID();
- }
-
- /**
- * The default behavior of this method is to call
- * getWindowState()
on the wrapped request object.
- */
- public WindowState getWindowState() {
- return request.getWindowState();
- }
-
- /**
- * The default behavior of this method is to call
- * isPortletModeAllowed(mode)
on the wrapped request object.
- */
- public boolean isPortletModeAllowed(PortletMode mode) {
- return request.isPortletModeAllowed(mode);
- }
-
- /**
- * The default behavior of this method is to call
- * isRequestedSessionIdValid()
on the wrapped request object.
- */
- public boolean isRequestedSessionIdValid() {
- return request.isRequestedSessionIdValid();
- }
-
- /**
- * The default behavior of this method is to call
- * isSecure()
on the wrapped request object.
- */
- public boolean isSecure() {
- return request.isSecure();
- }
-
- /**
- * The default behavior of this method is to call
- * isUserInRole(role)
on the wrapped request object.
- */
- public boolean isUserInRole(String role) {
- return request.isUserInRole(role);
- }
-
- /**
- * The default behavior of this method is to call
- * isWindowStateAllowed(state)
on the wrapped request object.
- */
- public boolean isWindowStateAllowed(WindowState state) {
- return request.isWindowStateAllowed(state);
- }
-
- /**
- * The default behavior of this method is to call
- * removeAttribute(name)
on the wrapped request object.
- */
- public void removeAttribute(String name) {
- request.removeAttribute(name);
- }
-
- /**
- * The default behavior of this method is to call
- * setAttribute(name, o)
on the wrapped request object.
- */
- public void setAttribute(String name, Object o) {
- request.setAttribute(name, o);
- }
-
- /**
- * Return the wrapped request object.
- *
- * @return the wrapped request
- */
- public PortletRequest getRequest() {
- return request;
- }
-
- /**
- * Sets the request object being wrapped.
- *
- * @param request the request to set
- * @throws java.lang.IllegalArgumentException if the request is null.
- */
- public void setRequest(PortletRequest request) {
- if ( request == null)
- throw new java.lang.IllegalArgumentException("Request is null");
-
- this.request = request;
- }
-
- /**
- * The default behavior of this method is to call
- * getCookies()
on the wrapped request object.
- */
- public Cookie[] getCookies() {
- return request.getCookies();
- }
-
- /**
- * The default behavior of this method is to call
- * getPrivateParameterMap()
on the wrapped request object.
- */
- public MapgetPublicParameterMap()
on the wrapped request object.
- */
- public MapPortletResponseWrapper
provides a convenient
- * implementation of the PortletResponse
interface
- * and is extended by other response wrappers.
- * This class implements the Wrapper or Decorator pattern.
- * Methods default to calling through to the wrapped response object.
- *
- * @since 2.0
- * @see PortletResponse
- */
-public class PortletResponseWrapper implements PortletResponse {
-
- PortletResponse response;
-
- /**
- * Creates an ActionResponse
adaptor
- * wrapping the given response object.
- *
- * @param response the action response to wrap
- * @throws java.lang.IllegalArgumentException if the response is null
- */
- public PortletResponseWrapper(PortletResponse response) {
- if ( response == null)
- throw new java.lang.IllegalArgumentException("Response is null");
-
- this.response = response;
- }
-
- /**
- * The default behavior of this method is to call
- * addProperty(key, value)
on the wrapped response object.
- */
- public void addProperty(String key, String value) {
- response.addProperty(key, value);
- }
-
- /**
- * The default behavior of this method is to call
- * encodeURL(path)
on the wrapped response object.
- */
- public String encodeURL(String path) {
- return response.encodeURL(path);
- }
-
- /**
- * The default behavior of this method is to call
- * getNamespace()
on the wrapped response object.
- */
- public String getNamespace() {
- return response.getNamespace();
- }
-
- /**
- * The default behavior of this method is to call
- * setProperty(key, value)
on the wrapped response object.
- */
- public void setProperty(String key, String value) {
- response.setProperty(key, value);
- }
-
- /**
- * Return the wrapped response object.
- *
- * @return the wrapped response
- */
- public PortletResponse getResponse() {
- return response;
- }
-
- /**
- * Sets the response object being wrapped.
- *
- * @param response the response to set
- * @throws java.lang.IllegalArgumentException if the response is null.
- */
- public void setResponse(PortletResponse response) {
- if ( response == null)
- throw new java.lang.IllegalArgumentException("Response is null");
-
- this.response = response;
- }
-
- /**
- * The default behavior of this method is to call
- * addProperty()
on the wrapped response object.
- */
- public void addProperty(String key, org.w3c.dom.Element element) {
- response.addProperty(key, element);
- }
-
- /**
- * The default behavior of this method is to call
- * createElement()
on the wrapped response object.
- */
- public org.w3c.dom.Element createElement(String tagName) {
- return response.createElement(tagName);
- }
-
- /**
- * The default behavior of this method is to call
- * addProperty()
on the wrapped response object.
- */
- public void addProperty(Cookie cookie) {
- response.addProperty(cookie);
- }
-
-}
diff --git a/api/src/main/patches/javax.servlet.patch b/api/src/main/patches/javax.servlet.patch
new file mode 100644
index 000000000..bc94f053b
--- /dev/null
+++ b/api/src/main/patches/javax.servlet.patch
@@ -0,0 +1,48 @@
+diff -uNr portlet-api-orig/javax/portlet/filter/PortletRequestWrapper.java portlet-api/javax/portlet/filter/PortletRequestWrapper.java
+--- portlet-api-orig/javax/portlet/filter/PortletRequestWrapper.java 2008-11-19 17:09:58.000000000 +0100
++++ portlet-api/javax/portlet/filter/PortletRequestWrapper.java 2023-12-21 08:38:11.964726000 +0100
+@@ -41,7 +41,7 @@
+ import javax.portlet.PortletRequest;
+ import javax.portlet.PortletSession;
+ import javax.portlet.WindowState;
+-import javax.servlet.http.Cookie;
++import jakarta.servlet.http.Cookie;
+
+ /**
+ * The PortletRequestWrapper
provides a convenient
+diff -uNr portlet-api-orig/javax/portlet/filter/PortletResponseWrapper.java portlet-api/javax/portlet/filter/PortletResponseWrapper.java
+--- portlet-api-orig/javax/portlet/filter/PortletResponseWrapper.java 2008-11-19 17:09:58.000000000 +0100
++++ portlet-api/javax/portlet/filter/PortletResponseWrapper.java 2023-12-21 08:38:11.964726000 +0100
+@@ -31,7 +31,7 @@
+ package javax.portlet.filter;
+
+ import javax.portlet.PortletResponse;
+-import javax.servlet.http.Cookie;
++import jakarta.servlet.http.Cookie;
+
+ /**
+ * The PortletResponseWrapper
provides a convenient
+diff -uNr portlet-api-orig/javax/portlet/PortletRequest.java portlet-api/javax/portlet/PortletRequest.java
+--- portlet-api-orig/javax/portlet/PortletRequest.java 2008-11-19 17:09:58.000000000 +0100
++++ portlet-api/javax/portlet/PortletRequest.java 2023-12-21 08:38:11.968726000 +0100
+@@ -905,7 +905,7 @@
+ * null
if no cookies exist.
+ * @see MimeResponse#addProperty(Cookie)
+ */
+- public javax.servlet.http.Cookie[] getCookies();
++ public jakarta.servlet.http.Cookie[] getCookies();
+
+ /**
+ * Returns a Map
of the private parameters of this request.
+diff -uNr portlet-api-orig/javax/portlet/PortletResponse.java portlet-api/javax/portlet/PortletResponse.java
+--- portlet-api-orig/javax/portlet/PortletResponse.java 2008-11-19 17:09:58.000000000 +0100
++++ portlet-api/javax/portlet/PortletResponse.java 2023-12-21 08:38:11.968726000 +0100
+@@ -155,7 +155,7 @@
+ * @since 2.0
+ */
+
+- public void addProperty(javax.servlet.http.Cookie cookie);
++ public void addProperty(jakarta.servlet.http.Cookie cookie);
+
+
+ /**
diff --git a/embed/pom.xml b/embed/pom.xml
index b2ff4bb42..1f0223120 100644
--- a/embed/pom.xml
+++ b/embed/pom.xml
@@ -91,11 +91,6 @@