001
014
015 package com.liferay.portlet.documentlibrary.util;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
020 import com.liferay.portal.kernel.repository.model.FileEntry;
021 import com.liferay.portal.kernel.repository.model.FileVersion;
022 import com.liferay.portal.kernel.repository.model.Folder;
023 import com.liferay.portal.kernel.search.Hits;
024 import com.liferay.portal.kernel.util.OrderByComparator;
025 import com.liferay.portal.kernel.util.StringPool;
026 import com.liferay.portal.theme.ThemeDisplay;
027 import com.liferay.portlet.documentlibrary.model.DLFileEntryType;
028 import com.liferay.portlet.documentlibrary.model.DLFileShortcut;
029
030 import java.util.List;
031 import java.util.Locale;
032 import java.util.Map;
033 import java.util.Set;
034
035 import javax.portlet.PortletPreferences;
036 import javax.portlet.PortletRequest;
037 import javax.portlet.PortletURL;
038 import javax.portlet.RenderResponse;
039
040 import javax.servlet.http.HttpServletRequest;
041
042
045 public interface DL {
046
047 public static final String MANUAL_CHECK_IN_REQUIRED =
048 "manualCheckInRequired";
049
050 public static final String MANUAL_CHECK_IN_REQUIRED_PATH =
051 StringPool.SLASH + MANUAL_CHECK_IN_REQUIRED;
052
053 public static final String OFFICE_EXTENSION = "officeExtension";
054
055 public static final String OFFICE_EXTENSION_PATH =
056 StringPool.SLASH + OFFICE_EXTENSION;
057
058 public static final String WEBDAV_CHECK_IN_MODE = "webDAVCheckInMode";
059
060 public void addPortletBreadcrumbEntries(
061 DLFileShortcut dlFileShortcut, HttpServletRequest request,
062 RenderResponse renderResponse)
063 throws Exception;
064
065 public void addPortletBreadcrumbEntries(
066 FileEntry fileEntry, HttpServletRequest request,
067 RenderResponse renderResponse)
068 throws Exception;
069
070 public void addPortletBreadcrumbEntries(
071 Folder folder, HttpServletRequest request,
072 LiferayPortletResponse liferayPortletResponse)
073 throws Exception;
074
075 public void addPortletBreadcrumbEntries(
076 Folder folder, HttpServletRequest request, PortletURL portletURL)
077 throws Exception;
078
079 public void addPortletBreadcrumbEntries(
080 Folder folder, HttpServletRequest request,
081 RenderResponse renderResponse)
082 throws Exception;
083
084 public void addPortletBreadcrumbEntries(
085 long folderId, HttpServletRequest request,
086 RenderResponse renderResponse)
087 throws Exception;
088
089 public int compareVersions(String version1, String version2);
090
091 public String getAbsolutePath(PortletRequest portletRequest, long folderId)
092 throws PortalException, SystemException;
093
094 public Set<String> getAllMediaGalleryMimeTypes();
095
096 public String getDDMStructureKey(DLFileEntryType dlFileEntryType);
097
098 public String getDDMStructureKey(String fileEntryTypeUuid);
099
100 public String getDeprecatedDDMStructureKey(DLFileEntryType dlFileEntryType);
101
102 public String getDeprecatedDDMStructureKey(long fileEntryTypeId);
103
104 public String getDividedPath(long id);
105
106 public String getDLControlPanelLink(
107 PortletRequest portletRequest, long folderId)
108 throws PortalException, SystemException;
109
110 public Map<Locale, String> getEmailFileEntryAddedBodyMap(
111 PortletPreferences preferences);
112
113 public boolean getEmailFileEntryAddedEnabled(
114 PortletPreferences preferences);
115
116 public Map<Locale, String> getEmailFileEntryAddedSubjectMap(
117 PortletPreferences preferences);
118
119 public Map<Locale, String> getEmailFileEntryUpdatedBodyMap(
120 PortletPreferences preferences);
121
122 public boolean getEmailFileEntryUpdatedEnabled(
123 PortletPreferences preferences);
124
125 public Map<Locale, String> getEmailFileEntryUpdatedSubjectMap(
126 PortletPreferences preferences);
127
128 public String getEmailFromAddress(
129 PortletPreferences preferences, long companyId)
130 throws SystemException;
131
132 public String getEmailFromName(
133 PortletPreferences preferences, long companyId)
134 throws SystemException;
135
136 public List<Object> getEntries(Hits hits);
137
138 public String getFileEntryImage(
139 FileEntry fileEntry, ThemeDisplay themeDisplay);
140
141 public Set<Long> getFileEntryTypeSubscriptionClassPKs(long userId)
142 throws SystemException;
143
144 public String getFileIcon(String extension);
145
146 public String getGenericName(String extension);
147
148 public String getImagePreviewURL(
149 FileEntry fileEntry, FileVersion fileVersion,
150 ThemeDisplay themeDisplay)
151 throws Exception;
152
153 public String getImagePreviewURL(
154 FileEntry fileEntry, ThemeDisplay themeDisplay)
155 throws Exception;
156
157 public String[] getMediaGalleryMimeTypes(
158 PortletPreferences portletPreferences, PortletRequest portletRequest);
159
160 public String getPreviewURL(
161 FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay,
162 String queryString);
163
164
168 public String getPreviewURL(
169 FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay,
170 String queryString, boolean appendToken);
171
172 public String getPreviewURL(
173 FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay,
174 String queryString, boolean appendVersion, boolean absoluteURL);
175
176 public OrderByComparator getRepositoryModelOrderByComparator(
177 String orderByCol, String orderByType);
178
179 public String getTempFileId(long id, String version);
180
181 public String getTempFileId(long id, String version, String languageId);
182
183 public String getThumbnailSrc(
184 FileEntry fileEntry, DLFileShortcut dlFileShortcut,
185 ThemeDisplay themeDisplay)
186 throws Exception;
187
188 public String getThumbnailSrc(
189 FileEntry fileEntry, FileVersion fileVersion,
190 DLFileShortcut dlFileShortcut, ThemeDisplay themeDisplay)
191 throws Exception;
192
193 public String getThumbnailStyle() throws Exception;
194
195 public String getThumbnailStyle(boolean max, int margin)
196 throws Exception;
197
198 public String getTitleWithExtension(FileEntry fileEntry);
199
200 public String getTitleWithExtension(String title, String extension);
201
202 public String getWebDavURL(
203 ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry)
204 throws PortalException, SystemException;
205
206 public String getWebDavURL(
207 ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry,
208 boolean manualCheckInRequired)
209 throws PortalException, SystemException;
210
211 public String getWebDavURL(
212 ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry,
213 boolean manualCheckInRequired, boolean officeExtensionRequired)
214 throws PortalException, SystemException;
215
216 public boolean hasWorkflowDefinitionLink(
217 long companyId, long groupId, long folderId, long fileEntryTypeId)
218 throws Exception;
219
220 public boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(
221 String ddmStructureKey);
222
223 public abstract boolean isOfficeExtension(String extension);
224
225 public boolean isSubscribedToFileEntryType(
226 long companyId, long groupId, long userId, long fileEntryTypeId)
227 throws SystemException;
228
229 public boolean isSubscribedToFolder(
230 long companyId, long groupId, long userId, long folderId)
231 throws PortalException, SystemException;
232
233 public boolean isSubscribedToFolder(
234 long companyId, long groupId, long userId, long folderId,
235 boolean recursive)
236 throws PortalException, SystemException;
237
238 }