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