001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the d l app local service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see DLAppLocalService
029     * @see com.liferay.portlet.documentlibrary.service.base.DLAppLocalServiceBaseImpl
030     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl
031     * @generated
032     */
033    public class DLAppLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            /**
059            * Adds a file entry and associated metadata based on a byte array.
060            *
061            * <p>
062            * This method takes two file names, the <code>sourceFileName</code> and the
063            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
064            * name of the actual file being uploaded. The <code>title</code>
065            * corresponds to a name the client wishes to assign this file after it has
066            * been uploaded to the portal. If it is <code>null</code>, the <code>
067            * sourceFileName</code> will be used.
068            * </p>
069            *
070            * @param userId the primary key of the file entry's creator/owner
071            * @param repositoryId the primary key of the file entry's repository
072            * @param folderId the primary key of the file entry's parent folder
073            * @param sourceFileName the original file's name
074            * @param mimeType the file's MIME type
075            * @param title the name to be assigned to the file (optionally <code>null
076            </code>)
077            * @param description the file's description
078            * @param changeLog the file's version change log
079            * @param bytes the file's data (optionally <code>null</code>)
080            * @param serviceContext the service context to be applied. Can set the
081            asset category IDs, asset tag names, and expando bridge
082            attributes for the file entry. In a Liferay repository, it may
083            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
084            type </li> <li> fieldsMap - mapping for fields associated with a
085            custom file entry type </li> </ul>
086            * @return the file entry
087            * @throws PortalException if the parent folder could not be found or if the
088            file entry's information was invalid
089            * @throws SystemException if a system exception occurred
090            */
091            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
092                    long userId, long repositoryId, long folderId,
093                    java.lang.String sourceFileName, java.lang.String mimeType,
094                    java.lang.String title, java.lang.String description,
095                    java.lang.String changeLog, byte[] bytes,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .addFileEntry(userId, repositoryId, folderId,
101                            sourceFileName, mimeType, title, description, changeLog, bytes,
102                            serviceContext);
103            }
104    
105            /**
106            * Adds a file entry and associated metadata based on a {@link java.io.File}
107            * object.
108            *
109            * <p>
110            * This method takes two file names, the <code>sourceFileName</code> and the
111            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
112            * name of the actual file being uploaded. The <code>title</code>
113            * corresponds to a name the client wishes to assign this file after it has
114            * been uploaded to the portal. If it is <code>null</code>, the <code>
115            * sourceFileName</code> will be used.
116            * </p>
117            *
118            * @param userId the primary key of the file entry's creator/owner
119            * @param repositoryId the primary key of the repository
120            * @param folderId the primary key of the file entry's parent folder
121            * @param sourceFileName the original file's name
122            * @param mimeType the file's MIME type
123            * @param title the name to be assigned to the file (optionally <code>null
124            </code>)
125            * @param description the file's description
126            * @param changeLog the file's version change log
127            * @param file the file's data (optionally <code>null</code>)
128            * @param serviceContext the service context to be applied. Can set the
129            asset category IDs, asset tag names, and expando bridge
130            attributes for the file entry. In a Liferay repository, it may
131            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
132            type </li> <li> fieldsMap - mapping for fields associated with a
133            custom file entry type </li> </ul>
134            * @return the file entry
135            * @throws PortalException if the parent folder could not be found or if the
136            file entry's information was invalid
137            * @throws SystemException if a system exception occurred
138            */
139            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
140                    long userId, long repositoryId, long folderId,
141                    java.lang.String sourceFileName, java.lang.String mimeType,
142                    java.lang.String title, java.lang.String description,
143                    java.lang.String changeLog, java.io.File file,
144                    com.liferay.portal.service.ServiceContext serviceContext)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    return getService()
148                                       .addFileEntry(userId, repositoryId, folderId,
149                            sourceFileName, mimeType, title, description, changeLog, file,
150                            serviceContext);
151            }
152    
153            /**
154            * Adds a file entry and associated metadata based on an {@link
155            * java.io.InputStream} object.
156            *
157            * <p>
158            * This method takes two file names, the <code>sourceFileName</code> and the
159            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
160            * name of the actual file being uploaded. The <code>title</code>
161            * corresponds to a name the client wishes to assign this file after it has
162            * been uploaded to the portal. If it is <code>null</code>, the <code>
163            * sourceFileName</code> will be used.
164            * </p>
165            *
166            * @param userId the primary key of the file entry's creator/owner
167            * @param repositoryId the primary key of the repository
168            * @param folderId the primary key of the file entry's parent folder
169            * @param sourceFileName the original file's name
170            * @param mimeType the file's MIME type
171            * @param title the name to be assigned to the file (optionally <code>null
172            </code>)
173            * @param description the file's description
174            * @param changeLog the file's version change log
175            * @param is the file's data (optionally <code>null</code>)
176            * @param size the file's size (optionally <code>0</code>)
177            * @param serviceContext the service context to be applied. Can set the
178            asset category IDs, asset tag names, and expando bridge
179            attributes for the file entry. In a Liferay repository, it may
180            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
181            type </li> <li> fieldsMap - mapping for fields associated with a
182            custom file entry type </li> </ul>
183            * @return the file entry
184            * @throws PortalException if the parent folder could not be found or if the
185            file entry's information was invalid
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry(
189                    long userId, long repositoryId, long folderId,
190                    java.lang.String sourceFileName, java.lang.String mimeType,
191                    java.lang.String title, java.lang.String description,
192                    java.lang.String changeLog, java.io.InputStream is, long size,
193                    com.liferay.portal.service.ServiceContext serviceContext)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService()
197                                       .addFileEntry(userId, repositoryId, folderId,
198                            sourceFileName, mimeType, title, description, changeLog, is, size,
199                            serviceContext);
200            }
201    
202            /**
203            * Adds the file rank to the existing file entry. This method is only
204            * supported by the Liferay repository.
205            *
206            * @param repositoryId the primary key of the repository
207            * @param companyId the primary key of the company
208            * @param userId the primary key of the file rank's creator/owner
209            * @param fileEntryId the primary key of the file entry
210            * @param serviceContext the service context to be applied
211            * @return the file rank
212            * @throws PortalException if a portal exception occurred
213            * @throws SystemException if a system exception occurred
214            */
215            public static com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
216                    long repositoryId, long companyId, long userId, long fileEntryId,
217                    com.liferay.portal.service.ServiceContext serviceContext)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getService()
221                                       .addFileRank(repositoryId, companyId, userId, fileEntryId,
222                            serviceContext);
223            }
224    
225            /**
226            * Adds the file shortcut to the existing file entry. This method is only
227            * supported by the Liferay repository.
228            *
229            * @param userId the primary key of the file shortcut's creator/owner
230            * @param repositoryId the primary key of the repository
231            * @param folderId the primary key of the file shortcut's parent folder
232            * @param toFileEntryId the primary key of the file entry to point to
233            * @param serviceContext the service context to be applied. Can set the
234            asset category IDs, asset tag names, and expando bridge
235            attributes for the file entry.
236            * @return the file shortcut
237            * @throws PortalException if the parent folder or file entry could not be
238            found, or if the file shortcut's information was invalid
239            * @throws SystemException if a system exception occurred
240            */
241            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
242                    long userId, long repositoryId, long folderId, long toFileEntryId,
243                    com.liferay.portal.service.ServiceContext serviceContext)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return getService()
247                                       .addFileShortcut(userId, repositoryId, folderId,
248                            toFileEntryId, serviceContext);
249            }
250    
251            /**
252            * Adds a folder.
253            *
254            * @param userId the primary key of the folder's creator/owner
255            * @param repositoryId the primary key of the repository
256            * @param parentFolderId the primary key of the folder's parent folder
257            * @param name the folder's name
258            * @param description the folder's description
259            * @param serviceContext the service context to be applied. In a Liferay
260            repository, it may include mountPoint which is a boolean
261            specifying whether the folder is a facade for mounting a
262            third-party repository
263            * @return the folder
264            * @throws PortalException if the parent folder could not be found or if the
265            new folder's information was invalid
266            * @throws SystemException if a system exception occurred
267            */
268            public static com.liferay.portal.kernel.repository.model.Folder addFolder(
269                    long userId, long repositoryId, long parentFolderId,
270                    java.lang.String name, java.lang.String description,
271                    com.liferay.portal.service.ServiceContext serviceContext)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException {
274                    return getService()
275                                       .addFolder(userId, repositoryId, parentFolderId, name,
276                            description, serviceContext);
277            }
278    
279            /**
280            * Delete all data associated to the given repository. This method is only
281            * supported by the Liferay repository.
282            *
283            * @param repositoryId the primary key of the data's repository
284            * @throws PortalException if the repository could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static void deleteAll(long repositoryId)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    getService().deleteAll(repositoryId);
291            }
292    
293            /**
294            * Deletes the file entry.
295            *
296            * @param fileEntryId the primary key of the file entry
297            * @throws PortalException if the file entry could not be found
298            * @throws SystemException if a system exception occurred
299            */
300            public static void deleteFileEntry(long fileEntryId)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    getService().deleteFileEntry(fileEntryId);
304            }
305    
306            /**
307            * Deletes the file ranks associated to a given file entry. This method is
308            * only supported by the Liferay repository.
309            *
310            * @param fileEntryId the primary key of the file entry
311            * @throws SystemException if a system exception occurred
312            */
313            public static void deleteFileRanksByFileEntryId(long fileEntryId)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    getService().deleteFileRanksByFileEntryId(fileEntryId);
316            }
317    
318            /**
319            * Deletes the file ranks associated to a given user. This method is only
320            * supported by the Liferay repository.
321            *
322            * @param userId the primary key of the user
323            * @throws SystemException if a system exception occurred
324            */
325            public static void deleteFileRanksByUserId(long userId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    getService().deleteFileRanksByUserId(userId);
328            }
329    
330            /**
331            * Deletes the file shortcut. This method is only supported by the Liferay
332            * repository.
333            *
334            * @param dlFileShortcut the file shortcut
335            * @throws PortalException if the file shortcut could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public static void deleteFileShortcut(
339                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    getService().deleteFileShortcut(dlFileShortcut);
343            }
344    
345            /**
346            * Deletes the file shortcut. This method is only supported by the Liferay
347            * repository.
348            *
349            * @param fileShortcutId the primary key of the file shortcut
350            * @throws PortalException if the file shortcut could not be found
351            * @throws SystemException if a system exception occurred
352            */
353            public static void deleteFileShortcut(long fileShortcutId)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    getService().deleteFileShortcut(fileShortcutId);
357            }
358    
359            /**
360            * Deletes all file shortcuts associated to the file entry. This method is
361            * only supported by the Liferay repository.
362            *
363            * @param toFileEntryId the primary key of the associated file entry
364            * @throws PortalException if the file shortcut for the file entry could not
365            be found
366            * @throws SystemException if a system exception occurred
367            */
368            public static void deleteFileShortcuts(long toFileEntryId)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    getService().deleteFileShortcuts(toFileEntryId);
372            }
373    
374            /**
375            * Deletes the folder and all of its subfolders and file entries.
376            *
377            * @param folderId the primary key of the folder
378            * @throws PortalException if the folder could not be found
379            * @throws SystemException if a system exception occurred
380            */
381            public static void deleteFolder(long folderId)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    getService().deleteFolder(folderId);
385            }
386    
387            /**
388            * Returns the file entry with the primary key.
389            *
390            * @param fileEntryId the primary key of the file entry
391            * @return the file entry with the primary key
392            * @throws PortalException if the file entry could not be found
393            * @throws SystemException if a system exception occurred
394            */
395            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
396                    long fileEntryId)
397                    throws com.liferay.portal.kernel.exception.PortalException,
398                            com.liferay.portal.kernel.exception.SystemException {
399                    return getService().getFileEntry(fileEntryId);
400            }
401    
402            /**
403            * Returns the file entry with the title in the folder.
404            *
405            * @param groupId the primary key of the file entry's group
406            * @param folderId the primary key of the file entry's folder
407            * @param title the file entry's title
408            * @return the file entry with the title in the folder
409            * @throws PortalException if the file entry could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry(
413                    long groupId, long folderId, java.lang.String title)
414                    throws com.liferay.portal.kernel.exception.PortalException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    return getService().getFileEntry(groupId, folderId, title);
417            }
418    
419            /**
420            * Returns the file entry with the UUID and group.
421            *
422            * @param uuid the file entry's UUID
423            * @param groupId the primary key of the file entry's group
424            * @return the file entry with the UUID and group
425            * @throws PortalException if the file entry could not be found
426            * @throws SystemException if a system exception occurred
427            */
428            public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId(
429                    java.lang.String uuid, long groupId)
430                    throws com.liferay.portal.kernel.exception.PortalException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
433            }
434    
435            /**
436            * Returns the file ranks from the user. This method is only supported by
437            * the Liferay repository.
438            *
439            * @param repositoryId the primary key of the repository
440            * @param userId the primary key of the user
441            * @return the file ranks from the user
442            * @throws SystemException if a system exception occurred
443            */
444            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
445                    long repositoryId, long userId)
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    return getService().getFileRanks(repositoryId, userId);
448            }
449    
450            /**
451            * Returns the file shortcut with the primary key. This method is only
452            * supported by the Liferay repository.
453            *
454            * @param fileShortcutId the primary key of the file shortcut
455            * @return the file shortcut with the primary key
456            * @throws PortalException if the file shortcut could not be found
457            * @throws SystemException if a system exception occurred
458            */
459            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
460                    long fileShortcutId)
461                    throws com.liferay.portal.kernel.exception.PortalException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    return getService().getFileShortcut(fileShortcutId);
464            }
465    
466            /**
467            * Returns the file version with the primary key.
468            *
469            * @param fileVersionId the primary key of the file version
470            * @return the file version with the primary key
471            * @throws PortalException if the file version could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portal.kernel.repository.model.FileVersion getFileVersion(
475                    long fileVersionId)
476                    throws com.liferay.portal.kernel.exception.PortalException,
477                            com.liferay.portal.kernel.exception.SystemException {
478                    return getService().getFileVersion(fileVersionId);
479            }
480    
481            /**
482            * Returns the folder with the primary key.
483            *
484            * @param folderId the primary key of the folder
485            * @return the folder with the primary key
486            * @throws PortalException if the folder could not be found
487            * @throws SystemException if a system exception occurred
488            */
489            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
490                    long folderId)
491                    throws com.liferay.portal.kernel.exception.PortalException,
492                            com.liferay.portal.kernel.exception.SystemException {
493                    return getService().getFolder(folderId);
494            }
495    
496            /**
497            * Returns the folder with the name in the parent folder.
498            *
499            * @param repositoryId the primary key of the folder's repository
500            * @param parentFolderId the primary key of the folder's parent folder
501            * @param name the folder's name
502            * @return the folder with the name in the parent folder
503            * @throws PortalException if the folder could not be found
504            * @throws SystemException if a system exception occurred
505            */
506            public static com.liferay.portal.kernel.repository.model.Folder getFolder(
507                    long repositoryId, long parentFolderId, java.lang.String name)
508                    throws com.liferay.portal.kernel.exception.PortalException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getService().getFolder(repositoryId, parentFolderId, name);
511            }
512    
513            /**
514            * Returns the mount folder of the repository with the primary key. This
515            * method is only supported by the Liferay repository.
516            *
517            * @param repositoryId the primary key of the repository
518            * @return the folder used for mounting third-party repositories
519            * @throws PortalException if the repository or mount folder could not be
520            found
521            * @throws SystemException if a system exception occurred
522            */
523            public static com.liferay.portal.kernel.repository.model.Folder getMountFolder(
524                    long repositoryId)
525                    throws com.liferay.portal.kernel.exception.PortalException,
526                            com.liferay.portal.kernel.exception.SystemException {
527                    return getService().getMountFolder(repositoryId);
528            }
529    
530            /**
531            * Moves the file entry to the new folder.
532            *
533            * @param userId the primary key of the user
534            * @param fileEntryId the primary key of the file entry
535            * @param newFolderId the primary key of the new folder
536            * @param serviceContext the service context to be applied
537            * @return the file entry
538            * @throws PortalException if the file entry or the new folder could not be
539            found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry(
543                    long userId, long fileEntryId, long newFolderId,
544                    com.liferay.portal.service.ServiceContext serviceContext)
545                    throws com.liferay.portal.kernel.exception.PortalException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getService()
548                                       .moveFileEntry(userId, fileEntryId, newFolderId,
549                            serviceContext);
550            }
551    
552            /**
553            * Moves the file entry with the primary key to the trash portlet.
554            *
555            * @param userId the primary key of the user
556            * @param fileEntryId the primary key of the file entry
557            * @throws PortalException if the file entry could not be found
558            * @throws SystemException if a system exception occurred
559            */
560            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
561                    long userId, long fileEntryId)
562                    throws com.liferay.portal.kernel.exception.PortalException,
563                            com.liferay.portal.kernel.exception.SystemException {
564                    return getService().moveFileEntryToTrash(userId, fileEntryId);
565            }
566    
567            /**
568            * Restores the file entry with the primary key from the trash portlet.
569            *
570            * @param userId the primary key of the user
571            * @param fileEntryId the primary key of the file entry
572            * @throws PortalException if the file entry could not be found
573            * @throws SystemException if a system exception occurred
574            */
575            public static void restoreFileEntryFromTrash(long userId, long fileEntryId)
576                    throws com.liferay.portal.kernel.exception.PortalException,
577                            com.liferay.portal.kernel.exception.SystemException {
578                    getService().restoreFileEntryFromTrash(userId, fileEntryId);
579            }
580    
581            /**
582            * Subscribe the user to changes in documents of the file entry type. This
583            * method is only supported by the Liferay repository.
584            *
585            * @param userId the primary key of the user
586            * @param groupId the primary key of the file entry type's group
587            * @param fileEntryTypeId the primary key of the file entry type
588            * @throws PortalException if the user or group could not be found
589            * @throws SystemException if a system exception occurred
590            */
591            public static void subscribeFileEntryType(long userId, long groupId,
592                    long fileEntryTypeId)
593                    throws com.liferay.portal.kernel.exception.PortalException,
594                            com.liferay.portal.kernel.exception.SystemException {
595                    getService().subscribeFileEntryType(userId, groupId, fileEntryTypeId);
596            }
597    
598            /**
599            * Subscribe the user to document changes in the folder. This method is only
600            * supported by the Liferay repository.
601            *
602            * @param userId the primary key of the user
603            * @param groupId the primary key of the folder's group
604            * @param folderId the primary key of the folder
605            * @throws PortalException if the user or group could not be found
606            * @throws SystemException if a system exception occurred
607            */
608            public static void subscribeFolder(long userId, long groupId, long folderId)
609                    throws com.liferay.portal.kernel.exception.PortalException,
610                            com.liferay.portal.kernel.exception.SystemException {
611                    getService().subscribeFolder(userId, groupId, folderId);
612            }
613    
614            /**
615            * Unsubscribe the user from changes in documents of the file entry type.
616            * This method is only supported by the Liferay repository.
617            *
618            * @param userId the primary key of the user
619            * @param groupId the primary key of the file entry type's group
620            * @param fileEntryTypeId the primary key of the file entry type
621            * @throws PortalException if the user or group could not be found
622            * @throws SystemException if a system exception occurred
623            */
624            public static void unsubscribeFileEntryType(long userId, long groupId,
625                    long fileEntryTypeId)
626                    throws com.liferay.portal.kernel.exception.PortalException,
627                            com.liferay.portal.kernel.exception.SystemException {
628                    getService().unsubscribeFileEntryType(userId, groupId, fileEntryTypeId);
629            }
630    
631            /**
632            * Unsubscribe the user from document changes in the folder. This method is
633            * only supported by the Liferay repository.
634            *
635            * @param userId the primary key of the user
636            * @param groupId the primary key of the folder's group
637            * @param folderId the primary key of the folder
638            * @throws PortalException if the user or group could not be found
639            * @throws SystemException if a system exception occurred
640            */
641            public static void unsubscribeFolder(long userId, long groupId,
642                    long folderId)
643                    throws com.liferay.portal.kernel.exception.PortalException,
644                            com.liferay.portal.kernel.exception.SystemException {
645                    getService().unsubscribeFolder(userId, groupId, folderId);
646            }
647    
648            /**
649            * Updates the file entry's asset replacing its asset categories, tags, and
650            * links.
651            *
652            * @param userId the primary key of the user
653            * @param fileEntry the file entry to update
654            * @param fileVersion the file version to update
655            * @param assetCategoryIds the primary keys of the new asset categories
656            * @param assetTagNames the new asset tag names
657            * @param assetLinkEntryIds the primary keys of the new asset link entries
658            * @throws PortalException if the file entry or version could not be found
659            * @throws SystemException if a system exception occurred
660            */
661            public static void updateAsset(long userId,
662                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
663                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
664                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
665                    long[] assetLinkEntryIds)
666                    throws com.liferay.portal.kernel.exception.PortalException,
667                            com.liferay.portal.kernel.exception.SystemException {
668                    getService()
669                            .updateAsset(userId, fileEntry, fileVersion, assetCategoryIds,
670                            assetTagNames, assetLinkEntryIds);
671            }
672    
673            /**
674            * Updates a file entry and associated metadata based on a byte array
675            * object. If the file data is <code>null</code>, then only the associated
676            * metadata (i.e., <code>title</code>, <code>description</code>, and
677            * parameters in the <code>serviceContext</code>) will be updated.
678            *
679            * <p>
680            * This method takes two file names, the <code>sourceFileName</code> and the
681            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
682            * name of the actual file being uploaded. The <code>title</code>
683            * corresponds to a name the client wishes to assign this file after it has
684            * been uploaded to the portal.
685            * </p>
686            *
687            * @param userId the primary key of the user
688            * @param fileEntryId the primary key of the file entry
689            * @param sourceFileName the original file's name (optionally
690            <code>null</code>)
691            * @param mimeType the file's MIME type (optionally <code>null</code>)
692            * @param title the new name to be assigned to the file (optionally <code>
693            <code>null</code></code>)
694            * @param description the file's new description
695            * @param changeLog the file's version change log (optionally
696            <code>null</code>)
697            * @param majorVersion whether the new file version is a major version
698            * @param bytes the file's data (optionally <code>null</code>)
699            * @param serviceContext the service context to be applied. Can set the
700            asset category IDs, asset tag names, and expando bridge
701            attributes for the file entry. In a Liferay repository, it may
702            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
703            type </li> <li> fieldsMap - mapping for fields associated with a
704            custom file entry type </li> </ul>
705            * @return the file entry
706            * @throws PortalException if the file entry could not be found
707            * @throws SystemException if a system exception occurred
708            */
709            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
710                    long userId, long fileEntryId, java.lang.String sourceFileName,
711                    java.lang.String mimeType, java.lang.String title,
712                    java.lang.String description, java.lang.String changeLog,
713                    boolean majorVersion, byte[] bytes,
714                    com.liferay.portal.service.ServiceContext serviceContext)
715                    throws com.liferay.portal.kernel.exception.PortalException,
716                            com.liferay.portal.kernel.exception.SystemException {
717                    return getService()
718                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
719                            mimeType, title, description, changeLog, majorVersion, bytes,
720                            serviceContext);
721            }
722    
723            /**
724            * Updates a file entry and associated metadata based on a {@link
725            * java.io.File} object. If the file data is <code>null</code>, then only
726            * the associated metadata (i.e., <code>title</code>,
727            * <code>description</code>, and parameters in the
728            * <code>serviceContext</code>) will be updated.
729            *
730            * <p>
731            * This method takes two file names, the <code>sourceFileName</code> and the
732            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
733            * name of the actual file being uploaded. The <code>title</code>
734            * corresponds to a name the client wishes to assign this file after it has
735            * been uploaded to the portal.
736            * </p>
737            *
738            * @param userId the primary key of the user
739            * @param fileEntryId the primary key of the file entry
740            * @param sourceFileName the original file's name (optionally
741            <code>null</code>)
742            * @param mimeType the file's MIME type (optionally <code>null</code>)
743            * @param title the new name to be assigned to the file (optionally <code>
744            <code>null</code></code>)
745            * @param description the file's new description
746            * @param changeLog the file's version change log (optionally
747            <code>null</code>)
748            * @param majorVersion whether the new file version is a major version
749            * @param file EntryId the primary key of the file entry
750            * @param serviceContext the service context to be applied. Can set the
751            asset category IDs, asset tag names, and expando bridge
752            attributes for the file entry. In a Liferay repository, it may
753            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
754            type </li> <li> fieldsMap - mapping for fields associated with a
755            custom file entry type </li> </ul>
756            * @return the file entry
757            * @throws PortalException if the file entry could not be found
758            * @throws SystemException if a system exception occurred
759            */
760            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
761                    long userId, long fileEntryId, java.lang.String sourceFileName,
762                    java.lang.String mimeType, java.lang.String title,
763                    java.lang.String description, java.lang.String changeLog,
764                    boolean majorVersion, java.io.File file,
765                    com.liferay.portal.service.ServiceContext serviceContext)
766                    throws com.liferay.portal.kernel.exception.PortalException,
767                            com.liferay.portal.kernel.exception.SystemException {
768                    return getService()
769                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
770                            mimeType, title, description, changeLog, majorVersion, file,
771                            serviceContext);
772            }
773    
774            /**
775            * Updates a file entry and associated metadata based on an {@link java.io.
776            * InputStream} object. If the file data is <code>null</code>, then only the
777            * associated metadata (i.e., <code>title</code>, <code>description</code>,
778            * and parameters in the <code>serviceContext</code>) will be updated.
779            *
780            * <p>
781            * This method takes two file names, the <code>sourceFileName</code> and the
782            * <code>title</code>. The <code>sourceFileName</code> corresponds to the
783            * name of the actual file being uploaded. The <code>title</code>
784            * corresponds to a name the client wishes to assign this file after it has
785            * been uploaded to the portal.
786            * </p>
787            *
788            * @param userId the primary key of the user
789            * @param fileEntryId the primary key of the file entry
790            * @param sourceFileName the original file's name (optionally
791            <code>null</code>)
792            * @param mimeType the file's MIME type (optionally <code>null</code>)
793            * @param title the new name to be assigned to the file (optionally <code>
794            <code>null</code></code>)
795            * @param description the file's new description
796            * @param changeLog the file's version change log (optionally
797            <code>null</code>)
798            * @param majorVersion whether the new file version is a major version
799            * @param is the file's data (optionally <code>null</code>)
800            * @param size the file's size (optionally <code>0</code>)
801            * @param serviceContext the service context to be applied. Can set the
802            asset category IDs, asset tag names, and expando bridge
803            attributes for the file entry. In a Liferay repository, it may
804            include:  <ul> <li> fileEntryTypeId - ID for a custom file entry
805            type </li> <li> fieldsMap - mapping for fields associated with a
806            custom file entry type </li> </ul>
807            * @return the file entry
808            * @throws PortalException if the file entry could not be found
809            * @throws SystemException if a system exception occurred
810            */
811            public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry(
812                    long userId, long fileEntryId, java.lang.String sourceFileName,
813                    java.lang.String mimeType, java.lang.String title,
814                    java.lang.String description, java.lang.String changeLog,
815                    boolean majorVersion, java.io.InputStream is, long size,
816                    com.liferay.portal.service.ServiceContext serviceContext)
817                    throws com.liferay.portal.kernel.exception.PortalException,
818                            com.liferay.portal.kernel.exception.SystemException {
819                    return getService()
820                                       .updateFileEntry(userId, fileEntryId, sourceFileName,
821                            mimeType, title, description, changeLog, majorVersion, is, size,
822                            serviceContext);
823            }
824    
825            /**
826            * Updates a file rank to the existing file entry. This method is only
827            * supported by the Liferay repository.
828            *
829            * @param repositoryId the primary key of the file rank's repository
830            * @param companyId the primary key of the file rank's company
831            * @param userId the primary key of the file rank's creator/owner
832            * @param fileEntryId the primary key of the file rank's file entry
833            * @param serviceContext the service context to be applied
834            * @return the file rank
835            * @throws PortalException if a portal exception occurred
836            * @throws SystemException if a system exception occurred
837            */
838            public static com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
839                    long repositoryId, long companyId, long userId, long fileEntryId,
840                    com.liferay.portal.service.ServiceContext serviceContext)
841                    throws com.liferay.portal.kernel.exception.PortalException,
842                            com.liferay.portal.kernel.exception.SystemException {
843                    return getService()
844                                       .updateFileRank(repositoryId, companyId, userId,
845                            fileEntryId, serviceContext);
846            }
847    
848            /**
849            * Updates a file shortcut to the existing file entry. This method is only
850            * supported by the Liferay repository.
851            *
852            * @param userId the primary key of the file shortcut's creator/owner
853            * @param fileShortcutId the primary key of the file shortcut
854            * @param folderId the primary key of the file shortcut's parent folder
855            * @param toFileEntryId the primary key of the file shortcut's file entry
856            * @param serviceContext the service context to be applied. Can set the
857            asset category IDs, asset tag names, and expando bridge
858            attributes for the file entry.
859            * @return the file shortcut
860            * @throws PortalException if the file shortcut, folder, or file entry could
861            not be found
862            * @throws SystemException if a system exception occurred
863            */
864            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
865                    long userId, long fileShortcutId, long folderId, long toFileEntryId,
866                    com.liferay.portal.service.ServiceContext serviceContext)
867                    throws com.liferay.portal.kernel.exception.PortalException,
868                            com.liferay.portal.kernel.exception.SystemException {
869                    return getService()
870                                       .updateFileShortcut(userId, fileShortcutId, folderId,
871                            toFileEntryId, serviceContext);
872            }
873    
874            /**
875            * Updates all file shortcuts to the existing file entry to the new file
876            * entry. This method is only supported by the Liferay repository.
877            *
878            * @param toRepositoryId the primary key of the repository
879            * @param oldToFileEntryId the primary key of the old file entry pointed to
880            * @param newToFileEntryId the primary key of the new file entry to point
881            to
882            * @throws SystemException if a system exception occurred
883            */
884            public static void updateFileShortcuts(long toRepositoryId,
885                    long oldToFileEntryId, long newToFileEntryId)
886                    throws com.liferay.portal.kernel.exception.SystemException {
887                    getService()
888                            .updateFileShortcuts(toRepositoryId, oldToFileEntryId,
889                            newToFileEntryId);
890            }
891    
892            /**
893            * Updates the folder.
894            *
895            * @param folderId the primary key of the folder
896            * @param parentFolderId the primary key of the folder's new parent folder
897            * @param name the folder's new name
898            * @param description the folder's new description
899            * @param serviceContext the service context to be applied. In a Liferay
900            repository, it may include:  <ul> <li> defaultFileEntryTypeId -
901            the file entry type to default all Liferay file entries to </li>
902            <li> dlFileEntryTypesSearchContainerPrimaryKeys - a
903            comma-delimited list of file entry type primary keys allowed in
904            the given folder and all descendants </li> <li>
905            overrideFileEntryTypes - boolean specifying whether to override
906            ancestral folder's restriction of file entry types allowed </li>
907            <li> workflowDefinitionXYZ - the workflow definition name
908            specified per file entry type. The parameter name must be the
909            string <code>workflowDefinition</code> appended by the <code>
910            fileEntryTypeId</code> (optionally <code>0</code>). </li> </ul>
911            * @return the folder
912            * @throws PortalException if the current or new parent folder could not be
913            found, or if the new parent folder's information was invalid
914            * @throws SystemException if a system exception occurred
915            */
916            public static com.liferay.portal.kernel.repository.model.Folder updateFolder(
917                    long folderId, long parentFolderId, java.lang.String name,
918                    java.lang.String description,
919                    com.liferay.portal.service.ServiceContext serviceContext)
920                    throws com.liferay.portal.kernel.exception.PortalException,
921                            com.liferay.portal.kernel.exception.SystemException {
922                    return getService()
923                                       .updateFolder(folderId, parentFolderId, name, description,
924                            serviceContext);
925            }
926    
927            public static DLAppLocalService getService() {
928                    if (_service == null) {
929                            _service = (DLAppLocalService)PortalBeanLocatorUtil.locate(DLAppLocalService.class.getName());
930    
931                            ReferenceRegistry.registerReference(DLAppLocalServiceUtil.class,
932                                    "_service");
933                    }
934    
935                    return _service;
936            }
937    
938            /**
939             * @deprecated
940             */
941            public void setService(DLAppLocalService service) {
942            }
943    
944            private static DLAppLocalService _service;
945    }