001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
020 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021 import com.liferay.portal.security.permission.PermissionChecker;
022 import com.liferay.portal.theme.ThemeDisplay;
023
024 import java.util.Locale;
025
026 import javax.portlet.PortletRequest;
027 import javax.portlet.PortletURL;
028 import javax.portlet.RenderRequest;
029 import javax.portlet.RenderResponse;
030 import javax.portlet.WindowState;
031
032
036 public interface AssetRenderer {
037
038 public static final String TEMPLATE_ABSTRACT = "abstract";
039
040 public static final String TEMPLATE_FULL_CONTENT = "full_content";
041
042 public String getAssetRendererFactoryClassName();
043
044 public String[] getAvailableLocales() throws Exception;
045
046 public long getClassPK();
047
048 public String getDiscussionPath();
049
050 public long getGroupId();
051
052 public String getIconPath(PortletRequest portletRequest);
053
054 public String getSearchSummary(Locale locale);
055
056 public String getSummary(Locale locale);
057
058 public String getThumbnailPath(PortletRequest portletRequest)
059 throws Exception;
060
061 public String getTitle(Locale locale);
062
063 public String getURLDownload(ThemeDisplay themeDisplay);
064
065 public PortletURL getURLEdit(
066 LiferayPortletRequest liferayPortletRequest,
067 LiferayPortletResponse liferayPortletResponse)
068 throws Exception;
069
070 public PortletURL getURLEdit(
071 LiferayPortletRequest liferayPortletRequest,
072 LiferayPortletResponse liferayPortletResponse,
073 WindowState windowState, PortletURL redirectURL)
074 throws Exception;
075
076 public PortletURL getURLExport(
077 LiferayPortletRequest liferayPortletRequest,
078 LiferayPortletResponse liferayPortletResponse)
079 throws Exception;
080
081 public String getUrlTitle();
082
083 public PortletURL getURLView(
084 LiferayPortletResponse liferayPortletResponse,
085 WindowState windowState)
086 throws Exception;
087
088 public String getURLViewInContext(
089 LiferayPortletRequest liferayPortletRequest,
090 LiferayPortletResponse liferayPortletResponse,
091 String noSuchEntryRedirect)
092 throws Exception;
093
094 public long getUserId();
095
096 public String getUserName();
097
098 public String getUuid();
099
100 public String getViewInContextMessage();
101
102 public boolean hasEditPermission(PermissionChecker permissionChecker)
103 throws PortalException, SystemException;
104
105 public boolean hasViewPermission(PermissionChecker permissionChecker)
106 throws PortalException, SystemException;
107
108 public boolean isConvertible();
109
110 public boolean isDisplayable();
111
112 public boolean isLocalizable();
113
114 public boolean isPreviewInContext();
115
116 public boolean isPrintable();
117
118 public String render(
119 RenderRequest renderRequest, RenderResponse renderResponse,
120 String template)
121 throws Exception;
122
123 }