001
014
015 package com.liferay.portlet.dynamicdatamapping.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.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil;
025
026
056 public class DDMStructureServiceHttp {
057 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
058 HttpPrincipal httpPrincipal, long groupId, long classNameId,
059 java.lang.String structureKey,
060 java.util.Map<java.util.Locale, java.lang.String> nameMap,
061 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062 java.lang.String xsd, java.lang.String storageType, int type,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
068 "addStructure", _addStructureParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
071 classNameId, structureKey, nameMap, descriptionMap, xsd,
072 storageType, type, serviceContext);
073
074 Object returnObj = null;
075
076 try {
077 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
078 }
079 catch (Exception e) {
080 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
081 throw (com.liferay.portal.kernel.exception.PortalException)e;
082 }
083
084 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
085 throw (com.liferay.portal.kernel.exception.SystemException)e;
086 }
087
088 throw new com.liferay.portal.kernel.exception.SystemException(e);
089 }
090
091 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
092 }
093 catch (com.liferay.portal.kernel.exception.SystemException se) {
094 _log.error(se, se);
095
096 throw se;
097 }
098 }
099
100 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
101 HttpPrincipal httpPrincipal, long structureId,
102 java.util.Map<java.util.Locale, java.lang.String> nameMap,
103 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
104 com.liferay.portal.service.ServiceContext serviceContext)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
109 "copyStructure", _copyStructureParameterTypes1);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey,
112 structureId, nameMap, descriptionMap, serviceContext);
113
114 Object returnObj = null;
115
116 try {
117 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
118 }
119 catch (Exception e) {
120 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
121 throw (com.liferay.portal.kernel.exception.PortalException)e;
122 }
123
124 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
125 throw (com.liferay.portal.kernel.exception.SystemException)e;
126 }
127
128 throw new com.liferay.portal.kernel.exception.SystemException(e);
129 }
130
131 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
132 }
133 catch (com.liferay.portal.kernel.exception.SystemException se) {
134 _log.error(se, se);
135
136 throw se;
137 }
138 }
139
140 public static void deleteStructure(HttpPrincipal httpPrincipal,
141 long structureId)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 try {
145 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
146 "deleteStructure", _deleteStructureParameterTypes2);
147
148 MethodHandler methodHandler = new MethodHandler(methodKey,
149 structureId);
150
151 try {
152 TunnelUtil.invoke(httpPrincipal, methodHandler);
153 }
154 catch (Exception e) {
155 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
156 throw (com.liferay.portal.kernel.exception.PortalException)e;
157 }
158
159 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
160 throw (com.liferay.portal.kernel.exception.SystemException)e;
161 }
162
163 throw new com.liferay.portal.kernel.exception.SystemException(e);
164 }
165 }
166 catch (com.liferay.portal.kernel.exception.SystemException se) {
167 _log.error(se, se);
168
169 throw se;
170 }
171 }
172
173 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
174 HttpPrincipal httpPrincipal, long groupId, java.lang.String structureKey)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException {
177 try {
178 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
179 "fetchStructure", _fetchStructureParameterTypes3);
180
181 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
182 structureKey);
183
184 Object returnObj = null;
185
186 try {
187 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
188 }
189 catch (Exception e) {
190 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
191 throw (com.liferay.portal.kernel.exception.PortalException)e;
192 }
193
194 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
195 throw (com.liferay.portal.kernel.exception.SystemException)e;
196 }
197
198 throw new com.liferay.portal.kernel.exception.SystemException(e);
199 }
200
201 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
202 }
203 catch (com.liferay.portal.kernel.exception.SystemException se) {
204 _log.error(se, se);
205
206 throw se;
207 }
208 }
209
210 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
211 HttpPrincipal httpPrincipal, long structureId)
212 throws com.liferay.portal.kernel.exception.PortalException,
213 com.liferay.portal.kernel.exception.SystemException {
214 try {
215 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
216 "getStructure", _getStructureParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey,
219 structureId);
220
221 Object returnObj = null;
222
223 try {
224 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
225 }
226 catch (Exception e) {
227 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
228 throw (com.liferay.portal.kernel.exception.PortalException)e;
229 }
230
231 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
232 throw (com.liferay.portal.kernel.exception.SystemException)e;
233 }
234
235 throw new com.liferay.portal.kernel.exception.SystemException(e);
236 }
237
238 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
239 }
240 catch (com.liferay.portal.kernel.exception.SystemException se) {
241 _log.error(se, se);
242
243 throw se;
244 }
245 }
246
247 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
248 HttpPrincipal httpPrincipal, long structureId,
249 java.util.Map<java.util.Locale, java.lang.String> nameMap,
250 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
251 java.lang.String xsd,
252 com.liferay.portal.service.ServiceContext serviceContext)
253 throws com.liferay.portal.kernel.exception.PortalException,
254 com.liferay.portal.kernel.exception.SystemException {
255 try {
256 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
257 "updateStructure", _updateStructureParameterTypes5);
258
259 MethodHandler methodHandler = new MethodHandler(methodKey,
260 structureId, nameMap, descriptionMap, xsd, serviceContext);
261
262 Object returnObj = null;
263
264 try {
265 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
266 }
267 catch (Exception e) {
268 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
269 throw (com.liferay.portal.kernel.exception.PortalException)e;
270 }
271
272 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
273 throw (com.liferay.portal.kernel.exception.SystemException)e;
274 }
275
276 throw new com.liferay.portal.kernel.exception.SystemException(e);
277 }
278
279 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
280 }
281 catch (com.liferay.portal.kernel.exception.SystemException se) {
282 _log.error(se, se);
283
284 throw se;
285 }
286 }
287
288 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
289 HttpPrincipal httpPrincipal, long groupId,
290 java.lang.String structureKey,
291 java.util.Map<java.util.Locale, java.lang.String> nameMap,
292 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
293 java.lang.String xsd,
294 com.liferay.portal.service.ServiceContext serviceContext)
295 throws com.liferay.portal.kernel.exception.PortalException,
296 com.liferay.portal.kernel.exception.SystemException {
297 try {
298 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
299 "updateStructure", _updateStructureParameterTypes6);
300
301 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
302 structureKey, nameMap, descriptionMap, xsd, serviceContext);
303
304 Object returnObj = null;
305
306 try {
307 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
308 }
309 catch (Exception e) {
310 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
311 throw (com.liferay.portal.kernel.exception.PortalException)e;
312 }
313
314 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
315 throw (com.liferay.portal.kernel.exception.SystemException)e;
316 }
317
318 throw new com.liferay.portal.kernel.exception.SystemException(e);
319 }
320
321 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
322 }
323 catch (com.liferay.portal.kernel.exception.SystemException se) {
324 _log.error(se, se);
325
326 throw se;
327 }
328 }
329
330 private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceHttp.class);
331 private static final Class<?>[] _addStructureParameterTypes0 = new Class[] {
332 long.class, long.class, java.lang.String.class, java.util.Map.class,
333 java.util.Map.class, java.lang.String.class, java.lang.String.class,
334 int.class, com.liferay.portal.service.ServiceContext.class
335 };
336 private static final Class<?>[] _copyStructureParameterTypes1 = new Class[] {
337 long.class, java.util.Map.class, java.util.Map.class,
338 com.liferay.portal.service.ServiceContext.class
339 };
340 private static final Class<?>[] _deleteStructureParameterTypes2 = new Class[] {
341 long.class
342 };
343 private static final Class<?>[] _fetchStructureParameterTypes3 = new Class[] {
344 long.class, java.lang.String.class
345 };
346 private static final Class<?>[] _getStructureParameterTypes4 = new Class[] {
347 long.class
348 };
349 private static final Class<?>[] _updateStructureParameterTypes5 = new Class[] {
350 long.class, java.util.Map.class, java.util.Map.class,
351 java.lang.String.class,
352 com.liferay.portal.service.ServiceContext.class
353 };
354 private static final Class<?>[] _updateStructureParameterTypes6 = new Class[] {
355 long.class, java.lang.String.class, java.util.Map.class,
356 java.util.Map.class, java.lang.String.class,
357 com.liferay.portal.service.ServiceContext.class
358 };
359 }