001
014
015 package com.liferay.portlet.asset.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.LocalizationUtil;
020
021 import com.liferay.portlet.asset.service.AssetVocabularyServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
070 public class AssetVocabularyServiceSoap {
071
074 public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
075 java.lang.String[] titleMapLanguageIds,
076 java.lang.String[] titleMapValues,
077 java.lang.String[] descriptionMapLanguageIds,
078 java.lang.String[] descriptionMapValues, java.lang.String settings,
079 com.liferay.portal.service.ServiceContext serviceContext)
080 throws RemoteException {
081 try {
082 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
083 titleMapValues);
084 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
085 descriptionMapValues);
086
087 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(titleMap,
088 descriptionMap, settings, serviceContext);
089
090 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
091 }
092 catch (Exception e) {
093 _log.error(e, e);
094
095 throw new RemoteException(e.getMessage());
096 }
097 }
098
099 public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
100 java.lang.String title, java.lang.String[] titleMapLanguageIds,
101 java.lang.String[] titleMapValues,
102 java.lang.String[] descriptionMapLanguageIds,
103 java.lang.String[] descriptionMapValues, java.lang.String settings,
104 com.liferay.portal.service.ServiceContext serviceContext)
105 throws RemoteException {
106 try {
107 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
108 titleMapValues);
109 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
110 descriptionMapValues);
111
112 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title,
113 titleMap, descriptionMap, settings, serviceContext);
114
115 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static void deleteVocabularies(long[] vocabularyIds)
125 throws RemoteException {
126 try {
127 AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds);
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static void deleteVocabulary(long vocabularyId)
137 throws RemoteException {
138 try {
139 AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId);
140 }
141 catch (Exception e) {
142 _log.error(e, e);
143
144 throw new RemoteException(e.getMessage());
145 }
146 }
147
148 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
149 long companyId) throws RemoteException {
150 try {
151 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
152 AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
153
154 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
155 }
156 catch (Exception e) {
157 _log.error(e, e);
158
159 throw new RemoteException(e.getMessage());
160 }
161 }
162
163 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
164 long[] groupIds) throws RemoteException {
165 try {
166 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
167 AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
168
169 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
170 }
171 catch (Exception e) {
172 _log.error(e, e);
173
174 throw new RemoteException(e.getMessage());
175 }
176 }
177
178 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
179 long[] groupIds, java.lang.String className) throws RemoteException {
180 try {
181 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
182 AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
183 className);
184
185 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
186 }
187 catch (Exception e) {
188 _log.error(e, e);
189
190 throw new RemoteException(e.getMessage());
191 }
192 }
193
194 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
195 long groupId) throws RemoteException {
196 try {
197 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
198 AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
199
200 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
201 }
202 catch (Exception e) {
203 _log.error(e, e);
204
205 throw new RemoteException(e.getMessage());
206 }
207 }
208
209 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
210 long groupId, int start, int end,
211 com.liferay.portal.kernel.util.OrderByComparator obc)
212 throws RemoteException {
213 try {
214 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
215 AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
216 end, obc);
217
218 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
219 }
220 catch (Exception e) {
221 _log.error(e, e);
222
223 throw new RemoteException(e.getMessage());
224 }
225 }
226
227 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
228 long groupId, java.lang.String name, int start, int end,
229 com.liferay.portal.kernel.util.OrderByComparator obc)
230 throws RemoteException {
231 try {
232 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
233 AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
234 start, end, obc);
235
236 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
237 }
238 catch (Exception e) {
239 _log.error(e, e);
240
241 throw new RemoteException(e.getMessage());
242 }
243 }
244
245 public static int getGroupVocabulariesCount(long groupId)
246 throws RemoteException {
247 try {
248 int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
249
250 return returnValue;
251 }
252 catch (Exception e) {
253 _log.error(e, e);
254
255 throw new RemoteException(e.getMessage());
256 }
257 }
258
259 public static int getGroupVocabulariesCount(long groupId,
260 java.lang.String name) throws RemoteException {
261 try {
262 int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
263 name);
264
265 return returnValue;
266 }
267 catch (Exception e) {
268 _log.error(e, e);
269
270 throw new RemoteException(e.getMessage());
271 }
272 }
273
274 public static java.lang.String getJSONGroupVocabularies(long groupId,
275 java.lang.String name, int start, int end,
276 com.liferay.portal.kernel.util.OrderByComparator obc)
277 throws RemoteException {
278 try {
279 com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
280 name, start, end, obc);
281
282 return returnValue.toString();
283 }
284 catch (Exception e) {
285 _log.error(e, e);
286
287 throw new RemoteException(e.getMessage());
288 }
289 }
290
291 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
292 long[] vocabularyIds) throws RemoteException {
293 try {
294 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
295 AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
296
297 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
298 }
299 catch (Exception e) {
300 _log.error(e, e);
301
302 throw new RemoteException(e.getMessage());
303 }
304 }
305
306 public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary(
307 long vocabularyId) throws RemoteException {
308 try {
309 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
310
311 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
312 }
313 catch (Exception e) {
314 _log.error(e, e);
315
316 throw new RemoteException(e.getMessage());
317 }
318 }
319
320
323 public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
324 long vocabularyId, java.lang.String[] titleMapLanguageIds,
325 java.lang.String[] titleMapValues,
326 java.lang.String[] descriptionMapLanguageIds,
327 java.lang.String[] descriptionMapValues, java.lang.String settings,
328 com.liferay.portal.service.ServiceContext serviceContext)
329 throws RemoteException {
330 try {
331 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
332 titleMapValues);
333 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
334 descriptionMapValues);
335
336 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
337 titleMap, descriptionMap, settings, serviceContext);
338
339 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
340 }
341 catch (Exception e) {
342 _log.error(e, e);
343
344 throw new RemoteException(e.getMessage());
345 }
346 }
347
348 public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
349 long vocabularyId, java.lang.String title,
350 java.lang.String[] titleMapLanguageIds,
351 java.lang.String[] titleMapValues,
352 java.lang.String[] descriptionMapLanguageIds,
353 java.lang.String[] descriptionMapValues, java.lang.String settings,
354 com.liferay.portal.service.ServiceContext serviceContext)
355 throws RemoteException {
356 try {
357 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
358 titleMapValues);
359 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
360 descriptionMapValues);
361
362 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
363 title, titleMap, descriptionMap, settings, serviceContext);
364
365 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
366 }
367 catch (Exception e) {
368 _log.error(e, e);
369
370 throw new RemoteException(e.getMessage());
371 }
372 }
373
374 private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
375 }