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 addFolder(long userId,
044 com.liferay.portal.kernel.repository.model.Folder folder,
045 com.liferay.portal.service.ServiceContext serviceContext)
046 throws com.liferay.portal.kernel.exception.PortalException {
047 getService().addFolder(userId, folder, serviceContext);
048 }
049
050 public static void cancelCheckOut(long userId,
051 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
052 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
053 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
054 com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
055 com.liferay.portal.service.ServiceContext serviceContext)
056 throws com.liferay.portal.kernel.exception.PortalException {
057 getService()
058 .cancelCheckOut(userId, fileEntry, sourceFileVersion,
059 destinationFileVersion, draftFileVersion, serviceContext);
060 }
061
062 public static void checkAssetEntry(long userId,
063 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
064 com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
065 throws com.liferay.portal.kernel.exception.PortalException {
066 getService().checkAssetEntry(userId, fileEntry, fileVersion);
067 }
068
069 public static void deleteFileEntry(
070 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
071 throws com.liferay.portal.kernel.exception.PortalException {
072 getService().deleteFileEntry(fileEntry);
073 }
074
075 public static void deleteFolder(
076 com.liferay.portal.kernel.repository.model.Folder folder)
077 throws com.liferay.portal.kernel.exception.PortalException {
078 getService().deleteFolder(folder);
079 }
080
081 public static void deleteRepositoryFileEntries(long repositoryId)
082 throws com.liferay.portal.kernel.exception.PortalException {
083 getService().deleteRepositoryFileEntries(repositoryId);
084 }
085
086
091 public static java.lang.String getBeanIdentifier() {
092 return getService().getBeanIdentifier();
093 }
094
095 public static void getFileAsStream(long userId,
096 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
097 boolean incrementCounter) {
098 getService().getFileAsStream(userId, fileEntry, incrementCounter);
099 }
100
101 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
102 long groupId, long folderId, boolean active, int status) {
103 return getService().getFileShortcuts(groupId, folderId, active, status);
104 }
105
106
110 @Deprecated
111 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
112 long groupId, long folderId, int status) {
113 return getService().getFileShortcuts(groupId, folderId, status);
114 }
115
116 public static int getFileShortcutsCount(long groupId, long folderId,
117 boolean active, int status) {
118 return getService()
119 .getFileShortcutsCount(groupId, folderId, active, status);
120 }
121
122
126 @Deprecated
127 public static int getFileShortcutsCount(long groupId, long folderId,
128 int status) {
129 return getService().getFileShortcutsCount(groupId, folderId, status);
130 }
131
132 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
133 return getService().getNoAssetFileEntries();
134 }
135
136
140 @Deprecated
141 public static void moveDependentsToTrash(
142 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
143 long trashEntryId)
144 throws com.liferay.portal.kernel.exception.PortalException {
145 getService()
146 .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
147 }
148
149 public static void moveDependentsToTrash(
150 com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
151 throws com.liferay.portal.kernel.exception.PortalException {
152 getService().moveDependentsToTrash(dlFolder);
153 }
154
155 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
156 long userId,
157 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
158 long newFolderId,
159 com.liferay.portal.service.ServiceContext serviceContext)
160 throws com.liferay.portal.kernel.exception.PortalException {
161 return getService()
162 .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
163 serviceContext);
164 }
165
166
174 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
175 long userId,
176 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
177 throws com.liferay.portal.kernel.exception.PortalException {
178 return getService().moveFileEntryToTrash(userId, fileEntry);
179 }
180
181 public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
182 long userId,
183 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
184 long newFolderId,
185 com.liferay.portal.service.ServiceContext serviceContext)
186 throws com.liferay.portal.kernel.exception.PortalException {
187 return getService()
188 .moveFileShortcutFromTrash(userId, fileShortcut,
189 newFolderId, serviceContext);
190 }
191
192
200 public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
201 long userId,
202 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
203 throws com.liferay.portal.kernel.exception.PortalException {
204 return getService().moveFileShortcutToTrash(userId, fileShortcut);
205 }
206
207 public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
208 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
209 long parentFolderId,
210 com.liferay.portal.service.ServiceContext serviceContext)
211 throws com.liferay.portal.kernel.exception.PortalException {
212 return getService()
213 .moveFolderFromTrash(userId, folder, parentFolderId,
214 serviceContext);
215 }
216
217
225 public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
226 long userId, com.liferay.portal.kernel.repository.model.Folder folder)
227 throws com.liferay.portal.kernel.exception.PortalException {
228 return getService().moveFolderToTrash(userId, folder);
229 }
230
231
235 @Deprecated
236 public static void restoreDependentsFromTrash(
237 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
238 throws com.liferay.portal.kernel.exception.PortalException {
239 getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
240 }
241
242
246 @Deprecated
247 public static void restoreDependentsFromTrash(
248 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
249 long trashEntryId)
250 throws com.liferay.portal.kernel.exception.PortalException {
251 getService()
252 .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
253 }
254
255 public static void restoreDependentsFromTrash(
256 com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
257 throws com.liferay.portal.kernel.exception.PortalException {
258 getService().restoreDependentsFromTrash(dlFolder);
259 }
260
261 public static void restoreFileEntryFromTrash(long userId,
262 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
263 throws com.liferay.portal.kernel.exception.PortalException {
264 getService().restoreFileEntryFromTrash(userId, fileEntry);
265 }
266
267 public static void restoreFileShortcutFromTrash(long userId,
268 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
269 throws com.liferay.portal.kernel.exception.PortalException {
270 getService().restoreFileShortcutFromTrash(userId, fileShortcut);
271 }
272
273 public static void restoreFolderFromTrash(long userId,
274 com.liferay.portal.kernel.repository.model.Folder folder)
275 throws com.liferay.portal.kernel.exception.PortalException {
276 getService().restoreFolderFromTrash(userId, folder);
277 }
278
279
284 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
285 getService().setBeanIdentifier(beanIdentifier);
286 }
287
288 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
289 long userId,
290 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
291 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
292 long[] assetCategoryIds, java.lang.String[] assetTagNames,
293 long[] assetLinkEntryIds)
294 throws com.liferay.portal.kernel.exception.PortalException {
295 return getService()
296 .updateAsset(userId, fileEntry, fileVersion,
297 assetCategoryIds, assetTagNames, assetLinkEntryIds);
298 }
299
300 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
301 long userId,
302 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
303 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
304 long assetClassPk)
305 throws com.liferay.portal.kernel.exception.PortalException {
306 return getService()
307 .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
308 }
309
310 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
311 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
312 long[] assetCategoryIds, java.lang.String[] assetTagNames,
313 long[] assetLinkEntryIds)
314 throws com.liferay.portal.kernel.exception.PortalException {
315 return getService()
316 .updateAsset(userId, folder, assetCategoryIds,
317 assetTagNames, assetLinkEntryIds);
318 }
319
320 public static void updateFileEntry(long userId,
321 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
322 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
323 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
324 long assetClassPk)
325 throws com.liferay.portal.kernel.exception.PortalException {
326 getService()
327 .updateFileEntry(userId, fileEntry, sourceFileVersion,
328 destinationFileVersion, assetClassPk);
329 }
330
331 public static void updateFileEntry(long userId,
332 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
333 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
334 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
335 com.liferay.portal.service.ServiceContext serviceContext)
336 throws com.liferay.portal.kernel.exception.PortalException {
337 getService()
338 .updateFileEntry(userId, fileEntry, sourceFileVersion,
339 destinationFileVersion, serviceContext);
340 }
341
342 public static void updateFolder(long userId,
343 com.liferay.portal.kernel.repository.model.Folder folder,
344 com.liferay.portal.service.ServiceContext serviceContext)
345 throws com.liferay.portal.kernel.exception.PortalException {
346 getService().updateFolder(userId, folder, serviceContext);
347 }
348
349 public static void updateStatus(long userId,
350 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
351 com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
352 int oldStatus, int newStatus,
353 com.liferay.portal.service.ServiceContext serviceContext,
354 java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
355 throws com.liferay.portal.kernel.exception.PortalException {
356 getService()
357 .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
358 newStatus, serviceContext, workflowContext);
359 }
360
361 public static DLAppHelperLocalService getService() {
362 if (_service == null) {
363 _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
364
365 ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
366 "_service");
367 }
368
369 return _service;
370 }
371
372
375 @Deprecated
376 public void setService(DLAppHelperLocalService service) {
377 }
378
379 private static DLAppHelperLocalService _service;
380 }