public abstract class PresentationData extends HashMap<Object,Object> implements IPresentationData, Serializable, Cloneable
An instance of this class is available on every request handled by the Portal servlet.
To access this instance, use the static method getPresentationData(javax.servlet.http.HttpServletRequest)
.
This instance is initialized with data useful in presenting a response to the request,
including
IPresentationData.getDataObject()
)IPresentationData.getResourceID()
)IPresentationData.getContextPath()
)
and servlet path (see IPresentationData.getCanonicalServletPath()
)The web-app context path is useful when drawing a link to a static web resource hosted by the portal, such as an image. To draw a link to an image in the portal war '/ui/images/' directory, you could use the following JSP snippet:
<img src="<%=presentationbean.getContextPath().length > 1
? presentationbean.getContextPath() + "/"
: presentationbean.getContextPath()%>ui/images/myimage.gif" />
The full servlet path is useful when drawing a link to an aliased portal resource,
such as a folder or portlet. To draw a link to the Public Folders using its alias,
you could use the following JSP snippet:
<a href="<%=presentationbean.getFullServletPath()%>folder.public">
Public Folders
</a>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
DATA_DIRECTORY, DATA_DS_PRINCIPAL, DATA_EMPTY, DATA_FORWARD, DATA_READER, DATA_REDIRECT, DATA_STREAM, DATA_STRING, DATA_THING, DATA_UNKNOWN, DATA_VERSION, DATA_W3C_NODE, ID
Constructor and Description |
---|
PresentationData() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a shallow copy of this.
|
static PresentationData |
getPresentationData(HttpServletRequest request)
Retrieves the
PresentationData from the specified request. |
static void |
setPresentationData(HttpServletRequest request,
PresentationData presentationData)
Associates the specified
PresentationData with the specified HttpServletRequest . |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getApplication, getBaseResource, getBuildVersion, getCanonicalServletPath, getContext, getContextPath, getCss, getCurrentRequestURL, getDataObject, getDataType, getDefaultLayout, getEditor, getErrorLayout, getExtension, getFullServletPath, getHelp, getImages, getIncludes, getLayout, getLoginName, getMimeType, getPool, getPortlet, getPreviousRequestURL, getRelativeTheme, getRequestedServerURL, getResource, getResourceID, getResourceURI, getScripts, getServerURL, getServletPath, getShell, getStyle, getSystemTitle, getWidgets, getWorkspaces, getXslt, init, putAll, release, setApplication, setBaseResource, setContext, setContextPath, setCss, setCurrentRequestURL, setDataObject, setDataType, setDefaultLayout, setEditor, setErrorLayout, setExtension, setHelp, setImages, setIncludes, setLayout, setLoginName, setMimeType, setPool, setPortlet, setPreviousRequestURL, setRelativeTheme, setRequestedServerURL, setResource, setResourceURI, setScripts, setServerURL, setServletPath, setStyle, setWidgets, setWorkspaces, setXslt
public static PresentationData getPresentationData(HttpServletRequest request)
PresentationData
from the specified request.request
- Request from which to retrieve the PresentationData
.PresentationData
associated with the specified request.public static void setPresentationData(HttpServletRequest request, PresentationData presentationData)
PresentationData
with the specified HttpServletRequest
.request
- Request with which to associate the specified PresentationData
.presentationData
- PresentationData
with which to associate the specified request.public Object clone()
clone
in interface IPresentationData
clone
in class HashMap<Object,Object>
Object.clone()