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 public static void moveDependentsToTrash(
137 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
138 long trashEntryId)
139 throws com.liferay.portal.kernel.exception.PortalException {
140 getService()
141 .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
142 }
143
144 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
145 long userId,
146 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
147 long newFolderId,
148 com.liferay.portal.service.ServiceContext serviceContext)
149 throws com.liferay.portal.kernel.exception.PortalException {
150 return getService()
151 .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
152 serviceContext);
153 }
154
155
163 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
164 long userId,
165 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
166 throws com.liferay.portal.kernel.exception.PortalException {
167 return getService().moveFileEntryToTrash(userId, fileEntry);
168 }
169
170 public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
171 long userId,
172 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
173 long newFolderId,
174 com.liferay.portal.service.ServiceContext serviceContext)
175 throws com.liferay.portal.kernel.exception.PortalException {
176 return getService()
177 .moveFileShortcutFromTrash(userId, fileShortcut,
178 newFolderId, serviceContext);
179 }
180
181
189 public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
190 long userId,
191 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
192 throws com.liferay.portal.kernel.exception.PortalException {
193 return getService().moveFileShortcutToTrash(userId, fileShortcut);
194 }
195
196 public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
197 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
198 long parentFolderId,
199 com.liferay.portal.service.ServiceContext serviceContext)
200 throws com.liferay.portal.kernel.exception.PortalException {
201 return getService()
202 .moveFolderFromTrash(userId, folder, parentFolderId,
203 serviceContext);
204 }
205
206
214 public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
215 long userId, com.liferay.portal.kernel.repository.model.Folder folder)
216 throws com.liferay.portal.kernel.exception.PortalException {
217 return getService().moveFolderToTrash(userId, folder);
218 }
219
220 public static void restoreDependentsFromTrash(
221 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
222 throws com.liferay.portal.kernel.exception.PortalException {
223 getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
224 }
225
226
230 @Deprecated
231 public static void restoreDependentsFromTrash(
232 java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
233 long trashEntryId)
234 throws com.liferay.portal.kernel.exception.PortalException {
235 getService()
236 .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
237 }
238
239 public static void restoreFileEntryFromTrash(long userId,
240 com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
241 throws com.liferay.portal.kernel.exception.PortalException {
242 getService().restoreFileEntryFromTrash(userId, fileEntry);
243 }
244
245 public static void restoreFileShortcutFromTrash(long userId,
246 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
247 throws com.liferay.portal.kernel.exception.PortalException {
248 getService().restoreFileShortcutFromTrash(userId, fileShortcut);
249 }
250
251 public static void restoreFolderFromTrash(long userId,
252 com.liferay.portal.kernel.repository.model.Folder folder)
253 throws com.liferay.portal.kernel.exception.PortalException {
254 getService().restoreFolderFromTrash(userId, folder);
255 }
256
257
262 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
263 getService().setBeanIdentifier(beanIdentifier);
264 }
265
266 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
267 long userId,
268 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
269 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
270 long[] assetCategoryIds, java.lang.String[] assetTagNames,
271 long[] assetLinkEntryIds)
272 throws com.liferay.portal.kernel.exception.PortalException {
273 return getService()
274 .updateAsset(userId, fileEntry, fileVersion,
275 assetCategoryIds, assetTagNames, assetLinkEntryIds);
276 }
277
278 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
279 long userId,
280 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
281 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
282 long assetClassPk)
283 throws com.liferay.portal.kernel.exception.PortalException {
284 return getService()
285 .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
286 }
287
288 public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
289 long userId, com.liferay.portal.kernel.repository.model.Folder folder,
290 long[] assetCategoryIds, java.lang.String[] assetTagNames,
291 long[] assetLinkEntryIds)
292 throws com.liferay.portal.kernel.exception.PortalException {
293 return getService()
294 .updateAsset(userId, folder, assetCategoryIds,
295 assetTagNames, assetLinkEntryIds);
296 }
297
298 public static void updateFileEntry(long userId,
299 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
300 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
301 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
302 long assetClassPk)
303 throws com.liferay.portal.kernel.exception.PortalException {
304 getService()
305 .updateFileEntry(userId, fileEntry, sourceFileVersion,
306 destinationFileVersion, assetClassPk);
307 }
308
309 public static void updateFileEntry(long userId,
310 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
311 com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
312 com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
313 com.liferay.portal.service.ServiceContext serviceContext)
314 throws com.liferay.portal.kernel.exception.PortalException {
315 getService()
316 .updateFileEntry(userId, fileEntry, sourceFileVersion,
317 destinationFileVersion, serviceContext);
318 }
319
320 public static void updateFolder(long userId,
321 com.liferay.portal.kernel.repository.model.Folder folder,
322 com.liferay.portal.service.ServiceContext serviceContext)
323 throws com.liferay.portal.kernel.exception.PortalException {
324 getService().updateFolder(userId, folder, serviceContext);
325 }
326
327 public static void updateStatus(long userId,
328 com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
329 com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
330 int oldStatus, int newStatus,
331 com.liferay.portal.service.ServiceContext serviceContext,
332 java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
333 throws com.liferay.portal.kernel.exception.PortalException {
334 getService()
335 .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
336 newStatus, serviceContext, workflowContext);
337 }
338
339 public static DLAppHelperLocalService getService() {
340 if (_service == null) {
341 _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
342
343 ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
344 "_service");
345 }
346
347 return _service;
348 }
349
350
353 @Deprecated
354 public void setService(DLAppHelperLocalService service) {
355 }
356
357 private static DLAppHelperLocalService _service;
358 }