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, boolean createDefaultVocabulary)
211 throws RemoteException {
212 try {
213 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
214 AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
215 createDefaultVocabulary);
216
217 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
218 }
219 catch (Exception e) {
220 _log.error(e, e);
221
222 throw new RemoteException(e.getMessage());
223 }
224 }
225
226 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
227 long groupId, int start, int end,
228 com.liferay.portal.kernel.util.OrderByComparator obc)
229 throws RemoteException {
230 try {
231 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
232 AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
233 end, obc);
234
235 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
236 }
237 catch (Exception e) {
238 _log.error(e, e);
239
240 throw new RemoteException(e.getMessage());
241 }
242 }
243
244 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
245 long groupId, java.lang.String name, int start, int end,
246 com.liferay.portal.kernel.util.OrderByComparator obc)
247 throws RemoteException {
248 try {
249 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
250 AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
251 start, end, obc);
252
253 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
254 }
255 catch (Exception e) {
256 _log.error(e, e);
257
258 throw new RemoteException(e.getMessage());
259 }
260 }
261
262 public static int getGroupVocabulariesCount(long groupId)
263 throws RemoteException {
264 try {
265 int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
266
267 return returnValue;
268 }
269 catch (Exception e) {
270 _log.error(e, e);
271
272 throw new RemoteException(e.getMessage());
273 }
274 }
275
276 public static int getGroupVocabulariesCount(long groupId,
277 java.lang.String name) throws RemoteException {
278 try {
279 int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
280 name);
281
282 return returnValue;
283 }
284 catch (Exception e) {
285 _log.error(e, e);
286
287 throw new RemoteException(e.getMessage());
288 }
289 }
290
291 public static java.lang.String getJSONGroupVocabularies(long groupId,
292 java.lang.String name, int start, int end,
293 com.liferay.portal.kernel.util.OrderByComparator obc)
294 throws RemoteException {
295 try {
296 com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
297 name, start, end, obc);
298
299 return returnValue.toString();
300 }
301 catch (Exception e) {
302 _log.error(e, e);
303
304 throw new RemoteException(e.getMessage());
305 }
306 }
307
308 public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
309 long[] vocabularyIds) throws RemoteException {
310 try {
311 java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
312 AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
313
314 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
315 }
316 catch (Exception e) {
317 _log.error(e, e);
318
319 throw new RemoteException(e.getMessage());
320 }
321 }
322
323 public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary(
324 long vocabularyId) throws RemoteException {
325 try {
326 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
327
328 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
329 }
330 catch (Exception e) {
331 _log.error(e, e);
332
333 throw new RemoteException(e.getMessage());
334 }
335 }
336
337
340 public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
341 long vocabularyId, java.lang.String[] titleMapLanguageIds,
342 java.lang.String[] titleMapValues,
343 java.lang.String[] descriptionMapLanguageIds,
344 java.lang.String[] descriptionMapValues, java.lang.String settings,
345 com.liferay.portal.service.ServiceContext serviceContext)
346 throws RemoteException {
347 try {
348 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
349 titleMapValues);
350 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
351 descriptionMapValues);
352
353 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
354 titleMap, descriptionMap, settings, serviceContext);
355
356 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
357 }
358 catch (Exception e) {
359 _log.error(e, e);
360
361 throw new RemoteException(e.getMessage());
362 }
363 }
364
365 public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
366 long vocabularyId, java.lang.String title,
367 java.lang.String[] titleMapLanguageIds,
368 java.lang.String[] titleMapValues,
369 java.lang.String[] descriptionMapLanguageIds,
370 java.lang.String[] descriptionMapValues, java.lang.String settings,
371 com.liferay.portal.service.ServiceContext serviceContext)
372 throws RemoteException {
373 try {
374 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
375 titleMapValues);
376 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
377 descriptionMapValues);
378
379 com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
380 title, titleMap, descriptionMap, settings, serviceContext);
381
382 return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
383 }
384 catch (Exception e) {
385 _log.error(e, e);
386
387 throw new RemoteException(e.getMessage());
388 }
389 }
390
391 private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
392 }