Interface DisplayContext<T>
@ProviderType
public interface DisplayContext<T>
The DisplayContext used by
CTDisplayRenderer for rendering a
model.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetDownloadURL(String key, long size, String title) Creates a download URL for use while rendering.javax.servlet.http.HttpServletRequestReturns the request used for rendering.javax.servlet.http.HttpServletResponseReturns the response used for rendering.getModel()Returns the model to be rendered.voidrenderPreview(com.liferay.portal.kernel.model.BaseModel<?> baseModel, Locale locale)
-
Method Details
-
getDownloadURL
Creates a download URL for use while rendering. This is only used forCTModelrenderers.- Parameters:
key- to be passed toCTDisplayRenderer.getDownloadInputStream(Object, String)size- the size of the download in bytes or0title- the title to use for the download- Returns:
- the URL string or
null
-
getHttpServletRequest
javax.servlet.http.HttpServletRequest getHttpServletRequest()Returns the request used for rendering.- Returns:
- the request used for rendering
-
getHttpServletResponse
javax.servlet.http.HttpServletResponse getHttpServletResponse()Returns the response used for rendering.- Returns:
- the response used for rendering
-
getLocale
Locale getLocale() -
getModel
T getModel()Returns the model to be rendered.- Returns:
- the model to be rendered
-
render
- Throws:
Exception
-
renderPreview
String renderPreview(com.liferay.portal.kernel.model.BaseModel<?> baseModel, Locale locale) throws Exception - Throws:
Exception
-