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