001
014
015 package com.liferay.portlet.expando.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.expando.service.ExpandoValueServiceUtil;
025
026
054 public class ExpandoValueServiceHttp {
055 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
056 HttpPrincipal httpPrincipal, long companyId,
057 java.lang.String className, java.lang.String tableName,
058 java.lang.String columnName, long classPK, java.lang.Object data)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 try {
062 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
063 "addValue", _addValueParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey,
066 companyId, className, tableName, columnName, classPK, data);
067
068 Object returnObj = null;
069
070 try {
071 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
072 }
073 catch (Exception e) {
074 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
075 throw (com.liferay.portal.kernel.exception.PortalException)e;
076 }
077
078 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
079 throw (com.liferay.portal.kernel.exception.SystemException)e;
080 }
081
082 throw new com.liferay.portal.kernel.exception.SystemException(e);
083 }
084
085 return (com.liferay.portlet.expando.model.ExpandoValue)returnObj;
086 }
087 catch (com.liferay.portal.kernel.exception.SystemException se) {
088 _log.error(se, se);
089
090 throw se;
091 }
092 }
093
094 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
095 HttpPrincipal httpPrincipal, long companyId,
096 java.lang.String className, java.lang.String tableName,
097 java.lang.String columnName, long classPK, java.lang.String data)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 try {
101 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
102 "addValue", _addValueParameterTypes1);
103
104 MethodHandler methodHandler = new MethodHandler(methodKey,
105 companyId, className, tableName, columnName, classPK, data);
106
107 Object returnObj = null;
108
109 try {
110 returnObj = 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 return (com.liferay.portlet.expando.model.ExpandoValue)returnObj;
125 }
126 catch (com.liferay.portal.kernel.exception.SystemException se) {
127 _log.error(se, se);
128
129 throw se;
130 }
131 }
132
133 public static void addValues(HttpPrincipal httpPrincipal, long companyId,
134 java.lang.String className, java.lang.String tableName, long classPK,
135 java.util.Map<java.lang.String, java.io.Serializable> attributeValues)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException {
138 try {
139 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
140 "addValues", _addValuesParameterTypes2);
141
142 MethodHandler methodHandler = new MethodHandler(methodKey,
143 companyId, className, tableName, classPK, attributeValues);
144
145 try {
146 TunnelUtil.invoke(httpPrincipal, methodHandler);
147 }
148 catch (Exception e) {
149 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
150 throw (com.liferay.portal.kernel.exception.PortalException)e;
151 }
152
153 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
154 throw (com.liferay.portal.kernel.exception.SystemException)e;
155 }
156
157 throw new com.liferay.portal.kernel.exception.SystemException(e);
158 }
159 }
160 catch (com.liferay.portal.kernel.exception.SystemException se) {
161 _log.error(se, se);
162
163 throw se;
164 }
165 }
166
167 public static java.util.Map<java.lang.String, java.io.Serializable> getData(
168 HttpPrincipal httpPrincipal, long companyId,
169 java.lang.String className, java.lang.String tableName,
170 java.util.Collection<java.lang.String> columnNames, long classPK)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 try {
174 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
175 "getData", _getDataParameterTypes3);
176
177 MethodHandler methodHandler = new MethodHandler(methodKey,
178 companyId, className, tableName, columnNames, classPK);
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 (java.util.Map<java.lang.String, java.io.Serializable>)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 java.io.Serializable getData(HttpPrincipal httpPrincipal,
207 long companyId, java.lang.String className, java.lang.String tableName,
208 java.lang.String columnName, long classPK)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 try {
212 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
213 "getData", _getDataParameterTypes4);
214
215 MethodHandler methodHandler = new MethodHandler(methodKey,
216 companyId, className, tableName, columnName, classPK);
217
218 Object returnObj = null;
219
220 try {
221 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
222 }
223 catch (Exception e) {
224 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
225 throw (com.liferay.portal.kernel.exception.PortalException)e;
226 }
227
228 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
229 throw (com.liferay.portal.kernel.exception.SystemException)e;
230 }
231
232 throw new com.liferay.portal.kernel.exception.SystemException(e);
233 }
234
235 return (java.io.Serializable)returnObj;
236 }
237 catch (com.liferay.portal.kernel.exception.SystemException se) {
238 _log.error(se, se);
239
240 throw se;
241 }
242 }
243
244 public static com.liferay.portal.kernel.json.JSONObject getJSONData(
245 HttpPrincipal httpPrincipal, long companyId,
246 java.lang.String className, java.lang.String tableName,
247 java.lang.String columnName, long classPK)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException {
250 try {
251 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class,
252 "getJSONData", _getJSONDataParameterTypes5);
253
254 MethodHandler methodHandler = new MethodHandler(methodKey,
255 companyId, className, tableName, columnName, classPK);
256
257 Object returnObj = null;
258
259 try {
260 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
261 }
262 catch (Exception e) {
263 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
264 throw (com.liferay.portal.kernel.exception.PortalException)e;
265 }
266
267 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
268 throw (com.liferay.portal.kernel.exception.SystemException)e;
269 }
270
271 throw new com.liferay.portal.kernel.exception.SystemException(e);
272 }
273
274 return (com.liferay.portal.kernel.json.JSONObject)returnObj;
275 }
276 catch (com.liferay.portal.kernel.exception.SystemException se) {
277 _log.error(se, se);
278
279 throw se;
280 }
281 }
282
283 private static Log _log = LogFactoryUtil.getLog(ExpandoValueServiceHttp.class);
284 private static final Class<?>[] _addValueParameterTypes0 = new Class[] {
285 long.class, java.lang.String.class, java.lang.String.class,
286 java.lang.String.class, long.class, java.lang.Object.class
287 };
288 private static final Class<?>[] _addValueParameterTypes1 = new Class[] {
289 long.class, java.lang.String.class, java.lang.String.class,
290 java.lang.String.class, long.class, java.lang.String.class
291 };
292 private static final Class<?>[] _addValuesParameterTypes2 = new Class[] {
293 long.class, java.lang.String.class, java.lang.String.class,
294 long.class, java.util.Map.class
295 };
296 private static final Class<?>[] _getDataParameterTypes3 = new Class[] {
297 long.class, java.lang.String.class, java.lang.String.class,
298 java.util.Collection.class, long.class
299 };
300 private static final Class<?>[] _getDataParameterTypes4 = new Class[] {
301 long.class, java.lang.String.class, java.lang.String.class,
302 java.lang.String.class, long.class
303 };
304 private static final Class<?>[] _getJSONDataParameterTypes5 = new Class[] {
305 long.class, java.lang.String.class, java.lang.String.class,
306 java.lang.String.class, long.class
307 };
308 }