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