com.liferay.portlet.asset.model
Class BaseAssetRenderer

java.lang.Object
  extended by com.liferay.portlet.asset.model.BaseAssetRenderer
All Implemented Interfaces:
AssetRenderer

public abstract class BaseAssetRenderer
extends java.lang.Object
implements AssetRenderer

Author:
Jorge Ferrer, Sergio González

Field Summary
 
Fields inherited from interface com.liferay.portlet.asset.model.AssetRenderer
TEMPLATE_ABSTRACT, TEMPLATE_FULL_CONTENT
 
Constructor Summary
BaseAssetRenderer()
           
 
Method Summary
 java.lang.String getAddToPagePortletId()
           
 AssetRendererFactory getAssetRendererFactory()
           
 int getAssetRendererType()
           
 java.lang.String[] getAvailableLanguageIds()
           
 java.lang.String[] getAvailableLocales()
          Deprecated. As of 6.2.0, replaced by getAvailableLanguageIds()
protected  long getControlPanelPlid(LiferayPortletRequest liferayPortletRequest)
           
protected  long getControlPanelPlid(ThemeDisplay themeDisplay)
           
 java.lang.String getDiscussionPath()
           
 java.util.Date getDisplayDate()
           
 java.lang.String getIconPath(javax.portlet.PortletRequest portletRequest)
           
protected  java.lang.String getIconPath(ThemeDisplay themeDisplay)
           
 java.lang.String getNewName(java.lang.String oldName, java.lang.String token)
           
 java.lang.String getPreviewPath(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse PortletResponse)
           
 java.lang.String getSearchSummary(java.util.Locale locale)
           
 java.lang.String getThumbnailPath(javax.portlet.PortletRequest portletRequest)
           
 java.lang.String getURLDownload(ThemeDisplay themeDisplay)
           
 javax.portlet.PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse)
           
 javax.portlet.PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse, javax.portlet.WindowState windowState, javax.portlet.PortletURL redirectURL)
           
 javax.portlet.PortletURL getURLExport(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse)
           
 java.lang.String getURLImagePreview(javax.portlet.PortletRequest portletRequest)
           
 java.lang.String getUrlTitle()
           
 javax.portlet.PortletURL getURLView(LiferayPortletResponse liferayPortletResponse, javax.portlet.WindowState windowState)
           
 java.lang.String getURLViewInContext(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse, java.lang.String noSuchEntryRedirect)
           
protected  java.lang.String getURLViewInContext(LiferayPortletRequest liferayPortletRequest, java.lang.String noSuchEntryRedirect, java.lang.String path, java.lang.String primaryKeyParameterName, long primaryKeyParameterValue)
           
 java.lang.String getViewInContextMessage()
           
 boolean hasEditPermission(PermissionChecker permissionChecker)
           
 boolean hasViewPermission(PermissionChecker permissionChecker)
           
 boolean isConvertible()
           
 boolean isDisplayable()
           
 boolean isLocalizable()
           
 boolean isPreviewInContext()
           
 boolean isPrintable()
           
 java.lang.String renderActions(javax.portlet.RenderRequest renderRequest, javax.portlet.RenderResponse renderResponse)
           
 void setAddToPagePreferences(javax.portlet.PortletPreferences preferences, java.lang.String portletId, ThemeDisplay themeDisplay)
           
 void setAssetRendererType(int assetRendererType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.portlet.asset.model.AssetRenderer
getClassName, getClassPK, getGroupId, getSummary, getTitle, getUserId, getUserName, getUuid, render
 

Constructor Detail

BaseAssetRenderer

public BaseAssetRenderer()
Method Detail

getAddToPagePortletId

public java.lang.String getAddToPagePortletId()
                                       throws java.lang.Exception
Specified by:
getAddToPagePortletId in interface AssetRenderer
Throws:
java.lang.Exception

getAssetRendererFactory

public AssetRendererFactory getAssetRendererFactory()

getAssetRendererType

public int getAssetRendererType()
Specified by:
getAssetRendererType in interface AssetRenderer

getAvailableLanguageIds

public java.lang.String[] getAvailableLanguageIds()
Specified by:
getAvailableLanguageIds in interface AssetRenderer

getAvailableLocales

public java.lang.String[] getAvailableLocales()
Deprecated. As of 6.2.0, replaced by getAvailableLanguageIds()

Specified by:
getAvailableLocales in interface AssetRenderer

getDiscussionPath

public java.lang.String getDiscussionPath()
Specified by:
getDiscussionPath in interface AssetRenderer

getDisplayDate

public java.util.Date getDisplayDate()
Specified by:
getDisplayDate in interface AssetRenderer

getIconPath

public java.lang.String getIconPath(javax.portlet.PortletRequest portletRequest)
Specified by:
getIconPath in interface AssetRenderer

getNewName

public java.lang.String getNewName(java.lang.String oldName,
                                   java.lang.String token)
Specified by:
getNewName in interface AssetRenderer

getPreviewPath

public java.lang.String getPreviewPath(javax.portlet.PortletRequest portletRequest,
                                       javax.portlet.PortletResponse PortletResponse)
                                throws java.lang.Exception
Specified by:
getPreviewPath in interface AssetRenderer
Throws:
java.lang.Exception

getSearchSummary

public java.lang.String getSearchSummary(java.util.Locale locale)
Specified by:
getSearchSummary in interface AssetRenderer

getThumbnailPath

public java.lang.String getThumbnailPath(javax.portlet.PortletRequest portletRequest)
                                  throws java.lang.Exception
Specified by:
getThumbnailPath in interface AssetRenderer
Throws:
java.lang.Exception

getURLDownload

public java.lang.String getURLDownload(ThemeDisplay themeDisplay)
Specified by:
getURLDownload in interface AssetRenderer

getURLEdit

public javax.portlet.PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest,
                                           LiferayPortletResponse liferayPortletResponse)
                                    throws java.lang.Exception
Specified by:
getURLEdit in interface AssetRenderer
Throws:
java.lang.Exception

getURLEdit

public javax.portlet.PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest,
                                           LiferayPortletResponse liferayPortletResponse,
                                           javax.portlet.WindowState windowState,
                                           javax.portlet.PortletURL redirectURL)
                                    throws java.lang.Exception
Specified by:
getURLEdit in interface AssetRenderer
Throws:
java.lang.Exception

getURLExport

public javax.portlet.PortletURL getURLExport(LiferayPortletRequest liferayPortletRequest,
                                             LiferayPortletResponse liferayPortletResponse)
                                      throws java.lang.Exception
Specified by:
getURLExport in interface AssetRenderer
Throws:
java.lang.Exception

getURLImagePreview

public java.lang.String getURLImagePreview(javax.portlet.PortletRequest portletRequest)
                                    throws java.lang.Exception
Specified by:
getURLImagePreview in interface AssetRenderer
Throws:
java.lang.Exception

getUrlTitle

public java.lang.String getUrlTitle()
Specified by:
getUrlTitle in interface AssetRenderer

getURLView

public javax.portlet.PortletURL getURLView(LiferayPortletResponse liferayPortletResponse,
                                           javax.portlet.WindowState windowState)
                                    throws java.lang.Exception
Specified by:
getURLView in interface AssetRenderer
Throws:
java.lang.Exception

getURLViewInContext

public java.lang.String getURLViewInContext(LiferayPortletRequest liferayPortletRequest,
                                            LiferayPortletResponse liferayPortletResponse,
                                            java.lang.String noSuchEntryRedirect)
                                     throws java.lang.Exception
Specified by:
getURLViewInContext in interface AssetRenderer
Throws:
java.lang.Exception

getViewInContextMessage

public java.lang.String getViewInContextMessage()
Specified by:
getViewInContextMessage in interface AssetRenderer

hasEditPermission

public boolean hasEditPermission(PermissionChecker permissionChecker)
                          throws PortalException,
                                 SystemException
Specified by:
hasEditPermission in interface AssetRenderer
Throws:
PortalException
SystemException

hasViewPermission

public boolean hasViewPermission(PermissionChecker permissionChecker)
                          throws PortalException,
                                 SystemException
Specified by:
hasViewPermission in interface AssetRenderer
Throws:
PortalException
SystemException

isConvertible

public boolean isConvertible()
Specified by:
isConvertible in interface AssetRenderer

isDisplayable

public boolean isDisplayable()
Specified by:
isDisplayable in interface AssetRenderer

isLocalizable

public boolean isLocalizable()
Specified by:
isLocalizable in interface AssetRenderer

isPreviewInContext

public boolean isPreviewInContext()
Specified by:
isPreviewInContext in interface AssetRenderer

isPrintable

public boolean isPrintable()
Specified by:
isPrintable in interface AssetRenderer

renderActions

public java.lang.String renderActions(javax.portlet.RenderRequest renderRequest,
                                      javax.portlet.RenderResponse renderResponse)
                               throws java.lang.Exception
Throws:
java.lang.Exception

setAddToPagePreferences

public void setAddToPagePreferences(javax.portlet.PortletPreferences preferences,
                                    java.lang.String portletId,
                                    ThemeDisplay themeDisplay)
                             throws java.lang.Exception
Specified by:
setAddToPagePreferences in interface AssetRenderer
Throws:
java.lang.Exception

setAssetRendererType

public void setAssetRendererType(int assetRendererType)

getControlPanelPlid

protected long getControlPanelPlid(LiferayPortletRequest liferayPortletRequest)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getControlPanelPlid

protected long getControlPanelPlid(ThemeDisplay themeDisplay)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getIconPath

protected java.lang.String getIconPath(ThemeDisplay themeDisplay)

getURLViewInContext

protected java.lang.String getURLViewInContext(LiferayPortletRequest liferayPortletRequest,
                                               java.lang.String noSuchEntryRedirect,
                                               java.lang.String path,
                                               java.lang.String primaryKeyParameterName,
                                               long primaryKeyParameterValue)