001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DLFileShortcut. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileShortcutLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLFileShortcutLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileShortcutLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileShortcutLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLFileShortcutLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileShortcutLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the document library file shortcut to the database. Also notifies the appropriate model listeners.
046            *
047            * @param dlFileShortcut the document library file shortcut
048            * @return the document library file shortcut that was added
049            */
050            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addDLFileShortcut(
051                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) {
052                    return getService().addDLFileShortcut(dlFileShortcut);
053            }
054    
055            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
056                    long userId, long groupId, long repositoryId, long folderId,
057                    long toFileEntryId,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService()
061                                       .addFileShortcut(userId, groupId, repositoryId, folderId,
062                            toFileEntryId, serviceContext);
063            }
064    
065            public static void addFileShortcutResources(
066                    com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
067                    boolean addGroupPermissions, boolean addGuestPermissions)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    getService()
070                            .addFileShortcutResources(fileShortcut, addGroupPermissions,
071                            addGuestPermissions);
072            }
073    
074            public static void addFileShortcutResources(
075                    com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
076                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    getService()
079                            .addFileShortcutResources(fileShortcut, groupPermissions,
080                            guestPermissions);
081            }
082    
083            public static void addFileShortcutResources(long fileShortcutId,
084                    boolean addGroupPermissions, boolean addGuestPermissions)
085                    throws com.liferay.portal.kernel.exception.PortalException {
086                    getService()
087                            .addFileShortcutResources(fileShortcutId, addGroupPermissions,
088                            addGuestPermissions);
089            }
090    
091            public static void addFileShortcutResources(long fileShortcutId,
092                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    getService()
095                            .addFileShortcutResources(fileShortcutId, groupPermissions,
096                            guestPermissions);
097            }
098    
099            /**
100            * Creates a new document library file shortcut with the primary key. Does not add the document library file shortcut to the database.
101            *
102            * @param fileShortcutId the primary key for the new document library file shortcut
103            * @return the new document library file shortcut
104            */
105            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut createDLFileShortcut(
106                    long fileShortcutId) {
107                    return getService().createDLFileShortcut(fileShortcutId);
108            }
109    
110            /**
111            * Deletes the document library file shortcut from the database. Also notifies the appropriate model listeners.
112            *
113            * @param dlFileShortcut the document library file shortcut
114            * @return the document library file shortcut that was removed
115            */
116            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut(
117                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) {
118                    return getService().deleteDLFileShortcut(dlFileShortcut);
119            }
120    
121            /**
122            * Deletes the document library file shortcut with the primary key from the database. Also notifies the appropriate model listeners.
123            *
124            * @param fileShortcutId the primary key of the document library file shortcut
125            * @return the document library file shortcut that was removed
126            * @throws PortalException if a document library file shortcut with the primary key could not be found
127            */
128            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut(
129                    long fileShortcutId)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    return getService().deleteDLFileShortcut(fileShortcutId);
132            }
133    
134            public static void deleteFileShortcut(
135                    com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    getService().deleteFileShortcut(fileShortcut);
138            }
139    
140            public static void deleteFileShortcut(long fileShortcutId)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    getService().deleteFileShortcut(fileShortcutId);
143            }
144    
145            public static void deleteFileShortcuts(long groupId, long folderId)
146                    throws com.liferay.portal.kernel.exception.PortalException {
147                    getService().deleteFileShortcuts(groupId, folderId);
148            }
149    
150            public static void deleteFileShortcuts(long groupId, long folderId,
151                    boolean includeTrashedEntries)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    getService()
154                            .deleteFileShortcuts(groupId, folderId, includeTrashedEntries);
155            }
156    
157            public static void deleteFileShortcuts(long toFileEntryId)
158                    throws com.liferay.portal.kernel.exception.PortalException {
159                    getService().deleteFileShortcuts(toFileEntryId);
160            }
161    
162            /**
163            * @throws PortalException
164            */
165            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
166                    com.liferay.portal.model.PersistedModel persistedModel)
167                    throws com.liferay.portal.kernel.exception.PortalException {
168                    return getService().deletePersistedModel(persistedModel);
169            }
170    
171            public static void disableFileShortcuts(long toFileEntryId) {
172                    getService().disableFileShortcuts(toFileEntryId);
173            }
174    
175            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
176                    return getService().dynamicQuery();
177            }
178    
179            /**
180            * Performs a dynamic query on the database and returns the matching rows.
181            *
182            * @param dynamicQuery the dynamic query
183            * @return the matching rows
184            */
185            public static <T> java.util.List<T> dynamicQuery(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
187                    return getService().dynamicQuery(dynamicQuery);
188            }
189    
190            /**
191            * Performs a dynamic query on the database and returns a range of the matching rows.
192            *
193            * <p>
194            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
195            * </p>
196            *
197            * @param dynamicQuery the dynamic query
198            * @param start the lower bound of the range of model instances
199            * @param end the upper bound of the range of model instances (not inclusive)
200            * @return the range of matching rows
201            */
202            public static <T> java.util.List<T> dynamicQuery(
203                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
204                    int end) {
205                    return getService().dynamicQuery(dynamicQuery, start, end);
206            }
207    
208            /**
209            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
210            *
211            * <p>
212            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
213            * </p>
214            *
215            * @param dynamicQuery the dynamic query
216            * @param start the lower bound of the range of model instances
217            * @param end the upper bound of the range of model instances (not inclusive)
218            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
219            * @return the ordered range of matching rows
220            */
221            public static <T> java.util.List<T> dynamicQuery(
222                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
223                    int end,
224                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
225                    return getService()
226                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
227            }
228    
229            /**
230            * Returns the number of rows matching the dynamic query.
231            *
232            * @param dynamicQuery the dynamic query
233            * @return the number of rows matching the dynamic query
234            */
235            public static long dynamicQueryCount(
236                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
237                    return getService().dynamicQueryCount(dynamicQuery);
238            }
239    
240            /**
241            * Returns the number of rows matching the dynamic query.
242            *
243            * @param dynamicQuery the dynamic query
244            * @param projection the projection to apply to the query
245            * @return the number of rows matching the dynamic query
246            */
247            public static long dynamicQueryCount(
248                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
249                    com.liferay.portal.kernel.dao.orm.Projection projection) {
250                    return getService().dynamicQueryCount(dynamicQuery, projection);
251            }
252    
253            public static void enableFileShortcuts(long toFileEntryId) {
254                    getService().enableFileShortcuts(toFileEntryId);
255            }
256    
257            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcut(
258                    long fileShortcutId) {
259                    return getService().fetchDLFileShortcut(fileShortcutId);
260            }
261    
262            /**
263            * Returns the document library file shortcut matching the UUID and group.
264            *
265            * @param uuid the document library file shortcut's UUID
266            * @param groupId the primary key of the group
267            * @return the matching document library file shortcut, or <code>null</code> if a matching document library file shortcut could not be found
268            */
269            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcutByUuidAndGroupId(
270                    java.lang.String uuid, long groupId) {
271                    return getService().fetchDLFileShortcutByUuidAndGroupId(uuid, groupId);
272            }
273    
274            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
275                    return getService().getActionableDynamicQuery();
276            }
277    
278            /**
279            * Returns the Spring bean ID for this bean.
280            *
281            * @return the Spring bean ID for this bean
282            */
283            public static java.lang.String getBeanIdentifier() {
284                    return getService().getBeanIdentifier();
285            }
286    
287            /**
288            * Returns the document library file shortcut with the primary key.
289            *
290            * @param fileShortcutId the primary key of the document library file shortcut
291            * @return the document library file shortcut
292            * @throws PortalException if a document library file shortcut with the primary key could not be found
293            */
294            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut(
295                    long fileShortcutId)
296                    throws com.liferay.portal.kernel.exception.PortalException {
297                    return getService().getDLFileShortcut(fileShortcutId);
298            }
299    
300            /**
301            * Returns the document library file shortcut matching the UUID and group.
302            *
303            * @param uuid the document library file shortcut's UUID
304            * @param groupId the primary key of the group
305            * @return the matching document library file shortcut
306            * @throws PortalException if a matching document library file shortcut could not be found
307            */
308            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcutByUuidAndGroupId(
309                    java.lang.String uuid, long groupId)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return getService().getDLFileShortcutByUuidAndGroupId(uuid, groupId);
312            }
313    
314            /**
315            * Returns a range of all the document library file shortcuts.
316            *
317            * <p>
318            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
319            * </p>
320            *
321            * @param start the lower bound of the range of document library file shortcuts
322            * @param end the upper bound of the range of document library file shortcuts (not inclusive)
323            * @return the range of document library file shortcuts
324            */
325            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcuts(
326                    int start, int end) {
327                    return getService().getDLFileShortcuts(start, end);
328            }
329    
330            /**
331            * Returns all the document library file shortcuts matching the UUID and company.
332            *
333            * @param uuid the UUID of the document library file shortcuts
334            * @param companyId the primary key of the company
335            * @return the matching document library file shortcuts, or an empty list if no matches were found
336            */
337            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
338                    java.lang.String uuid, long companyId) {
339                    return getService().getDLFileShortcutsByUuidAndCompanyId(uuid, companyId);
340            }
341    
342            /**
343            * Returns a range of document library file shortcuts matching the UUID and company.
344            *
345            * @param uuid the UUID of the document library file shortcuts
346            * @param companyId the primary key of the company
347            * @param start the lower bound of the range of document library file shortcuts
348            * @param end the upper bound of the range of document library file shortcuts (not inclusive)
349            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
350            * @return the range of matching document library file shortcuts, or an empty list if no matches were found
351            */
352            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
353                    java.lang.String uuid, long companyId, int start, int end,
354                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileShortcut> orderByComparator) {
355                    return getService()
356                                       .getDLFileShortcutsByUuidAndCompanyId(uuid, companyId,
357                            start, end, orderByComparator);
358            }
359    
360            /**
361            * Returns the number of document library file shortcuts.
362            *
363            * @return the number of document library file shortcuts
364            */
365            public static int getDLFileShortcutsCount() {
366                    return getService().getDLFileShortcutsCount();
367            }
368    
369            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
370                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
371                    return getService().getExportActionableDynamicQuery(portletDataContext);
372            }
373    
374            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
375                    long fileShortcutId)
376                    throws com.liferay.portal.kernel.exception.PortalException {
377                    return getService().getFileShortcut(fileShortcutId);
378            }
379    
380            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
381                    long groupId, long folderId, boolean active, int status, int start,
382                    int end) {
383                    return getService()
384                                       .getFileShortcuts(groupId, folderId, active, status, start,
385                            end);
386            }
387    
388            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
389                    long toFileEntryId) {
390                    return getService().getFileShortcuts(toFileEntryId);
391            }
392    
393            public static int getFileShortcutsCount(long groupId, long folderId,
394                    boolean active, int status) {
395                    return getService()
396                                       .getFileShortcutsCount(groupId, folderId, active, status);
397            }
398    
399            public static com.liferay.portal.model.PersistedModel getPersistedModel(
400                    java.io.Serializable primaryKeyObj)
401                    throws com.liferay.portal.kernel.exception.PortalException {
402                    return getService().getPersistedModel(primaryKeyObj);
403            }
404    
405            public static void rebuildTree(long companyId)
406                    throws com.liferay.portal.kernel.exception.PortalException {
407                    getService().rebuildTree(companyId);
408            }
409    
410            /**
411            * Sets the Spring bean ID for this bean.
412            *
413            * @param beanIdentifier the Spring bean ID for this bean
414            */
415            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
416                    getService().setBeanIdentifier(beanIdentifier);
417            }
418    
419            public static void setTreePaths(long folderId, java.lang.String treePath)
420                    throws com.liferay.portal.kernel.exception.PortalException {
421                    getService().setTreePaths(folderId, treePath);
422            }
423    
424            public static void updateAsset(long userId,
425                    com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
426                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
427                    throws com.liferay.portal.kernel.exception.PortalException {
428                    getService()
429                            .updateAsset(userId, fileShortcut, assetCategoryIds, assetTagNames);
430            }
431    
432            /**
433            * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
434            *
435            * @param dlFileShortcut the document library file shortcut
436            * @return the document library file shortcut that was updated
437            */
438            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut(
439                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) {
440                    return getService().updateDLFileShortcut(dlFileShortcut);
441            }
442    
443            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
444                    long userId, long fileShortcutId, long repositoryId, long folderId,
445                    long toFileEntryId,
446                    com.liferay.portal.service.ServiceContext serviceContext)
447                    throws com.liferay.portal.kernel.exception.PortalException {
448                    return getService()
449                                       .updateFileShortcut(userId, fileShortcutId, repositoryId,
450                            folderId, toFileEntryId, serviceContext);
451            }
452    
453            public static void updateFileShortcuts(long oldToFileEntryId,
454                    long newToFileEntryId) {
455                    getService().updateFileShortcuts(oldToFileEntryId, newToFileEntryId);
456            }
457    
458            public static void updateStatus(long userId, long fileShortcutId,
459                    int status, com.liferay.portal.service.ServiceContext serviceContext)
460                    throws com.liferay.portal.kernel.exception.PortalException {
461                    getService().updateStatus(userId, fileShortcutId, status, serviceContext);
462            }
463    
464            public static DLFileShortcutLocalService getService() {
465                    if (_service == null) {
466                            _service = (DLFileShortcutLocalService)PortalBeanLocatorUtil.locate(DLFileShortcutLocalService.class.getName());
467    
468                            ReferenceRegistry.registerReference(DLFileShortcutLocalServiceUtil.class,
469                                    "_service");
470                    }
471    
472                    return _service;
473            }
474    
475            /**
476             * @deprecated As of 6.2.0
477             */
478            @Deprecated
479            public void setService(DLFileShortcutLocalService service) {
480            }
481    
482            private static DLFileShortcutLocalService _service;
483    }