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 document library file shortcut with the primary key.
276            *
277            * @param fileShortcutId the primary key of the document library file shortcut
278            * @return the document library file shortcut
279            * @throws PortalException if a document library file shortcut with the primary key could not be found
280            */
281            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut(
282                    long fileShortcutId)
283                    throws com.liferay.portal.kernel.exception.PortalException {
284                    return getService().getDLFileShortcut(fileShortcutId);
285            }
286    
287            /**
288            * Returns the document library file shortcut matching the UUID and group.
289            *
290            * @param uuid the document library file shortcut's UUID
291            * @param groupId the primary key of the group
292            * @return the matching document library file shortcut
293            * @throws PortalException if a matching document library file shortcut could not be found
294            */
295            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcutByUuidAndGroupId(
296                    java.lang.String uuid, long groupId)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService().getDLFileShortcutByUuidAndGroupId(uuid, groupId);
299            }
300    
301            /**
302            * Returns a range of all the document library file shortcuts.
303            *
304            * <p>
305            * 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.
306            * </p>
307            *
308            * @param start the lower bound of the range of document library file shortcuts
309            * @param end the upper bound of the range of document library file shortcuts (not inclusive)
310            * @return the range of document library file shortcuts
311            */
312            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcuts(
313                    int start, int end) {
314                    return getService().getDLFileShortcuts(start, end);
315            }
316    
317            /**
318            * Returns all the document library file shortcuts matching the UUID and company.
319            *
320            * @param uuid the UUID of the document library file shortcuts
321            * @param companyId the primary key of the company
322            * @return the matching document library file shortcuts, or an empty list if no matches were found
323            */
324            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
325                    java.lang.String uuid, long companyId) {
326                    return getService().getDLFileShortcutsByUuidAndCompanyId(uuid, companyId);
327            }
328    
329            /**
330            * Returns a range of 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            * @param start the lower bound of the range of document library file shortcuts
335            * @param end the upper bound of the range of document library file shortcuts (not inclusive)
336            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
337            * @return the range of matching document library file shortcuts, or an empty list if no matches were found
338            */
339            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
340                    java.lang.String uuid, long companyId, int start, int end,
341                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileShortcut> orderByComparator) {
342                    return getService()
343                                       .getDLFileShortcutsByUuidAndCompanyId(uuid, companyId,
344                            start, end, orderByComparator);
345            }
346    
347            /**
348            * Returns the number of document library file shortcuts.
349            *
350            * @return the number of document library file shortcuts
351            */
352            public static int getDLFileShortcutsCount() {
353                    return getService().getDLFileShortcutsCount();
354            }
355    
356            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
357                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
358                    return getService().getExportActionableDynamicQuery(portletDataContext);
359            }
360    
361            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
362                    long fileShortcutId)
363                    throws com.liferay.portal.kernel.exception.PortalException {
364                    return getService().getFileShortcut(fileShortcutId);
365            }
366    
367            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
368                    long groupId, long folderId, boolean active, int status, int start,
369                    int end) {
370                    return getService()
371                                       .getFileShortcuts(groupId, folderId, active, status, start,
372                            end);
373            }
374    
375            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
376                    long toFileEntryId) {
377                    return getService().getFileShortcuts(toFileEntryId);
378            }
379    
380            public static int getFileShortcutsCount(long groupId, long folderId,
381                    boolean active, int status) {
382                    return getService()
383                                       .getFileShortcutsCount(groupId, folderId, active, status);
384            }
385    
386            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
387                    return getService().getIndexableActionableDynamicQuery();
388            }
389    
390            /**
391            * Returns the OSGi service identifier.
392            *
393            * @return the OSGi service identifier
394            */
395            public static java.lang.String getOSGiServiceIdentifier() {
396                    return getService().getOSGiServiceIdentifier();
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            public static void setTreePaths(long folderId, java.lang.String treePath)
411                    throws com.liferay.portal.kernel.exception.PortalException {
412                    getService().setTreePaths(folderId, treePath);
413            }
414    
415            public static void updateAsset(long userId,
416                    com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
417                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
418                    throws com.liferay.portal.kernel.exception.PortalException {
419                    getService()
420                            .updateAsset(userId, fileShortcut, assetCategoryIds, assetTagNames);
421            }
422    
423            /**
424            * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
425            *
426            * @param dlFileShortcut the document library file shortcut
427            * @return the document library file shortcut that was updated
428            */
429            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut(
430                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) {
431                    return getService().updateDLFileShortcut(dlFileShortcut);
432            }
433    
434            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
435                    long userId, long fileShortcutId, long repositoryId, long folderId,
436                    long toFileEntryId,
437                    com.liferay.portal.service.ServiceContext serviceContext)
438                    throws com.liferay.portal.kernel.exception.PortalException {
439                    return getService()
440                                       .updateFileShortcut(userId, fileShortcutId, repositoryId,
441                            folderId, toFileEntryId, serviceContext);
442            }
443    
444            public static void updateFileShortcuts(long oldToFileEntryId,
445                    long newToFileEntryId) {
446                    getService().updateFileShortcuts(oldToFileEntryId, newToFileEntryId);
447            }
448    
449            public static void updateFileShortcutsActive(long toFileEntryId,
450                    boolean active) {
451                    getService().updateFileShortcutsActive(toFileEntryId, active);
452            }
453    
454            public static void updateStatus(long userId, long fileShortcutId,
455                    int status, com.liferay.portal.service.ServiceContext serviceContext)
456                    throws com.liferay.portal.kernel.exception.PortalException {
457                    getService().updateStatus(userId, fileShortcutId, status, serviceContext);
458            }
459    
460            public static DLFileShortcutLocalService getService() {
461                    if (_service == null) {
462                            _service = (DLFileShortcutLocalService)PortalBeanLocatorUtil.locate(DLFileShortcutLocalService.class.getName());
463    
464                            ReferenceRegistry.registerReference(DLFileShortcutLocalServiceUtil.class,
465                                    "_service");
466                    }
467    
468                    return _service;
469            }
470    
471            private static DLFileShortcutLocalService _service;
472    }