001
014
015 package com.liferay.asset.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.asset.kernel.model.AssetCategory;
020 import com.liferay.asset.kernel.model.AssetCategoryDisplay;
021
022 import com.liferay.portal.kernel.exception.PortalException;
023 import com.liferay.portal.kernel.exception.SystemException;
024 import com.liferay.portal.kernel.json.JSONArray;
025 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
026 import com.liferay.portal.kernel.search.Sort;
027 import com.liferay.portal.kernel.security.access.control.AccessControlled;
028 import com.liferay.portal.kernel.service.BaseService;
029 import com.liferay.portal.kernel.service.ServiceContext;
030 import com.liferay.portal.kernel.transaction.Isolation;
031 import com.liferay.portal.kernel.transaction.Propagation;
032 import com.liferay.portal.kernel.transaction.Transactional;
033 import com.liferay.portal.kernel.util.OrderByComparator;
034
035 import java.util.List;
036 import java.util.Locale;
037 import java.util.Map;
038
039
050 @AccessControlled
051 @JSONWebService
052 @ProviderType
053 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
054 PortalException.class, SystemException.class})
055 public interface AssetCategoryService extends BaseService {
056
061 public AssetCategory addCategory(long groupId, java.lang.String title,
062 long vocabularyId, ServiceContext serviceContext)
063 throws PortalException;
064
065 public AssetCategory addCategory(long groupId, long parentCategoryId,
066 Map<Locale, java.lang.String> titleMap,
067 Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
068 java.lang.String[] categoryProperties, ServiceContext serviceContext)
069 throws PortalException;
070
071 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072 public AssetCategory fetchCategory(long categoryId)
073 throws PortalException;
074
075 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076 public AssetCategory getCategory(long categoryId) throws PortalException;
077
078 public AssetCategory moveCategory(long categoryId, long parentCategoryId,
079 long vocabularyId, ServiceContext serviceContext)
080 throws PortalException;
081
082 public AssetCategory updateCategory(long categoryId, long parentCategoryId,
083 Map<Locale, java.lang.String> titleMap,
084 Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
085 java.lang.String[] categoryProperties, ServiceContext serviceContext)
086 throws PortalException;
087
088 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
089 public AssetCategoryDisplay getVocabularyCategoriesDisplay(long groupId,
090 java.lang.String name, long vocabularyId, int start, int end,
091 OrderByComparator<AssetCategory> obc) throws PortalException;
092
093 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
094 public AssetCategoryDisplay getVocabularyCategoriesDisplay(
095 long vocabularyId, int start, int end,
096 OrderByComparator<AssetCategory> obc) throws PortalException;
097
098 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099 public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
100 java.lang.String title, long parentCategoryId, long vocabularyId,
101 int start, int end) throws PortalException;
102
103 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104 public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
105 java.lang.String title, long vocabularyId, int start, int end)
106 throws PortalException;
107
108 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109 public AssetCategoryDisplay searchCategoriesDisplay(long groupId,
110 java.lang.String title, long vocabularyId, long parentCategoryId,
111 int start, int end, Sort sort) throws PortalException;
112
113 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114 public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
115 java.lang.String title, long[] parentCategoryIds, long[] vocabularyIds,
116 int start, int end) throws PortalException;
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
120 java.lang.String title, long[] vocabularyIds, int start, int end)
121 throws PortalException;
122
123 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124 public AssetCategoryDisplay searchCategoriesDisplay(long[] groupIds,
125 java.lang.String title, long[] vocabularyIds, long[] parentCategoryIds,
126 int start, int end, Sort sort) throws PortalException;
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public JSONArray search(long groupId, java.lang.String name,
130 java.lang.String[] categoryProperties, int start, int end)
131 throws PortalException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public JSONArray search(long[] groupIds, java.lang.String name,
135 long[] vocabularyIds, int start, int end) throws PortalException;
136
137 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138 public int getVocabularyCategoriesCount(long groupId,
139 java.lang.String name, long vocabularyId);
140
141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142 public int getVocabularyCategoriesCount(long groupId, long parentCategory,
143 long vocabularyId);
144
145 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146 public int getVocabularyCategoriesCount(long groupId, long vocabularyId);
147
148 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149 public int getVocabularyRootCategoriesCount(long groupId, long vocabularyId);
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public java.lang.String getCategoryPath(long categoryId)
153 throws PortalException;
154
155
160 public java.lang.String getOSGiServiceIdentifier();
161
162
165 @java.lang.Deprecated
166 public List<AssetCategory> deleteCategories(long[] categoryIds,
167 ServiceContext serviceContext) throws PortalException;
168
169 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170 public List<AssetCategory> getCategories(java.lang.String className,
171 long classPK) throws PortalException;
172
173 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174 public List<AssetCategory> getChildCategories(long parentCategoryId)
175 throws PortalException;
176
177 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178 public List<AssetCategory> getChildCategories(long parentCategoryId,
179 int start, int end, OrderByComparator<AssetCategory> obc)
180 throws PortalException;
181
182 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183 public List<AssetCategory> getVocabularyCategories(long groupId,
184 java.lang.String name, long vocabularyId, int start, int end,
185 OrderByComparator<AssetCategory> obc);
186
187 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188 public List<AssetCategory> getVocabularyCategories(long groupId,
189 long parentCategoryId, long vocabularyId, int start, int end,
190 OrderByComparator<AssetCategory> obc);
191
192 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193 public List<AssetCategory> getVocabularyCategories(long parentCategoryId,
194 long vocabularyId, int start, int end,
195 OrderByComparator<AssetCategory> obc) throws PortalException;
196
197 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198 public List<AssetCategory> getVocabularyCategories(long vocabularyId,
199 int start, int end, OrderByComparator<AssetCategory> obc)
200 throws PortalException;
201
202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203 public List<AssetCategory> getVocabularyRootCategories(long groupId,
204 long vocabularyId, int start, int end,
205 OrderByComparator<AssetCategory> obc);
206
207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208 public List<AssetCategory> search(long groupId, java.lang.String keywords,
209 long vocabularyId, int start, int end,
210 OrderByComparator<AssetCategory> obc);
211
212 public void deleteCategories(long[] categoryIds) throws PortalException;
213
214 public void deleteCategory(long categoryId) throws PortalException;
215 }