public class ResourceURLWrapper extends BaseURLWrapper implements ResourceURL
ResourceURLWrapper provides a convenient
implementation of the ResourceURL interface
that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped request object.
wrappedFULL, PAGE, PORTLET, SHARED| Constructor and Description |
|---|
ResourceURLWrapper(ResourceURL wrapped) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCacheability()
Returns the cache level of this resource URL.
|
String |
getResourceID()
Returns the resource ID set on the ResourceURL or
null
if no resource ID was set on the URL. |
MutableResourceParameters |
getResourceParameters()
Gets the resource parameter values set for this URL.
|
ResourceURL |
getWrapped()
Gets the wrapped object.
|
void |
setCacheability(String cacheLevel)
Sets the cache level of this resource URL.
|
void |
setResourceID(String resourceID)
Allows setting a resource ID that can be retrieved when serving the
resource through the
ResourceRequest.getResourceID() method. |
void |
setWrapped(ResourceURL wrapped)
Sets the wrapped object.
|
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, setWrapped, toString, write, writegetPortletMode, getRenderParameters, getWindowState, setWrappedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, writegetPortletMode, getRenderParameters, getWindowStatepublic ResourceURLWrapper(ResourceURL wrapped)
wrapped - the wrapped object to set.IllegalArgumentException - if the ResourceURL is null.public ResourceURL getWrapped()
getWrapped in class BaseURLWrapperpublic void setWrapped(ResourceURL wrapped)
wrapped - the wrapped object to set.IllegalArgumentException - if the ResourceURL is null.public MutableResourceParameters getResourceParameters()
ResourceURLResource parameters are additional portlet parameters added to the URL that extend the state information provided by the render parameters.
Initially the returned object is empty.
Modifying the parameter values encapsulated by the returned object directly modifies the resource parameters applied to the URL.
PortletParameters provides a description of the parameter concept.
getResourceParameters in interface ResourceURLPortletParameters object representing
the private and public render parametersPortletParameters,
MutableResourceParameters,
ResourceRequestpublic void setResourceID(String resourceID)
ResourceURLResourceRequest.getResourceID() method.setResourceID in interface ResourceURLresourceID - ID for this resource URLpublic String getResourceID()
ResourceURLnull
if no resource ID was set on the URL.getResourceID in interface ResourceURLnull
if no resource ID was set on the URL.public String getCacheability()
ResourceURL
Possible return values are: FULL, PORTLET
or PAGE.
getCacheability in interface ResourceURLpublic void setCacheability(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 ResourceURLcacheLevel - the cache level of this resource URL.Java Portlet 3.0 API Specification. See the Copyright and License provided with this distribution. Use is subject to license terms.