Class RenderURLWrapper
- java.lang.Object
-
- jakarta.portlet.filter.RenderStateWrapper
-
- jakarta.portlet.filter.BaseURLWrapper
-
- jakarta.portlet.filter.PortletURLWrapper
-
- jakarta.portlet.filter.RenderURLWrapper
-
- All Implemented Interfaces:
BaseURL,Mutable,MutableRenderState,PortletURL,RenderState,RenderURL
public class RenderURLWrapper extends PortletURLWrapper implements RenderURL
TheRenderURLWrapperprovides a convenient implementation of theRenderURLinterface that can be subclassed by developers. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.- Since:
- 3.0
-
-
Field Summary
-
Fields inherited from class jakarta.portlet.filter.RenderStateWrapper
wrapped
-
-
Constructor Summary
Constructors Constructor Description RenderURLWrapper(RenderURL wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFragmentIdentifier()Gets the fragment identifier previously set on the URL.RenderURLgetWrapped()Gets the wrapped object.voidsetFragmentIdentifier(String fragment)Sets a fragment identifier on the URL.voidsetWrapped(RenderURL wrapped)Sets the wrapped object.-
Methods inherited from class jakarta.portlet.filter.PortletURLWrapper
getRenderParameters, removePublicRenderParameter, setBeanParameter, setPortletMode, setWindowState, setWrapped
-
Methods inherited from class jakarta.portlet.filter.BaseURLWrapper
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, setWrapped, toString, write, write
-
Methods inherited from class jakarta.portlet.filter.RenderStateWrapper
getPortletMode, getWindowState, setWrapped
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.portlet.BaseURL
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, write
-
Methods inherited from interface jakarta.portlet.MutableRenderState
getRenderParameters, setPortletMode, setWindowState
-
Methods inherited from interface jakarta.portlet.PortletURL
removePublicRenderParameter, setBeanParameter
-
Methods inherited from interface jakarta.portlet.RenderState
getPortletMode, getWindowState
-
-
-
-
Constructor Detail
-
RenderURLWrapper
public RenderURLWrapper(RenderURL wrapped)
- Parameters:
wrapped- the wrapped object to set.- Throws:
IllegalArgumentException- if the RenderURL is null.
-
-
Method Detail
-
getWrapped
public RenderURL getWrapped()
Gets the wrapped object.- Overrides:
getWrappedin classPortletURLWrapper- Returns:
- the wrapped object.
-
setWrapped
public void setWrapped(RenderURL wrapped)
Sets the wrapped object.- Parameters:
wrapped- the wrapped object to set.- Throws:
IllegalArgumentException- if the RenderURL is null.
-
setFragmentIdentifier
public void setFragmentIdentifier(String fragment)
Description copied from interface:RenderURLSets a fragment identifier on the URL.Any previously set fragment identifier will be replaced.
The fragment identifier consists of additional information appended to the URL after a '#' character. A URL can have only a single fragment identifier. The fragment identifier must be formed according to rfc3986.
The fragment identifier is often used to address a named anchor such as
<a name="#fragmentIdentifier">, but it can also be used for other purposes such as to pass information to a JavaScript routine.The fragment identifier will not be namespaced. The portlet is responsible for performing any required namespacing. However, the fragment identifier string will be escaped as required.
Setting the fragment identifier to
nullwill remove a fragment identifier previously set through this method. Setting the empty string as the fragment identifier will create an empty fragment identifier.- Specified by:
setFragmentIdentifierin interfaceRenderURL- Parameters:
fragment- The fragment identifier to be added to the URL- See Also:
RenderURL.getFragmentIdentifier()
-
getFragmentIdentifier
public String getFragmentIdentifier()
Description copied from interface:RenderURLGets the fragment identifier previously set on the URL.A fragment identifier may have been set by the portlet using the
RenderURL.setFragmentIdentifier(java.lang.String)method, or it may be a value set by the portal if the portlet had not previously set a fragment identifier.- Specified by:
getFragmentIdentifierin interfaceRenderURL- Returns:
- The fragment identifier set on the URL, or
nullif no fragment identifier has been set. - See Also:
RenderURL.setFragmentIdentifier(java.lang.String)
-
-