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