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