001
014
015 package com.liferay.portlet.dynamicdatalists.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.dynamicdatalists.service.DDLRecordSetServiceUtil;
025
026
054 public class DDLRecordSetServiceHttp {
055 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet addRecordSet(
056 HttpPrincipal httpPrincipal, long groupId, long ddmStructureId,
057 java.lang.String recordSetKey,
058 java.util.Map<java.util.Locale, java.lang.String> nameMap,
059 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
060 int minDisplayRows, int scope,
061 com.liferay.portal.service.ServiceContext serviceContext)
062 throws com.liferay.portal.kernel.exception.PortalException,
063 com.liferay.portal.kernel.exception.SystemException {
064 try {
065 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
066 "addRecordSet", _addRecordSetParameterTypes0);
067
068 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
069 ddmStructureId, recordSetKey, nameMap, descriptionMap,
070 minDisplayRows, scope, serviceContext);
071
072 Object returnObj = null;
073
074 try {
075 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
076 }
077 catch (Exception e) {
078 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
079 throw (com.liferay.portal.kernel.exception.PortalException)e;
080 }
081
082 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
083 throw (com.liferay.portal.kernel.exception.SystemException)e;
084 }
085
086 throw new com.liferay.portal.kernel.exception.SystemException(e);
087 }
088
089 return (com.liferay.portlet.dynamicdatalists.model.DDLRecordSet)returnObj;
090 }
091 catch (com.liferay.portal.kernel.exception.SystemException se) {
092 _log.error(se, se);
093
094 throw se;
095 }
096 }
097
098 public static void deleteRecordSet(HttpPrincipal httpPrincipal,
099 long recordSetId)
100 throws com.liferay.portal.kernel.exception.PortalException,
101 com.liferay.portal.kernel.exception.SystemException {
102 try {
103 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
104 "deleteRecordSet", _deleteRecordSetParameterTypes1);
105
106 MethodHandler methodHandler = new MethodHandler(methodKey,
107 recordSetId);
108
109 try {
110 TunnelUtil.invoke(httpPrincipal, methodHandler);
111 }
112 catch (Exception e) {
113 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
114 throw (com.liferay.portal.kernel.exception.PortalException)e;
115 }
116
117 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
118 throw (com.liferay.portal.kernel.exception.SystemException)e;
119 }
120
121 throw new com.liferay.portal.kernel.exception.SystemException(e);
122 }
123 }
124 catch (com.liferay.portal.kernel.exception.SystemException se) {
125 _log.error(se, se);
126
127 throw se;
128 }
129 }
130
131 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet(
132 HttpPrincipal httpPrincipal, long recordSetId)
133 throws com.liferay.portal.kernel.exception.PortalException,
134 com.liferay.portal.kernel.exception.SystemException {
135 try {
136 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
137 "getRecordSet", _getRecordSetParameterTypes2);
138
139 MethodHandler methodHandler = new MethodHandler(methodKey,
140 recordSetId);
141
142 Object returnObj = null;
143
144 try {
145 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
146 }
147 catch (Exception e) {
148 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
149 throw (com.liferay.portal.kernel.exception.PortalException)e;
150 }
151
152 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
153 throw (com.liferay.portal.kernel.exception.SystemException)e;
154 }
155
156 throw new com.liferay.portal.kernel.exception.SystemException(e);
157 }
158
159 return (com.liferay.portlet.dynamicdatalists.model.DDLRecordSet)returnObj;
160 }
161 catch (com.liferay.portal.kernel.exception.SystemException se) {
162 _log.error(se, se);
163
164 throw se;
165 }
166 }
167
168 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateMinDisplayRows(
169 HttpPrincipal httpPrincipal, long recordSetId, int minDisplayRows,
170 com.liferay.portal.service.ServiceContext serviceContext)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 try {
174 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
175 "updateMinDisplayRows", _updateMinDisplayRowsParameterTypes3);
176
177 MethodHandler methodHandler = new MethodHandler(methodKey,
178 recordSetId, minDisplayRows, serviceContext);
179
180 Object returnObj = null;
181
182 try {
183 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
184 }
185 catch (Exception e) {
186 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
187 throw (com.liferay.portal.kernel.exception.PortalException)e;
188 }
189
190 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
191 throw (com.liferay.portal.kernel.exception.SystemException)e;
192 }
193
194 throw new com.liferay.portal.kernel.exception.SystemException(e);
195 }
196
197 return (com.liferay.portlet.dynamicdatalists.model.DDLRecordSet)returnObj;
198 }
199 catch (com.liferay.portal.kernel.exception.SystemException se) {
200 _log.error(se, se);
201
202 throw se;
203 }
204 }
205
206 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
207 HttpPrincipal httpPrincipal, long recordSetId, long ddmStructureId,
208 java.util.Map<java.util.Locale, java.lang.String> nameMap,
209 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
210 int minDisplayRows,
211 com.liferay.portal.service.ServiceContext serviceContext)
212 throws com.liferay.portal.kernel.exception.PortalException,
213 com.liferay.portal.kernel.exception.SystemException {
214 try {
215 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
216 "updateRecordSet", _updateRecordSetParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey,
219 recordSetId, ddmStructureId, nameMap, descriptionMap,
220 minDisplayRows, serviceContext);
221
222 Object returnObj = null;
223
224 try {
225 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
226 }
227 catch (Exception e) {
228 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
229 throw (com.liferay.portal.kernel.exception.PortalException)e;
230 }
231
232 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
233 throw (com.liferay.portal.kernel.exception.SystemException)e;
234 }
235
236 throw new com.liferay.portal.kernel.exception.SystemException(e);
237 }
238
239 return (com.liferay.portlet.dynamicdatalists.model.DDLRecordSet)returnObj;
240 }
241 catch (com.liferay.portal.kernel.exception.SystemException se) {
242 _log.error(se, se);
243
244 throw se;
245 }
246 }
247
248 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
249 HttpPrincipal httpPrincipal, long groupId, long ddmStructureId,
250 java.lang.String recordSetKey,
251 java.util.Map<java.util.Locale, java.lang.String> nameMap,
252 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
253 int minDisplayRows,
254 com.liferay.portal.service.ServiceContext serviceContext)
255 throws com.liferay.portal.kernel.exception.PortalException,
256 com.liferay.portal.kernel.exception.SystemException {
257 try {
258 MethodKey methodKey = new MethodKey(DDLRecordSetServiceUtil.class,
259 "updateRecordSet", _updateRecordSetParameterTypes5);
260
261 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
262 ddmStructureId, recordSetKey, nameMap, descriptionMap,
263 minDisplayRows, serviceContext);
264
265 Object returnObj = null;
266
267 try {
268 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
269 }
270 catch (Exception e) {
271 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
272 throw (com.liferay.portal.kernel.exception.PortalException)e;
273 }
274
275 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
276 throw (com.liferay.portal.kernel.exception.SystemException)e;
277 }
278
279 throw new com.liferay.portal.kernel.exception.SystemException(e);
280 }
281
282 return (com.liferay.portlet.dynamicdatalists.model.DDLRecordSet)returnObj;
283 }
284 catch (com.liferay.portal.kernel.exception.SystemException se) {
285 _log.error(se, se);
286
287 throw se;
288 }
289 }
290
291 private static Log _log = LogFactoryUtil.getLog(DDLRecordSetServiceHttp.class);
292 private static final Class<?>[] _addRecordSetParameterTypes0 = new Class[] {
293 long.class, long.class, java.lang.String.class, java.util.Map.class,
294 java.util.Map.class, int.class, int.class,
295 com.liferay.portal.service.ServiceContext.class
296 };
297 private static final Class<?>[] _deleteRecordSetParameterTypes1 = new Class[] {
298 long.class
299 };
300 private static final Class<?>[] _getRecordSetParameterTypes2 = new Class[] {
301 long.class
302 };
303 private static final Class<?>[] _updateMinDisplayRowsParameterTypes3 = new Class[] {
304 long.class, int.class,
305 com.liferay.portal.service.ServiceContext.class
306 };
307 private static final Class<?>[] _updateRecordSetParameterTypes4 = new Class[] {
308 long.class, long.class, java.util.Map.class, java.util.Map.class,
309 int.class, com.liferay.portal.service.ServiceContext.class
310 };
311 private static final Class<?>[] _updateRecordSetParameterTypes5 = new Class[] {
312 long.class, long.class, java.lang.String.class, java.util.Map.class,
313 java.util.Map.class, int.class,
314 com.liferay.portal.service.ServiceContext.class
315 };
316 }