Class BaseCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>
java.lang.Object
com.liferay.change.tracking.spi.display.BaseCTDisplayRenderer<T>
- All Implemented Interfaces:
CTDisplayRenderer<T>
public abstract class BaseCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>
extends Object
implements CTDisplayRenderer<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildDisplay(BaseCTDisplayRenderer.DisplayBuilder<T> displayBuilder) getEditURL(javax.servlet.http.HttpServletRequest httpServletRequest, T model) Returns the edit URL for the model (optionallynull).Returns the model class for this display renderer.protected ResourceBundlegetResourceBundle(Locale locale) abstract StringReturns the title for the model.getTypeName(Locale locale) Returns the translated type name for the model type.booleanisHideable(T model) Returns whether the model may be hidden by default.voidrender(DisplayContext<T> displayContext) Renders the model with the display context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.change.tracking.spi.display.CTDisplayRenderer
fetchLatestVersionedModel, getAvailableLanguageIds, getDefaultLanguageId, getDownloadInputStream, getVersionName, renderPreview, showPreviewDiff
-
Constructor Details
-
BaseCTDisplayRenderer
public BaseCTDisplayRenderer()
-
-
Method Details
-
getEditURL
public String getEditURL(javax.servlet.http.HttpServletRequest httpServletRequest, T model) throws Exception Description copied from interface:CTDisplayRendererReturns the edit URL for the model (optionallynull).- Specified by:
getEditURLin interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Parameters:
httpServletRequest- the requestmodel- the model to be edited- Returns:
- the URL to use for editing the model
- Throws:
Exception- if an exception occurred
-
getModelClass
Description copied from interface:CTDisplayRendererReturns the model class for this display renderer.- Specified by:
getModelClassin interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Returns:
- the model class for this display renderer
-
getTitle
public abstract String getTitle(Locale locale, T model) throws com.liferay.portal.kernel.exception.PortalException Description copied from interface:CTDisplayRendererReturns the title for the model.- Specified by:
getTitlein interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Parameters:
locale- to use for translationmodel- the model for this display renderer- Returns:
- the title for the model
- Throws:
com.liferay.portal.kernel.exception.PortalException- if a portal exception occurred
-
getTypeName
Description copied from interface:CTDisplayRendererReturns the translated type name for the model type.- Specified by:
getTypeNamein interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Parameters:
locale- to use for translation- Returns:
- the type name for the model type
-
isHideable
Description copied from interface:CTDisplayRendererReturns whether the model may be hidden by default. Hidden models may be filtered out in some views.- Specified by:
isHideablein interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Parameters:
model- the model to be shown or hidden by default- Returns:
- whether the model may be hidden by default
-
render
Description copied from interface:CTDisplayRendererRenders the model with the display context.- Specified by:
renderin interfaceCTDisplayRenderer<T extends com.liferay.portal.kernel.model.BaseModel<T>>- Parameters:
displayContext- the context for rendering the model- Throws:
Exception- if an exception occurred
-
buildDisplay
protected void buildDisplay(BaseCTDisplayRenderer.DisplayBuilder<T> displayBuilder) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getResourceBundle
-