001
014
015 package com.liferay.portlet.expando.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.MethodHandler;
022 import com.liferay.portal.kernel.util.MethodKey;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.http.TunnelUtil;
025
026 import com.liferay.portlet.expando.service.ExpandoColumnServiceUtil;
027
028
056 @ProviderType
057 public class ExpandoColumnServiceHttp {
058 public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
059 HttpPrincipal httpPrincipal, long tableId, java.lang.String name,
060 int type) throws com.liferay.portal.kernel.exception.PortalException {
061 try {
062 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
063 "addColumn", _addColumnParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey, tableId,
066 name, type);
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 throw new com.liferay.portal.kernel.exception.SystemException(e);
079 }
080
081 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
082 }
083 catch (com.liferay.portal.kernel.exception.SystemException se) {
084 _log.error(se, se);
085
086 throw se;
087 }
088 }
089
090 public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
091 HttpPrincipal httpPrincipal, long tableId, java.lang.String name,
092 int type, java.lang.Object defaultData)
093 throws com.liferay.portal.kernel.exception.PortalException {
094 try {
095 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
096 "addColumn", _addColumnParameterTypes1);
097
098 MethodHandler methodHandler = new MethodHandler(methodKey, tableId,
099 name, type, defaultData);
100
101 Object returnObj = null;
102
103 try {
104 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
105 }
106 catch (Exception e) {
107 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
108 throw (com.liferay.portal.kernel.exception.PortalException)e;
109 }
110
111 throw new com.liferay.portal.kernel.exception.SystemException(e);
112 }
113
114 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
115 }
116 catch (com.liferay.portal.kernel.exception.SystemException se) {
117 _log.error(se, se);
118
119 throw se;
120 }
121 }
122
123 public static void deleteColumn(HttpPrincipal httpPrincipal, long columnId)
124 throws com.liferay.portal.kernel.exception.PortalException {
125 try {
126 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
127 "deleteColumn", _deleteColumnParameterTypes2);
128
129 MethodHandler methodHandler = new MethodHandler(methodKey, columnId);
130
131 try {
132 TunnelUtil.invoke(httpPrincipal, methodHandler);
133 }
134 catch (Exception e) {
135 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
136 throw (com.liferay.portal.kernel.exception.PortalException)e;
137 }
138
139 throw new com.liferay.portal.kernel.exception.SystemException(e);
140 }
141 }
142 catch (com.liferay.portal.kernel.exception.SystemException se) {
143 _log.error(se, se);
144
145 throw se;
146 }
147 }
148
149 public static com.liferay.portlet.expando.model.ExpandoColumn fetchExpandoColumn(
150 HttpPrincipal httpPrincipal, long columnId)
151 throws com.liferay.portal.kernel.exception.PortalException {
152 try {
153 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
154 "fetchExpandoColumn", _fetchExpandoColumnParameterTypes3);
155
156 MethodHandler methodHandler = new MethodHandler(methodKey, columnId);
157
158 Object returnObj = null;
159
160 try {
161 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
162 }
163 catch (Exception e) {
164 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
165 throw (com.liferay.portal.kernel.exception.PortalException)e;
166 }
167
168 throw new com.liferay.portal.kernel.exception.SystemException(e);
169 }
170
171 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
172 }
173 catch (com.liferay.portal.kernel.exception.SystemException se) {
174 _log.error(se, se);
175
176 throw se;
177 }
178 }
179
180 public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
181 HttpPrincipal httpPrincipal, long columnId, java.lang.String name,
182 int type) throws com.liferay.portal.kernel.exception.PortalException {
183 try {
184 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
185 "updateColumn", _updateColumnParameterTypes4);
186
187 MethodHandler methodHandler = new MethodHandler(methodKey,
188 columnId, name, type);
189
190 Object returnObj = null;
191
192 try {
193 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
194 }
195 catch (Exception e) {
196 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
197 throw (com.liferay.portal.kernel.exception.PortalException)e;
198 }
199
200 throw new com.liferay.portal.kernel.exception.SystemException(e);
201 }
202
203 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
204 }
205 catch (com.liferay.portal.kernel.exception.SystemException se) {
206 _log.error(se, se);
207
208 throw se;
209 }
210 }
211
212 public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
213 HttpPrincipal httpPrincipal, long columnId, java.lang.String name,
214 int type, java.lang.Object defaultData)
215 throws com.liferay.portal.kernel.exception.PortalException {
216 try {
217 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
218 "updateColumn", _updateColumnParameterTypes5);
219
220 MethodHandler methodHandler = new MethodHandler(methodKey,
221 columnId, name, type, defaultData);
222
223 Object returnObj = null;
224
225 try {
226 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
227 }
228 catch (Exception e) {
229 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
230 throw (com.liferay.portal.kernel.exception.PortalException)e;
231 }
232
233 throw new com.liferay.portal.kernel.exception.SystemException(e);
234 }
235
236 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
237 }
238 catch (com.liferay.portal.kernel.exception.SystemException se) {
239 _log.error(se, se);
240
241 throw se;
242 }
243 }
244
245 public static com.liferay.portlet.expando.model.ExpandoColumn updateTypeSettings(
246 HttpPrincipal httpPrincipal, long columnId,
247 java.lang.String typeSettings)
248 throws com.liferay.portal.kernel.exception.PortalException {
249 try {
250 MethodKey methodKey = new MethodKey(ExpandoColumnServiceUtil.class,
251 "updateTypeSettings", _updateTypeSettingsParameterTypes6);
252
253 MethodHandler methodHandler = new MethodHandler(methodKey,
254 columnId, typeSettings);
255
256 Object returnObj = null;
257
258 try {
259 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
260 }
261 catch (Exception e) {
262 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
263 throw (com.liferay.portal.kernel.exception.PortalException)e;
264 }
265
266 throw new com.liferay.portal.kernel.exception.SystemException(e);
267 }
268
269 return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
270 }
271 catch (com.liferay.portal.kernel.exception.SystemException se) {
272 _log.error(se, se);
273
274 throw se;
275 }
276 }
277
278 private static Log _log = LogFactoryUtil.getLog(ExpandoColumnServiceHttp.class);
279 private static final Class<?>[] _addColumnParameterTypes0 = new Class[] {
280 long.class, java.lang.String.class, int.class
281 };
282 private static final Class<?>[] _addColumnParameterTypes1 = new Class[] {
283 long.class, java.lang.String.class, int.class,
284 java.lang.Object.class
285 };
286 private static final Class<?>[] _deleteColumnParameterTypes2 = new Class[] {
287 long.class
288 };
289 private static final Class<?>[] _fetchExpandoColumnParameterTypes3 = new Class[] {
290 long.class
291 };
292 private static final Class<?>[] _updateColumnParameterTypes4 = new Class[] {
293 long.class, java.lang.String.class, int.class
294 };
295 private static final Class<?>[] _updateColumnParameterTypes5 = new Class[] {
296 long.class, java.lang.String.class, int.class,
297 java.lang.Object.class
298 };
299 private static final Class<?>[] _updateTypeSettingsParameterTypes6 = new Class[] {
300 long.class, java.lang.String.class
301 };
302 }