001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
019 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
020 import com.liferay.portal.security.permission.PermissionChecker;
021 import com.liferay.portal.theme.ThemeDisplay;
022
023 import java.util.Date;
024 import java.util.Locale;
025
026 import javax.portlet.PortletPreferences;
027 import javax.portlet.PortletRequest;
028 import javax.portlet.PortletResponse;
029 import javax.portlet.PortletURL;
030 import javax.portlet.RenderRequest;
031 import javax.portlet.RenderResponse;
032 import javax.portlet.WindowState;
033
034
038 public interface AssetRenderer {
039
040 public static final String TEMPLATE_ABSTRACT = "abstract";
041
042 public static final String TEMPLATE_FULL_CONTENT = "full_content";
043
044 public String getAddToPagePortletId() throws Exception;
045
046 public int getAssetRendererType();
047
048 public String[] getAvailableLanguageIds() throws Exception;
049
050
053 @Deprecated
054 public String[] getAvailableLocales() throws Exception;
055
056 public String getClassName();
057
058 public long getClassPK();
059
060 public DDMFieldReader getDDMFieldReader();
061
062 public String getDiscussionPath();
063
064 public Date getDisplayDate();
065
066 public long getGroupId();
067
068 public String getIconCssClass() throws PortalException;
069
070 public String getIconPath(PortletRequest portletRequest);
071
072 public String getNewName(String oldName, String token);
073
074 public String getPreviewPath(
075 PortletRequest portletRequest, PortletResponse portletResponse)
076 throws Exception;
077
078 public String getSearchSummary(Locale locale);
079
080 public String getSummary();
081
082
086 @Deprecated
087 public String getSummary(Locale locale);
088
089 public String getSummary(
090 PortletRequest portletRequest, PortletResponse portletResponse);
091
092 public String[] getSupportedConversions();
093
094 public String getThumbnailPath(PortletRequest portletRequest)
095 throws Exception;
096
097 public String getTitle(Locale locale);
098
099 public String getURLDownload(ThemeDisplay themeDisplay);
100
101 public PortletURL getURLEdit(
102 LiferayPortletRequest liferayPortletRequest,
103 LiferayPortletResponse liferayPortletResponse)
104 throws Exception;
105
106 public PortletURL getURLEdit(
107 LiferayPortletRequest liferayPortletRequest,
108 LiferayPortletResponse liferayPortletResponse,
109 WindowState windowState, PortletURL redirectURL)
110 throws Exception;
111
112 public PortletURL getURLExport(
113 LiferayPortletRequest liferayPortletRequest,
114 LiferayPortletResponse liferayPortletResponse)
115 throws Exception;
116
117 public String getURLImagePreview(PortletRequest portletRequest)
118 throws Exception;
119
120 public String getUrlTitle();
121
122 public PortletURL getURLView(
123 LiferayPortletResponse liferayPortletResponse,
124 WindowState windowState)
125 throws Exception;
126
127 public PortletURL getURLViewDiffs(
128 LiferayPortletRequest liferayPortletRequest,
129 LiferayPortletResponse liferayPortletResponse)
130 throws Exception;
131
132 public String getURLViewInContext(
133 LiferayPortletRequest liferayPortletRequest,
134 LiferayPortletResponse liferayPortletResponse,
135 String noSuchEntryRedirect)
136 throws Exception;
137
138 public long getUserId();
139
140 public String getUserName();
141
142 public String getUuid();
143
144 public String getViewInContextMessage();
145
146 public boolean hasEditPermission(PermissionChecker permissionChecker)
147 throws PortalException;
148
149 public boolean hasViewPermission(PermissionChecker permissionChecker)
150 throws PortalException;
151
152 public boolean isConvertible();
153
154 public boolean isDisplayable();
155
156 public boolean isLocalizable();
157
158 public boolean isPreviewInContext();
159
160 public boolean isPrintable();
161
162 public String render(
163 RenderRequest renderRequest, RenderResponse renderResponse,
164 String template)
165 throws Exception;
166
167 public void setAddToPagePreferences(
168 PortletPreferences portletPreferences, String portletId,
169 ThemeDisplay themeDisplay)
170 throws Exception;
171
172 }