|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pluto.internal.impl.BaseURLImpl
org.apache.pluto.internal.impl.ResourceURLImpl
public class ResourceURLImpl
Implementation of JSR-286 ResourceURL
.
Field Summary |
---|
Fields inherited from class org.apache.pluto.internal.impl.BaseURLImpl |
---|
container, context, internalPortletWindow, isAction, isResourceServing, mode, parameters, publicRenderParameters, secure, servletRequest, servletResponse, state |
Fields inherited from interface javax.portlet.ResourceURL |
---|
FULL, PAGE, PORTLET, SHARED |
Constructor Summary | |
---|---|
ResourceURLImpl(PortletContainer container,
InternalPortletWindow internalPortletWindow,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
|
Method Summary | |
---|---|
java.lang.String |
getCacheability()
Returns the cache level of this resource URL. |
void |
setCacheability(java.lang.String cacheLevel)
Sets the cache level of this resource URL. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets the given String parameter to this URL. |
void |
setParameter(java.lang.String name,
java.lang.String[] values)
Sets the given String array parameter to this URL. |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Sets a parameter map for this URL. |
void |
setResourceID(java.lang.String resourceID)
Allows setting a resource ID that can be retrieved when serving the resource through the ResourceRequest.getResourceID() method. |
Methods inherited from class org.apache.pluto.internal.impl.BaseURLImpl |
---|
addProperty, getParameter, getParameterMap, getParameters, getPortletMode, getWindowState, isPortletModeAllowed, isWindowStateAllowed, setProperty, setSecure, toString, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.portlet.BaseURL |
---|
addProperty, getParameterMap, setProperty, setSecure, toString, write, write |
Constructor Detail |
---|
public ResourceURLImpl(PortletContainer container, InternalPortletWindow internalPortletWindow, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
Method Detail |
---|
public void setResourceID(java.lang.String resourceID)
ResourceURL
ResourceRequest.getResourceID()
method.
setResourceID
in interface ResourceURL
resourceID
- ID for this resource URLpublic java.lang.String getCacheability()
ResourceURL
Possible return values are: FULL, PORTLET
or PAGE
.
getCacheability
in interface ResourceURL
public void setCacheability(java.lang.String cacheLevel)
ResourceURL
Possible values are: FULL, PORTLET
or PAGE
.
Note that if this URL is created inside a
serveResource
call it must have
at minimum the same cacheablity, or a more
restrictive one, as the parent resource URL,
otherwise an IllegalStateException is thrown.
The default cache level of a resource URL is either the cache level of the
parent resource URL, or PAGE
if no parent resource URL is
available.
setCacheability
in interface ResourceURL
cacheLevel
- the cache level of this resource URL.public void setParameter(java.lang.String name, java.lang.String value)
BaseURL
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
A parameter value of null
indicates that this
parameter should be removed.
setParameter
in interface BaseURL
setParameter
in class BaseURLImpl
name
- the parameter namevalue
- the parameter valuepublic void setParameter(java.lang.String name, java.lang.String[] values)
BaseURL
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
setParameter
in interface BaseURL
setParameter
in class BaseURLImpl
name
- the parameter namevalues
- the parameter valuespublic void setParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters)
BaseURL
All previously set parameters are cleared.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally, in order to preserve a unique namespace for the portlet.
setParameters
in interface BaseURL
setParameters
in class BaseURLImpl
parameters
- Map containing parameter names for
the render phase as
keys and parameter values as map
values. The keys in the parameter
map must be of type String. The values
in the parameter map must be of type
String array (String[]
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |