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