001
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
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, 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
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
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 }