001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 document library folder local service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl} 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 DLFolderLocalService
029     * @see com.liferay.portlet.documentlibrary.service.base.DLFolderLocalServiceBaseImpl
030     * @see com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl
031     * @generated
032     */
033    public class DLFolderLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the document library folder to the database. Also notifies the appropriate model listeners.
042            *
043            * @param dlFolder the document library folder
044            * @return the document library folder that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
048                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addDLFolder(dlFolder);
051            }
052    
053            /**
054            * Creates a new document library folder with the primary key. Does not add the document library folder to the database.
055            *
056            * @param folderId the primary key for the new document library folder
057            * @return the new document library folder
058            */
059            public static com.liferay.portlet.documentlibrary.model.DLFolder createDLFolder(
060                    long folderId) {
061                    return getService().createDLFolder(folderId);
062            }
063    
064            /**
065            * Deletes the document library folder with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param folderId the primary key of the document library folder
068            * @return the document library folder that was removed
069            * @throws PortalException if a document library folder with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static com.liferay.portlet.documentlibrary.model.DLFolder deleteDLFolder(
073                    long folderId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().deleteDLFolder(folderId);
077            }
078    
079            /**
080            * Deletes the document library folder from the database. Also notifies the appropriate model listeners.
081            *
082            * @param dlFolder the document library folder
083            * @return the document library folder that was removed
084            * @throws SystemException if a system exception occurred
085            */
086            public static com.liferay.portlet.documentlibrary.model.DLFolder deleteDLFolder(
087                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getService().deleteDLFolder(dlFolder);
090            }
091    
092            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093                    return getService().dynamicQuery();
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns the matching rows.
098            *
099            * @param dynamicQuery the dynamic query
100            * @return the matching rows
101            * @throws SystemException if a system exception occurred
102            */
103            @SuppressWarnings("rawtypes")
104            public static java.util.List dynamicQuery(
105                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().dynamicQuery(dynamicQuery);
108            }
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public static java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().dynamicQuery(dynamicQuery, start, end);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            * @throws SystemException if a system exception occurred
143            */
144            @SuppressWarnings("rawtypes")
145            public static java.util.List dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService()
151                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152            }
153    
154            /**
155            * Returns the number of rows that match the dynamic query.
156            *
157            * @param dynamicQuery the dynamic query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public static long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().dynamicQueryCount(dynamicQuery);
165            }
166    
167            public static com.liferay.portlet.documentlibrary.model.DLFolder fetchDLFolder(
168                    long folderId)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().fetchDLFolder(folderId);
171            }
172    
173            /**
174            * Returns the document library folder with the primary key.
175            *
176            * @param folderId the primary key of the document library folder
177            * @return the document library folder
178            * @throws PortalException if a document library folder with the primary key could not be found
179            * @throws SystemException if a system exception occurred
180            */
181            public static com.liferay.portlet.documentlibrary.model.DLFolder getDLFolder(
182                    long folderId)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService().getDLFolder(folderId);
186            }
187    
188            public static com.liferay.portal.model.PersistedModel getPersistedModel(
189                    java.io.Serializable primaryKeyObj)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    return getService().getPersistedModel(primaryKeyObj);
193            }
194    
195            /**
196            * Returns the document library folder with the UUID in the group.
197            *
198            * @param uuid the UUID of document library folder
199            * @param groupId the group id of the document library folder
200            * @return the document library folder
201            * @throws PortalException if a document library folder with the UUID in the group could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portlet.documentlibrary.model.DLFolder getDLFolderByUuidAndGroupId(
205                    java.lang.String uuid, long groupId)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException {
208                    return getService().getDLFolderByUuidAndGroupId(uuid, groupId);
209            }
210    
211            /**
212            * Returns a range of all the document library folders.
213            *
214            * <p>
215            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
216            * </p>
217            *
218            * @param start the lower bound of the range of document library folders
219            * @param end the upper bound of the range of document library folders (not inclusive)
220            * @return the range of document library folders
221            * @throws SystemException if a system exception occurred
222            */
223            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getDLFolders(
224                    int start, int end)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getService().getDLFolders(start, end);
227            }
228    
229            /**
230            * Returns the number of document library folders.
231            *
232            * @return the number of document library folders
233            * @throws SystemException if a system exception occurred
234            */
235            public static int getDLFoldersCount()
236                    throws com.liferay.portal.kernel.exception.SystemException {
237                    return getService().getDLFoldersCount();
238            }
239    
240            /**
241            * Updates the document library folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
242            *
243            * @param dlFolder the document library folder
244            * @return the document library folder that was updated
245            * @throws SystemException if a system exception occurred
246            */
247            public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
248                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getService().updateDLFolder(dlFolder);
251            }
252    
253            /**
254            * Updates the document library folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
255            *
256            * @param dlFolder the document library folder
257            * @param merge whether to merge the document library folder with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
258            * @return the document library folder that was updated
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
262                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
263                    boolean merge)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getService().updateDLFolder(dlFolder, merge);
266            }
267    
268            /**
269            * Returns the Spring bean ID for this bean.
270            *
271            * @return the Spring bean ID for this bean
272            */
273            public static java.lang.String getBeanIdentifier() {
274                    return getService().getBeanIdentifier();
275            }
276    
277            /**
278            * Sets the Spring bean ID for this bean.
279            *
280            * @param beanIdentifier the Spring bean ID for this bean
281            */
282            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
283                    getService().setBeanIdentifier(beanIdentifier);
284            }
285    
286            public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
287                    long userId, long groupId, long repositoryId, boolean mountPoint,
288                    long parentFolderId, java.lang.String name,
289                    java.lang.String description,
290                    com.liferay.portal.service.ServiceContext serviceContext)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    return getService()
294                                       .addFolder(userId, groupId, repositoryId, mountPoint,
295                            parentFolderId, name, description, serviceContext);
296            }
297    
298            public static void deleteAll(long groupId)
299                    throws com.liferay.portal.kernel.exception.PortalException,
300                            com.liferay.portal.kernel.exception.SystemException {
301                    getService().deleteAll(groupId);
302            }
303    
304            public static void deleteFolder(long folderId)
305                    throws com.liferay.portal.kernel.exception.PortalException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    getService().deleteFolder(folderId);
308            }
309    
310            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getCompanyFolders(
311                    long companyId, int start, int end)
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return getService().getCompanyFolders(companyId, start, end);
314            }
315    
316            public static int getCompanyFoldersCount(long companyId)
317                    throws com.liferay.portal.kernel.exception.SystemException {
318                    return getService().getCompanyFoldersCount(companyId);
319            }
320    
321            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
322                    long groupId, long folderId, int status, int start, int end)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getService()
325                                       .getFileEntriesAndFileShortcuts(groupId, folderId, status,
326                            start, end);
327            }
328    
329            public static int getFileEntriesAndFileShortcutsCount(long groupId,
330                    long folderId, int status)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getService()
333                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
334                            status);
335            }
336    
337            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
338                    long folderId)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    return getService().getFolder(folderId);
342            }
343    
344            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
345                    long groupId, long parentFolderId, java.lang.String name)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    return getService().getFolder(groupId, parentFolderId, name);
349            }
350    
351            public static long getFolderId(long companyId, long folderId)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getService().getFolderId(companyId, folderId);
354            }
355    
356            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
357                    long groupId, long parentFolderId)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getService().getFolders(groupId, parentFolderId);
360            }
361    
362            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
363                    long groupId, long parentFolderId, boolean includeMountfolders)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getService()
366                                       .getFolders(groupId, parentFolderId, includeMountfolders);
367            }
368    
369            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
370                    long groupId, long parentFolderId, boolean includeMountfolders,
371                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
372                    throws com.liferay.portal.kernel.exception.SystemException {
373                    return getService()
374                                       .getFolders(groupId, parentFolderId, includeMountfolders,
375                            start, end, obc);
376            }
377    
378            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
379                    long groupId, long parentFolderId, int start, int end,
380                    com.liferay.portal.kernel.util.OrderByComparator obc)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return getService().getFolders(groupId, parentFolderId, start, end, obc);
383            }
384    
385            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
386                    long groupId, long folderId, int status, boolean includeMountFolders,
387                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    return getService()
390                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
391                            status, includeMountFolders, start, end, obc);
392            }
393    
394            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
395                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
396                    boolean includeMountFolders, int start, int end,
397                    com.liferay.portal.kernel.util.OrderByComparator obc)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getService()
400                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
401                            status, mimeTypes, includeMountFolders, start, end, obc);
402            }
403    
404            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
405                    long groupId, long folderId, int status, boolean includeMountFolders)
406                    throws com.liferay.portal.kernel.exception.SystemException {
407                    return getService()
408                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
409                            folderId, status, includeMountFolders);
410            }
411    
412            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
413                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
414                    boolean includeMountFolders)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getService()
417                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
418                            folderId, status, mimeTypes, includeMountFolders);
419            }
420    
421            public static int getFoldersCount(long groupId, long parentFolderId)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    return getService().getFoldersCount(groupId, parentFolderId);
424            }
425    
426            public static int getFoldersCount(long groupId, long parentFolderId,
427                    boolean includeMountfolders)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    return getService()
430                                       .getFoldersCount(groupId, parentFolderId, includeMountfolders);
431            }
432    
433            public static int getFoldersFileEntriesCount(long groupId,
434                    java.util.List<java.lang.Long> folderIds, int status)
435                    throws com.liferay.portal.kernel.exception.SystemException {
436                    return getService()
437                                       .getFoldersFileEntriesCount(groupId, folderIds, status);
438            }
439    
440            public static com.liferay.portlet.documentlibrary.model.DLFolder getMountFolder(
441                    long repositoryId)
442                    throws com.liferay.portal.kernel.exception.PortalException,
443                            com.liferay.portal.kernel.exception.SystemException {
444                    return getService().getMountFolder(repositoryId);
445            }
446    
447            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
448                    long groupId, long parentFolderId, int start, int end,
449                    com.liferay.portal.kernel.util.OrderByComparator obc)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return getService()
452                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
453            }
454    
455            public static int getMountFoldersCount(long groupId, long parentFolderId)
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    return getService().getMountFoldersCount(groupId, parentFolderId);
458            }
459    
460            public static void getSubfolderIds(
461                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
462                    throws com.liferay.portal.kernel.exception.SystemException {
463                    getService().getSubfolderIds(folderIds, groupId, folderId);
464            }
465    
466            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
467                    long folderId, long parentFolderId,
468                    com.liferay.portal.service.ServiceContext serviceContext)
469                    throws com.liferay.portal.kernel.exception.PortalException,
470                            com.liferay.portal.kernel.exception.SystemException {
471                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
472            }
473    
474            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
475                    long folderId, long parentFolderId, java.lang.String name,
476                    java.lang.String description, long defaultFileEntryTypeId,
477                    java.util.List<java.lang.Long> fileEntryTypeIds,
478                    boolean overrideFileEntryTypes,
479                    com.liferay.portal.service.ServiceContext serviceContext)
480                    throws com.liferay.portal.kernel.exception.PortalException,
481                            com.liferay.portal.kernel.exception.SystemException {
482                    return getService()
483                                       .updateFolder(folderId, parentFolderId, name, description,
484                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
485                            serviceContext);
486            }
487    
488            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
489                    long folderId, java.lang.String name, java.lang.String description,
490                    long defaultFileEntryTypeId,
491                    java.util.List<java.lang.Long> fileEntryTypeIds,
492                    boolean overrideFileEntryTypes,
493                    com.liferay.portal.service.ServiceContext serviceContext)
494                    throws com.liferay.portal.kernel.exception.PortalException,
495                            com.liferay.portal.kernel.exception.SystemException {
496                    return getService()
497                                       .updateFolder(folderId, name, description,
498                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
499                            serviceContext);
500            }
501    
502            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolderAndFileEntryTypes(
503                    long folderId, long parentFolderId, java.lang.String name,
504                    java.lang.String description, long defaultFileEntryTypeId,
505                    java.util.List<java.lang.Long> fileEntryTypeIds,
506                    boolean overrideFileEntryTypes,
507                    com.liferay.portal.service.ServiceContext serviceContext)
508                    throws com.liferay.portal.kernel.exception.PortalException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getService()
511                                       .updateFolderAndFileEntryTypes(folderId, parentFolderId,
512                            name, description, defaultFileEntryTypeId, fileEntryTypeIds,
513                            overrideFileEntryTypes, serviceContext);
514            }
515    
516            public static void updateLastPostDate(long folderId,
517                    java.util.Date lastPostDate)
518                    throws com.liferay.portal.kernel.exception.PortalException,
519                            com.liferay.portal.kernel.exception.SystemException {
520                    getService().updateLastPostDate(folderId, lastPostDate);
521            }
522    
523            public static DLFolderLocalService getService() {
524                    if (_service == null) {
525                            _service = (DLFolderLocalService)PortalBeanLocatorUtil.locate(DLFolderLocalService.class.getName());
526    
527                            ReferenceRegistry.registerReference(DLFolderLocalServiceUtil.class,
528                                    "_service");
529                    }
530    
531                    return _service;
532            }
533    
534            /**
535             * @deprecated
536             */
537            public void setService(DLFolderLocalService service) {
538            }
539    
540            private static DLFolderLocalService _service;
541    }