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.journal.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 remote service utility for JournalFolder. This utility wraps
024     * {@link com.liferay.portlet.journal.service.impl.JournalFolderServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see JournalFolderService
032     * @see com.liferay.portlet.journal.service.base.JournalFolderServiceBaseImpl
033     * @see com.liferay.portlet.journal.service.impl.JournalFolderServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class JournalFolderServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalFolderServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.journal.model.JournalFolder addFolder(
044                    long groupId, long parentFolderId, java.lang.String name,
045                    java.lang.String description,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addFolder(groupId, parentFolderId, name, description,
050                            serviceContext);
051            }
052    
053            public static void deleteFolder(long folderId)
054                    throws com.liferay.portal.kernel.exception.PortalException {
055                    getService().deleteFolder(folderId);
056            }
057    
058            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    getService().deleteFolder(folderId, includeTrashedEntries);
061            }
062    
063            public static com.liferay.portlet.journal.model.JournalFolder fetchFolder(
064                    long folderId)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    return getService().fetchFolder(folderId);
067            }
068    
069            /**
070            * Returns the Spring bean ID for this bean.
071            *
072            * @return the Spring bean ID for this bean
073            */
074            public static java.lang.String getBeanIdentifier() {
075                    return getService().getBeanIdentifier();
076            }
077    
078            public static com.liferay.portlet.journal.model.JournalFolder getFolder(
079                    long folderId)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    return getService().getFolder(folderId);
082            }
083    
084            public static java.util.List<java.lang.Long> getFolderIds(long groupId,
085                    long folderId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().getFolderIds(groupId, folderId);
088            }
089    
090            public static java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
091                    long groupId) {
092                    return getService().getFolders(groupId);
093            }
094    
095            public static java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
096                    long groupId, long parentFolderId) {
097                    return getService().getFolders(groupId, parentFolderId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
101                    long groupId, long parentFolderId, int start, int end) {
102                    return getService().getFolders(groupId, parentFolderId, start, end);
103            }
104    
105            public static java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
106                    long groupId, long parentFolderId, int status) {
107                    return getService().getFolders(groupId, parentFolderId, status);
108            }
109    
110            public static java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
111                    long groupId, long parentFolderId, int status, int start, int end) {
112                    return getService()
113                                       .getFolders(groupId, parentFolderId, status, start, end);
114            }
115    
116            public static java.util.List<java.lang.Object> getFoldersAndArticles(
117                    long groupId, long folderId, int start, int end,
118                    com.liferay.portal.kernel.util.OrderByComparator<?> obc) {
119                    return getService()
120                                       .getFoldersAndArticles(groupId, folderId, start, end, obc);
121            }
122    
123            public static java.util.List<java.lang.Object> getFoldersAndArticles(
124                    long groupId, long folderId, int status, int start, int end,
125                    com.liferay.portal.kernel.util.OrderByComparator<?> obc) {
126                    return getService()
127                                       .getFoldersAndArticles(groupId, folderId, status, start,
128                            end, obc);
129            }
130    
131            public static int getFoldersAndArticlesCount(long groupId, long folderId) {
132                    return getService().getFoldersAndArticlesCount(groupId, folderId);
133            }
134    
135            public static int getFoldersAndArticlesCount(long groupId, long folderId,
136                    int status) {
137                    return getService().getFoldersAndArticlesCount(groupId, folderId, status);
138            }
139    
140            public static int getFoldersAndArticlesCount(long groupId,
141                    java.util.List<java.lang.Long> folderIds, int status) {
142                    return getService()
143                                       .getFoldersAndArticlesCount(groupId, folderIds, status);
144            }
145    
146            public static int getFoldersCount(long groupId, long parentFolderId) {
147                    return getService().getFoldersCount(groupId, parentFolderId);
148            }
149    
150            public static int getFoldersCount(long groupId, long parentFolderId,
151                    int status) {
152                    return getService().getFoldersCount(groupId, parentFolderId, status);
153            }
154    
155            /**
156            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
157            long, boolean)}
158            */
159            @Deprecated
160            public static void getSubfolderIds(
161                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId) {
162                    getService().getSubfolderIds(folderIds, groupId, folderId);
163            }
164    
165            public static void getSubfolderIds(
166                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
167                    boolean recurse) {
168                    getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
169            }
170    
171            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
172                    long folderId, boolean recurse) {
173                    return getService().getSubfolderIds(groupId, folderId, recurse);
174            }
175    
176            public static com.liferay.portlet.journal.model.JournalFolder moveFolder(
177                    long folderId, long parentFolderId,
178                    com.liferay.portal.service.ServiceContext serviceContext)
179                    throws com.liferay.portal.kernel.exception.PortalException {
180                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
181            }
182    
183            public static com.liferay.portlet.journal.model.JournalFolder moveFolderFromTrash(
184                    long folderId, long parentFolderId,
185                    com.liferay.portal.service.ServiceContext serviceContext)
186                    throws com.liferay.portal.kernel.exception.PortalException {
187                    return getService()
188                                       .moveFolderFromTrash(folderId, parentFolderId, serviceContext);
189            }
190    
191            public static com.liferay.portlet.journal.model.JournalFolder moveFolderToTrash(
192                    long folderId)
193                    throws com.liferay.portal.kernel.exception.PortalException {
194                    return getService().moveFolderToTrash(folderId);
195            }
196    
197            public static void restoreFolderFromTrash(long folderId)
198                    throws com.liferay.portal.kernel.exception.PortalException {
199                    getService().restoreFolderFromTrash(folderId);
200            }
201    
202            /**
203            * Sets the Spring bean ID for this bean.
204            *
205            * @param beanIdentifier the Spring bean ID for this bean
206            */
207            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
208                    getService().setBeanIdentifier(beanIdentifier);
209            }
210    
211            public static void subscribe(long groupId, long folderId)
212                    throws com.liferay.portal.kernel.exception.PortalException {
213                    getService().subscribe(groupId, folderId);
214            }
215    
216            public static void unsubscribe(long groupId, long folderId)
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    getService().unsubscribe(groupId, folderId);
219            }
220    
221            public static com.liferay.portlet.journal.model.JournalFolder updateFolder(
222                    long folderId, long parentFolderId, java.lang.String name,
223                    java.lang.String description, long[] ddmStructureIds,
224                    int restrictionType, boolean mergeWithParentFolder,
225                    com.liferay.portal.service.ServiceContext serviceContext)
226                    throws com.liferay.portal.kernel.exception.PortalException {
227                    return getService()
228                                       .updateFolder(folderId, parentFolderId, name, description,
229                            ddmStructureIds, restrictionType, mergeWithParentFolder,
230                            serviceContext);
231            }
232    
233            public static com.liferay.portlet.journal.model.JournalFolder updateFolder(
234                    long folderId, long parentFolderId, java.lang.String name,
235                    java.lang.String description, boolean mergeWithParentFolder,
236                    com.liferay.portal.service.ServiceContext serviceContext)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService()
239                                       .updateFolder(folderId, parentFolderId, name, description,
240                            mergeWithParentFolder, serviceContext);
241            }
242    
243            public static JournalFolderService getService() {
244                    if (_service == null) {
245                            _service = (JournalFolderService)PortalBeanLocatorUtil.locate(JournalFolderService.class.getName());
246    
247                            ReferenceRegistry.registerReference(JournalFolderServiceUtil.class,
248                                    "_service");
249                    }
250    
251                    return _service;
252            }
253    
254            /**
255             * @deprecated As of 6.2.0
256             */
257            @Deprecated
258            public void setService(JournalFolderService service) {
259            }
260    
261            private static JournalFolderService _service;
262    }