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.Date;
025 import java.util.Locale;
026
027 import javax.portlet.PortletPreferences;
028 import javax.portlet.PortletRequest;
029 import javax.portlet.PortletResponse;
030 import javax.portlet.PortletURL;
031 import javax.portlet.RenderRequest;
032 import javax.portlet.RenderResponse;
033 import javax.portlet.WindowState;
034
035
039 public interface AssetRenderer {
040
041 public static final String TEMPLATE_ABSTRACT = "abstract";
042
043 public static final String TEMPLATE_FULL_CONTENT = "full_content";
044
045 public String getAddToPagePortletId() throws Exception;
046
047 public int getAssetRendererType();
048
049 public String[] getAvailableLocales() throws Exception;
050
051 public String getClassName();
052
053 public long getClassPK();
054
055 public String getDiscussionPath();
056
057 public Date getDisplayDate();
058
059 public long getGroupId();
060
061 public String getIconPath(PortletRequest portletRequest);
062
063 public String getPreviewPath(
064 PortletRequest portletRequest, PortletResponse PortletResponse)
065 throws Exception;
066
067 public String getSearchSummary(Locale locale);
068
069 public String getSummary(Locale locale);
070
071 public String getThumbnailPath(PortletRequest portletRequest)
072 throws Exception;
073
074 public String getTitle(Locale locale);
075
076 public String getURLDownload(ThemeDisplay themeDisplay);
077
078 public PortletURL getURLEdit(
079 LiferayPortletRequest liferayPortletRequest,
080 LiferayPortletResponse liferayPortletResponse)
081 throws Exception;
082
083 public PortletURL getURLEdit(
084 LiferayPortletRequest liferayPortletRequest,
085 LiferayPortletResponse liferayPortletResponse,
086 WindowState windowState, PortletURL redirectURL)
087 throws Exception;
088
089 public PortletURL getURLExport(
090 LiferayPortletRequest liferayPortletRequest,
091 LiferayPortletResponse liferayPortletResponse)
092 throws Exception;
093
094 public String getURLImagePreview(PortletRequest portletRequest)
095 throws Exception;
096
097 public String getUrlTitle();
098
099 public PortletURL getURLView(
100 LiferayPortletResponse liferayPortletResponse,
101 WindowState windowState)
102 throws Exception;
103
104 public String getURLViewInContext(
105 LiferayPortletRequest liferayPortletRequest,
106 LiferayPortletResponse liferayPortletResponse,
107 String noSuchEntryRedirect)
108 throws Exception;
109
110 public long getUserId();
111
112 public String getUserName();
113
114 public String getUuid();
115
116 public String getViewInContextMessage();
117
118 public boolean hasEditPermission(PermissionChecker permissionChecker)
119 throws PortalException, SystemException;
120
121 public boolean hasViewPermission(PermissionChecker permissionChecker)
122 throws PortalException, SystemException;
123
124 public boolean isConvertible();
125
126 public boolean isDisplayable();
127
128 public boolean isLocalizable();
129
130 public boolean isPreviewInContext();
131
132 public boolean isPrintable();
133
134 public String render(
135 RenderRequest renderRequest, RenderResponse renderResponse,
136 String template)
137 throws Exception;
138
139 public void setAddToPagePreferences(
140 PortletPreferences preferences, String portletId,
141 ThemeDisplay themeDisplay)
142 throws Exception;
143
144 }