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