public interface CTDisplayRenderer<T>
DisplayContext| Modifier and Type | Method and Description |
|---|---|
default T |
fetchLatestVersionedModel(T model) |
default java.lang.String[] |
getAvailableLanguageIds(T model) |
default java.lang.String |
getContent(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
java.util.Locale locale,
T model)
Deprecated.
As of Cavanaugh (7.4.x), replaced by
renderPreview(DisplayContext) |
default java.lang.String |
getContent(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
T model)
Deprecated.
As of Cavanaugh (7.4.x), replaced by
getContent(
HttpServletRequest, HttpServletResponse, Locale,
Object) |
default java.lang.String |
getDefaultLanguageId(T model) |
default java.io.InputStream |
getDownloadInputStream(T model,
java.lang.String key)
Returns the input stream for the model and key from when the URL was
generated during rendering.
|
java.lang.String |
getEditURL(javax.servlet.http.HttpServletRequest httpServletRequest,
T model)
Returns the edit URL for the model (optionally
null). |
java.lang.Class<T> |
getModelClass()
Returns the model class for this display renderer.
|
default java.lang.String |
getPreviousContent(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
T currentModel,
T previousModel)
Deprecated.
As of Cavanaugh (7.4.x), with no direct replacement
|
default T |
getPreviousVersionedModel(T model)
Deprecated.
As of Cavanaugh (7.4.x), replaced by
fetchLatestVersionedModel(Object) |
java.lang.String |
getTitle(java.util.Locale locale,
T model)
Returns the title for the model.
|
java.lang.String |
getTypeName(java.util.Locale locale)
Returns the translated type name for the model type.
|
default java.lang.String |
getVersionName(T model) |
default boolean |
hasContent()
Deprecated.
As of Cavanaugh (7.4.x), with no direct replacement
|
default boolean |
isHideable(T model)
Returns whether the model may be hidden by default.
|
default boolean |
isMovable(T model) |
default boolean |
isVersioned()
Deprecated.
As of Cavanaugh (7.4.x), with no direct replacement
|
void |
render(DisplayContext<T> displayContext)
Renders the model with the display context.
|
default java.lang.String |
renderPreview(DisplayContext<T> displayContext) |
default boolean |
showPreviewDiff() |
default java.lang.String[] getAvailableLanguageIds(T model)
@Deprecated
default java.lang.String getContent(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
java.util.Locale locale,
T model)
throws java.lang.Exception
renderPreview(DisplayContext)java.lang.Exception@Deprecated
default java.lang.String getContent(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
T model)
throws java.lang.Exception
getContent(
HttpServletRequest, HttpServletResponse, Locale,
Object)java.lang.Exceptiondefault java.lang.String getDefaultLanguageId(T model)
default java.io.InputStream getDownloadInputStream(T model, java.lang.String key) throws com.liferay.portal.kernel.exception.PortalException
model - the model for the downloadkey - the key used when creating the download URLcom.liferay.portal.kernel.exception.PortalExceptionDisplayContext.getDownloadURL(String, long, String)java.lang.String getEditURL(javax.servlet.http.HttpServletRequest httpServletRequest,
T model)
throws java.lang.Exception
null).httpServletRequest - the requestmodel - the model to be editedjava.lang.Exception - if an exception occurredjava.lang.Class<T> getModelClass()
@Deprecated
default java.lang.String getPreviousContent(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
T currentModel,
T previousModel)
throws java.lang.Exception
java.lang.Exception@Deprecated default T getPreviousVersionedModel(T model) throws com.liferay.portal.kernel.exception.PortalException
fetchLatestVersionedModel(Object)com.liferay.portal.kernel.exception.PortalExceptionjava.lang.String getTitle(java.util.Locale locale,
T model)
throws com.liferay.portal.kernel.exception.PortalException
locale - to use for translationmodel - the model for this display renderercom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredjava.lang.String getTypeName(java.util.Locale locale)
locale - to use for translationdefault java.lang.String getVersionName(T model)
@Deprecated default boolean hasContent()
default boolean isHideable(T model)
model - the model to be shown or hidden by defaultdefault boolean isMovable(T model)
@Deprecated default boolean isVersioned()
void render(DisplayContext<T> displayContext) throws java.lang.Exception
displayContext - the context for rendering the modeljava.lang.Exception - if an exception occurreddefault java.lang.String renderPreview(DisplayContext<T> displayContext) throws java.lang.Exception
java.lang.Exceptiondefault boolean showPreviewDiff()