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.json.JSONArray;
022    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
023    import com.liferay.portal.kernel.search.Sort;
024    import com.liferay.portal.kernel.security.access.control.AccessControlled;
025    import com.liferay.portal.kernel.transaction.Isolation;
026    import com.liferay.portal.kernel.transaction.Propagation;
027    import com.liferay.portal.kernel.transaction.Transactional;
028    import com.liferay.portal.kernel.util.OrderByComparator;
029    import com.liferay.portal.service.BaseService;
030    import com.liferay.portal.service.ServiceContext;
031    
032    import com.liferay.portlet.asset.model.AssetCategory;
033    import com.liferay.portlet.asset.model.AssetCategoryDisplay;
034    
035    import java.util.List;
036    import java.util.Locale;
037    import java.util.Map;
038    
039    /**
040     * Provides the remote service interface for AssetCategory. Methods of this
041     * service are expected to have security checks based on the propagated JAAS
042     * credentials because this service can be accessed remotely.
043     *
044     * @author Brian Wing Shun Chan
045     * @see AssetCategoryServiceUtil
046     * @see com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
047     * @see com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
048     * @generated
049     */
050    @AccessControlled
051    @JSONWebService
052    @ProviderType
053    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
054            PortalException.class, SystemException.class})
055    public interface AssetCategoryService extends BaseService {
056            /*
057             * NOTE FOR DEVELOPERS:
058             *
059             * 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.
060             */
061            public AssetCategory addCategory(long groupId, long parentCategoryId,
062                    Map<Locale, java.lang.String> titleMap,
063                    Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
064                    java.lang.String[] categoryProperties, ServiceContext serviceContext)
065                    throws PortalException;
066    
067            public AssetCategory addCategory(long groupId, java.lang.String title,
068                    long vocabularyId, ServiceContext serviceContext)
069                    throws PortalException;
070    
071            public void deleteCategories(long[] categoryIds) throws PortalException;
072    
073            /**
074            * @deprecated As of 7.0.0, Replaced by {@link #deleteCategories(long[])}
075            */
076            @java.lang.Deprecated
077            public List<AssetCategory> deleteCategories(long[] categoryIds,
078                    ServiceContext serviceContext) throws PortalException;
079    
080            public void deleteCategory(long categoryId) throws PortalException;
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public AssetCategory fetchCategory(long categoryId)
084                    throws PortalException;
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public List<AssetCategory> getCategories(java.lang.String className,
088                    long classPK) throws PortalException;
089    
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public AssetCategory getCategory(long categoryId) throws PortalException;
092    
093            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
094            public java.lang.String getCategoryPath(long categoryId)
095                    throws PortalException;
096    
097            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
098            public List<AssetCategory> getChildCategories(long parentCategoryId)
099                    throws PortalException;
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public List<AssetCategory> getChildCategories(long parentCategoryId,
103                    int start, int end, OrderByComparator<AssetCategory> obc)
104                    throws PortalException;
105    
106            /**
107            * Returns the OSGi service identifier.
108            *
109            * @return the OSGi service identifier
110            */
111            public java.lang.String getOSGiServiceIdentifier();
112    
113            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114            public List<AssetCategory> getVocabularyCategories(long groupId,
115                    java.lang.String name, long vocabularyId, int start, int end,
116                    OrderByComparator<AssetCategory> obc);
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public List<AssetCategory> getVocabularyCategories(long groupId,
120                    long parentCategoryId, long vocabularyId, int start, int end,
121                    OrderByComparator<AssetCategory> obc);
122    
123            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124            public List<AssetCategory> getVocabularyCategories(long parentCategoryId,
125                    long vocabularyId, int start, int end,
126                    OrderByComparator<AssetCategory> obc) throws PortalException;
127    
128            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129            public List<AssetCategory> getVocabularyCategories(long vocabularyId,
130                    int start, int end, OrderByComparator<AssetCategory> obc)
131                    throws PortalException;
132    
133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134            public int getVocabularyCategoriesCount(long groupId,
135                    java.lang.String name, long vocabularyId);
136    
137            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138            public int getVocabularyCategoriesCount(long groupId, long parentCategory,
139                    long vocabularyId);
140    
141            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142            public int getVocabularyCategoriesCount(long groupId, long vocabularyId);
143    
144            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145            public AssetCategoryDisplay getVocabularyCategoriesDisplay(long groupId,
146                    java.lang.String name, long vocabularyId, int start, int end,
147                    OrderByComparator<AssetCategory> obc) throws PortalException;
148    
149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150            public AssetCategoryDisplay getVocabularyCategoriesDisplay(
151                    long vocabularyId, int start, int end,
152                    OrderByComparator<AssetCategory> obc) throws PortalException;
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public List<AssetCategory> getVocabularyRootCategories(long groupId,
156                    long vocabularyId, int start, int end,
157                    OrderByComparator<AssetCategory> obc);
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public int getVocabularyRootCategoriesCount(long groupId, long vocabularyId);
161    
162            public AssetCategory moveCategory(long categoryId, long parentCategoryId,
163                    long vocabularyId, ServiceContext serviceContext)
164                    throws PortalException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public List<AssetCategory> search(long groupId, java.lang.String keywords,
168                    long vocabularyId, int start, int end,
169                    OrderByComparator<AssetCategory> obc);
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public JSONArray search(long groupId, java.lang.String name,
173                    java.lang.String[] categoryProperties, int start, int end)
174                    throws PortalException;
175    
176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177            public JSONArray search(long[] groupIds, java.lang.String name,
178                    long[] vocabularyIds, int start, int end) throws PortalException;
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
182                    java.lang.String title, long parentCategoryId, long vocabularyId,
183                    int start, int end) throws PortalException;
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
187                    java.lang.String title, long vocabularyId, long parentCategoryId,
188                    int start, int end, Sort sort) throws PortalException;
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
192                    java.lang.String title, long vocabularyId, int start, int end)
193                    throws PortalException;
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
197                    java.lang.String title, long[] parentCategoryIds, long[] vocabularyIds,
198                    int start, int end) throws PortalException;
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
202                    java.lang.String title, long[] vocabularyIds, long[] parentCategoryIds,
203                    int start, int end, Sort sort) throws PortalException;
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
207                    java.lang.String title, long[] vocabularyIds, int start, int end)
208                    throws PortalException;
209    
210            public AssetCategory updateCategory(long categoryId, long parentCategoryId,
211                    Map<Locale, java.lang.String> titleMap,
212                    Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
213                    java.lang.String[] categoryProperties, ServiceContext serviceContext)
214                    throws PortalException;
215    }