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.asset.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.security.access.control.AccessControlled;
023    import com.liferay.portal.kernel.transaction.Isolation;
024    import com.liferay.portal.kernel.transaction.Propagation;
025    import com.liferay.portal.kernel.transaction.Transactional;
026    import com.liferay.portal.service.BaseService;
027    
028    /**
029     * Provides the remote service interface for AssetCategory. Methods of this
030     * service are expected to have security checks based on the propagated JAAS
031     * credentials because this service can be accessed remotely.
032     *
033     * @author Brian Wing Shun Chan
034     * @see AssetCategoryServiceUtil
035     * @see com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
036     * @see com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
037     * @generated
038     */
039    @AccessControlled
040    @JSONWebService
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface AssetCategoryService extends BaseService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link AssetCategoryServiceUtil} to access the asset category remote service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.asset.model.AssetCategory addCategory(
051                    long groupId, long parentCategoryId,
052                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
053                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
054                    long vocabularyId, java.lang.String[] categoryProperties,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws PortalException;
057    
058            public com.liferay.portlet.asset.model.AssetCategory addCategory(
059                    long groupId, java.lang.String title, long vocabularyId,
060                    com.liferay.portal.service.ServiceContext serviceContext)
061                    throws PortalException;
062    
063            public void deleteCategories(long[] categoryIds) throws PortalException;
064    
065            /**
066            * @deprecated As of 7.0.0, Replaced by {@link #deleteCategories(long[])}
067            */
068            @java.lang.Deprecated
069            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> deleteCategories(
070                    long[] categoryIds,
071                    com.liferay.portal.service.ServiceContext serviceContext)
072                    throws PortalException;
073    
074            public void deleteCategory(long categoryId) throws PortalException;
075    
076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077            public com.liferay.portlet.asset.model.AssetCategory fetchCategory(
078                    long categoryId) throws PortalException;
079    
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
082                    java.lang.String className, long classPK) throws PortalException;
083    
084            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085            public com.liferay.portlet.asset.model.AssetCategory getCategory(
086                    long categoryId) throws PortalException;
087    
088            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
089            public java.lang.String getCategoryPath(long categoryId)
090                    throws PortalException;
091    
092            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
093            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
094                    long parentCategoryId) throws PortalException;
095    
096            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
097            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
098                    long parentCategoryId, int start, int end,
099                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
100                    throws PortalException;
101    
102            /**
103            * @deprecated As of 6.2.0, replaced by {@link #search(long[], String,
104            long[], int, int)}
105            */
106            @java.lang.Deprecated
107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108            public com.liferay.portal.kernel.json.JSONArray getJSONSearch(
109                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
110                    int end) throws PortalException;
111    
112            /**
113            * @deprecated As of 6.2.0, replaced by {@link
114            #getVocabularyCategoriesDisplay(long, String, long, int, int,
115            OrderByComparator)}
116            */
117            @java.lang.Deprecated
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
120                    long groupId, java.lang.String name, long vocabularyId, int start,
121                    int end,
122                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
123                    throws PortalException;
124    
125            /**
126            * @deprecated As of 6.2.0, replaced by {@link
127            #getVocabularyCategoriesDisplay(long, int, int,
128            OrderByComparator)}
129            */
130            @java.lang.Deprecated
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
133                    long vocabularyId, int start, int end,
134                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
135                    throws PortalException;
136    
137            /**
138            * Returns the OSGi service identifier.
139            *
140            * @return the OSGi service identifier
141            */
142            public java.lang.String getOSGiServiceIdentifier();
143    
144            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
146                    long groupId, java.lang.String name, long vocabularyId, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc);
149    
150            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
152                    long groupId, long parentCategoryId, long vocabularyId, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc);
155    
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
158                    long parentCategoryId, long vocabularyId, int start, int end,
159                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
160                    throws PortalException;
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
164                    long vocabularyId, int start, int end,
165                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
166                    throws PortalException;
167    
168            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169            public int getVocabularyCategoriesCount(long groupId,
170                    java.lang.String name, long vocabularyId);
171    
172            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173            public int getVocabularyCategoriesCount(long groupId, long parentCategory,
174                    long vocabularyId);
175    
176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177            public int getVocabularyCategoriesCount(long groupId, long vocabularyId);
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
181                    long groupId, java.lang.String name, long vocabularyId, int start,
182                    int end,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
184                    throws PortalException;
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
188                    long vocabularyId, int start, int end,
189                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
190                    throws PortalException;
191    
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
194                    long groupId, long vocabularyId, int start, int end,
195                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc);
196    
197            /**
198            * @deprecated As of 6.2.0, replaced by {@link
199            #getVocabularyRootCategories(long, long, int, int,
200            OrderByComparator)}
201            */
202            @java.lang.Deprecated
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
205                    long vocabularyId, int start, int end,
206                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
207                    throws PortalException;
208    
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public int getVocabularyRootCategoriesCount(long groupId, long vocabularyId);
211    
212            public com.liferay.portlet.asset.model.AssetCategory moveCategory(
213                    long categoryId, long parentCategoryId, long vocabularyId,
214                    com.liferay.portal.service.ServiceContext serviceContext)
215                    throws PortalException;
216    
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
219                    long groupId, java.lang.String keywords, long vocabularyId, int start,
220                    int end,
221                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portal.kernel.json.JSONArray search(long groupId,
225                    java.lang.String name, java.lang.String[] categoryProperties,
226                    int start, int end) throws PortalException;
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portal.kernel.json.JSONArray search(long[] groupIds,
230                    java.lang.String name, long[] vocabularyIds, int start, int end)
231                    throws PortalException;
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
235                    long groupId, java.lang.String title, long parentCategoryId,
236                    long vocabularyId, int start, int end) throws PortalException;
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
240                    long groupId, java.lang.String title, long vocabularyId,
241                    long parentCategoryId, int start, int end,
242                    com.liferay.portal.kernel.search.Sort sort) throws PortalException;
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
246                    long groupId, java.lang.String title, long vocabularyId, int start,
247                    int end) throws PortalException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
251                    long[] groupIds, java.lang.String title, long[] parentCategoryIds,
252                    long[] vocabularyIds, int start, int end) throws PortalException;
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
256                    long[] groupIds, java.lang.String title, long[] vocabularyIds,
257                    long[] parentCategoryIds, int start, int end,
258                    com.liferay.portal.kernel.search.Sort sort) throws PortalException;
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
262                    long[] groupIds, java.lang.String title, long[] vocabularyIds,
263                    int start, int end) throws PortalException;
264    
265            public com.liferay.portlet.asset.model.AssetCategory updateCategory(
266                    long categoryId, long parentCategoryId,
267                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
268                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
269                    long vocabularyId, java.lang.String[] categoryProperties,
270                    com.liferay.portal.service.ServiceContext serviceContext)
271                    throws PortalException;
272    }