001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class DLAppHelperLocalServiceUtil {
038
043 public static void addFileEntry(long userId,
044 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
045 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
046 com.liferay.portal.service.ServiceContext serviceContext)
047 throws com.liferay.portal.kernel.exception.PortalException {
048 getService().addFileEntry(userId, fileEntry, fileVersion, serviceContext);
049 }
050
051 public static void addFolder(long userId,
052 com.liferay.portal.kernel.repository.model.Folder folder,
053 com.liferay.portal.service.ServiceContext serviceContext)
054 throws com.liferay.portal.kernel.exception.PortalException {
055 getService().addFolder(userId, folder, serviceContext);
056 }
057
058 public static void cancelCheckOut(long userId,
059 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
060 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
061 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
062 com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException {
065 getService()
066 .cancelCheckOut(userId, fileEntry, sourceFileVersion,
067 destinationFileVersion, draftFileVersion, serviceContext);
068 }
069
070 public static void checkAssetEntry(long userId,
071 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
072 com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
073 throws com.liferay.portal.kernel.exception.PortalException {
074 getService().checkAssetEntry(userId, fileEntry, fileVersion);
075 }
076
077 public static void deleteFileEntry(
078 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
079 throws com.liferay.portal.kernel.exception.PortalException {
080 getService().deleteFileEntry(fileEntry);
081 }
082
083 public static void deleteFolder(
084 com.liferay.portal.kernel.repository.model.Folder folder)
085 throws com.liferay.portal.kernel.exception.PortalException {
086 getService().deleteFolder(folder);
087 }
088
089 public static void deleteRepositoryFileEntries(long repositoryId)
090 throws com.liferay.portal.kernel.exception.PortalException {
091 getService().deleteRepositoryFileEntries(repositoryId);
092 }
093
094
099 public static java.lang.String getBeanIdentifier() {
100 return getService().getBeanIdentifier();
101 }
102
103 public static void getFileAsStream(long userId,
104 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
105 boolean incrementCounter) {
106 getService().getFileAsStream(userId, fileEntry, incrementCounter);
107 }
108
109 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
110 long groupId, long folderId, boolean active, int status) {
111 return getService().getFileShortcuts(groupId, folderId, active, status);
112 }
113
114
118 @Deprecated
119 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
120 long groupId, long folderId, int status) {
121 return getService().getFileShortcuts(groupId, folderId, status);
122 }
123
124 public static int getFileShortcutsCount(long groupId, long folderId,
125 boolean active, int status) {
126 return getService()
127 .getFileShortcutsCount(groupId, folderId, active, status);
128 }
129
130
134 @Deprecated
135 public static int getFileShortcutsCount(long groupId, long folderId,
136 int status) {
137 return getService().getFileShortcutsCount(groupId, folderId, status);
138 }
139
140 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
141 return getService().getNoAssetFileEntries();
142 }
143
144 public static void moveDependentsToTrash(
145 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
146 long trashEntryId)
147 throws com.liferay.portal.kernel.exception.PortalException {
148 getService()
149 .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
150 }
151
152 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
153 long userId,
154 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
155 long newFolderId,
156 com.liferay.portal.service.ServiceContext serviceContext)
157 throws com.liferay.portal.kernel.exception.PortalException {
158 return getService()
159 .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
160 serviceContext);
161 }
162
163
171 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
172 long userId,
173 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
174 throws com.liferay.portal.kernel.exception.PortalException {
175 return getService().moveFileEntryToTrash(userId, fileEntry);
176 }
177
178 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutFromTrash(
179 long userId,
180 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
181 long newFolderId,
182 com.liferay.portal.service.ServiceContext serviceContext)
183 throws com.liferay.portal.kernel.exception.PortalException {
184 return getService()
185 .moveFileShortcutFromTrash(userId, dlFileShortcut,
186 newFolderId, serviceContext);
187 }
188
189
197 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutToTrash(
198 long userId,
199 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
200 throws com.liferay.portal.kernel.exception.PortalException {
201 return getService().moveFileShortcutToTrash(userId, dlFileShortcut);
202 }
203
204 public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
205 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
206 long parentFolderId,
207 com.liferay.portal.service.ServiceContext serviceContext)
208 throws com.liferay.portal.kernel.exception.PortalException {
209 return getService()
210 .moveFolderFromTrash(userId, folder, parentFolderId,
211 serviceContext);
212 }
213
214
222 public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
223 long userId, com.liferay.portal.kernel.repository.model.Folder folder)
224 throws com.liferay.portal.kernel.exception.PortalException {
225 return getService().moveFolderToTrash(userId, folder);
226 }
227
228 public static void restoreDependentsFromTrash(
229 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
230 throws com.liferay.portal.kernel.exception.PortalException {
231 getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
232 }
233
234
238 @Deprecated
239 public static void restoreDependentsFromTrash(
240 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
241 long trashEntryId)
242 throws com.liferay.portal.kernel.exception.PortalException {
243 getService()
244 .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
245 }
246
247 public static void restoreFileEntryFromTrash(long userId,
248 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
249 throws com.liferay.portal.kernel.exception.PortalException {
250 getService().restoreFileEntryFromTrash(userId, fileEntry);
251 }
252
253 public static void restoreFileShortcutFromTrash(long userId,
254 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
255 throws com.liferay.portal.kernel.exception.PortalException {
256 getService().restoreFileShortcutFromTrash(userId, dlFileShortcut);
257 }
258
259 public static void restoreFolderFromTrash(long userId,
260 com.liferay.portal.kernel.repository.model.Folder folder)
261 throws com.liferay.portal.kernel.exception.PortalException {
262 getService().restoreFolderFromTrash(userId, folder);
263 }
264
265
270 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
271 getService().setBeanIdentifier(beanIdentifier);
272 }
273
274 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
275 long userId,
276 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
277 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
278 long[] assetCategoryIds, java.lang.String[] assetTagNames,
279 long[] assetLinkEntryIds)
280 throws com.liferay.portal.kernel.exception.PortalException {
281 return getService()
282 .updateAsset(userId, fileEntry, fileVersion,
283 assetCategoryIds, assetTagNames, assetLinkEntryIds);
284 }
285
286 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
287 long userId,
288 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
289 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
290 long assetClassPk)
291 throws com.liferay.portal.kernel.exception.PortalException {
292 return getService()
293 .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
294 }
295
296 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
297 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
298 long[] assetCategoryIds, java.lang.String[] assetTagNames,
299 long[] assetLinkEntryIds)
300 throws com.liferay.portal.kernel.exception.PortalException {
301 return getService()
302 .updateAsset(userId, folder, assetCategoryIds,
303 assetTagNames, assetLinkEntryIds);
304 }
305
306 public static void updateFileEntry(long userId,
307 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
308 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
309 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
310 long assetClassPk)
311 throws com.liferay.portal.kernel.exception.PortalException {
312 getService()
313 .updateFileEntry(userId, fileEntry, sourceFileVersion,
314 destinationFileVersion, assetClassPk);
315 }
316
317 public static void updateFileEntry(long userId,
318 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
319 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
320 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
321 com.liferay.portal.service.ServiceContext serviceContext)
322 throws com.liferay.portal.kernel.exception.PortalException {
323 getService()
324 .updateFileEntry(userId, fileEntry, sourceFileVersion,
325 destinationFileVersion, serviceContext);
326 }
327
328 public static void updateFolder(long userId,
329 com.liferay.portal.kernel.repository.model.Folder folder,
330 com.liferay.portal.service.ServiceContext serviceContext)
331 throws com.liferay.portal.kernel.exception.PortalException {
332 getService().updateFolder(userId, folder, serviceContext);
333 }
334
335 public static void updateStatus(long userId,
336 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
337 com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
338 int oldStatus, int newStatus,
339 com.liferay.portal.service.ServiceContext serviceContext,
340 java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
341 throws com.liferay.portal.kernel.exception.PortalException {
342 getService()
343 .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
344 newStatus, serviceContext, workflowContext);
345 }
346
347 public static DLAppHelperLocalService getService() {
348 if (_service == null) {
349 _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
350
351 ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
352 "_service");
353 }
354
355 return _service;
356 }
357
358
361 @Deprecated
362 public void setService(DLAppHelperLocalService service) {
363 }
364
365 private static DLAppHelperLocalService _service;
366 }