001
014
015 package com.liferay.portal.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.LayoutSetPrototypeServiceUtil;
023
024
052 public class LayoutSetPrototypeServiceHttp {
053 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
054 HttpPrincipal httpPrincipal,
055 java.util.Map<java.util.Locale, java.lang.String> nameMap,
056 java.lang.String description, boolean active,
057 boolean layoutsUpdateable,
058 com.liferay.portal.service.ServiceContext serviceContext)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 try {
062 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
063 "addLayoutSetPrototype",
064 _addLayoutSetPrototypeParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
067 description, active, layoutsUpdateable, serviceContext);
068
069 Object returnObj = null;
070
071 try {
072 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
073 }
074 catch (Exception e) {
075 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
076 throw (com.liferay.portal.kernel.exception.PortalException)e;
077 }
078
079 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
080 throw (com.liferay.portal.kernel.exception.SystemException)e;
081 }
082
083 throw new com.liferay.portal.kernel.exception.SystemException(e);
084 }
085
086 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
087 }
088 catch (com.liferay.portal.kernel.exception.SystemException se) {
089 _log.error(se, se);
090
091 throw se;
092 }
093 }
094
095 public static void deleteLayoutSetPrototype(HttpPrincipal httpPrincipal,
096 long layoutSetPrototypeId)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 try {
100 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
101 "deleteLayoutSetPrototype",
102 _deleteLayoutSetPrototypeParameterTypes1);
103
104 MethodHandler methodHandler = new MethodHandler(methodKey,
105 layoutSetPrototypeId);
106
107 try {
108 TunnelUtil.invoke(httpPrincipal, methodHandler);
109 }
110 catch (Exception e) {
111 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
112 throw (com.liferay.portal.kernel.exception.PortalException)e;
113 }
114
115 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
116 throw (com.liferay.portal.kernel.exception.SystemException)e;
117 }
118
119 throw new com.liferay.portal.kernel.exception.SystemException(e);
120 }
121 }
122 catch (com.liferay.portal.kernel.exception.SystemException se) {
123 _log.error(se, se);
124
125 throw se;
126 }
127 }
128
129 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
130 HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 try {
134 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
135 "getLayoutSetPrototype",
136 _getLayoutSetPrototypeParameterTypes2);
137
138 MethodHandler methodHandler = new MethodHandler(methodKey,
139 layoutSetPrototypeId);
140
141 Object returnObj = null;
142
143 try {
144 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
145 }
146 catch (Exception e) {
147 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
148 throw (com.liferay.portal.kernel.exception.PortalException)e;
149 }
150
151 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
152 throw (com.liferay.portal.kernel.exception.SystemException)e;
153 }
154
155 throw new com.liferay.portal.kernel.exception.SystemException(e);
156 }
157
158 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
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.List<com.liferay.portal.model.LayoutSetPrototype> search(
168 HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
169 com.liferay.portal.kernel.util.OrderByComparator obc)
170 throws com.liferay.portal.kernel.exception.PortalException,
171 com.liferay.portal.kernel.exception.SystemException {
172 try {
173 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
174 "search", _searchParameterTypes3);
175
176 MethodHandler methodHandler = new MethodHandler(methodKey,
177 companyId, active, obc);
178
179 Object returnObj = null;
180
181 try {
182 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
183 }
184 catch (Exception e) {
185 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
186 throw (com.liferay.portal.kernel.exception.PortalException)e;
187 }
188
189 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190 throw (com.liferay.portal.kernel.exception.SystemException)e;
191 }
192
193 throw new com.liferay.portal.kernel.exception.SystemException(e);
194 }
195
196 return (java.util.List<com.liferay.portal.model.LayoutSetPrototype>)returnObj;
197 }
198 catch (com.liferay.portal.kernel.exception.SystemException se) {
199 _log.error(se, se);
200
201 throw se;
202 }
203 }
204
205 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
206 HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
207 java.util.Map<java.util.Locale, java.lang.String> nameMap,
208 java.lang.String description, boolean active,
209 boolean layoutsUpdateable,
210 com.liferay.portal.service.ServiceContext serviceContext)
211 throws com.liferay.portal.kernel.exception.PortalException,
212 com.liferay.portal.kernel.exception.SystemException {
213 try {
214 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
215 "updateLayoutSetPrototype",
216 _updateLayoutSetPrototypeParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey,
219 layoutSetPrototypeId, nameMap, description, active,
220 layoutsUpdateable, 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.portal.model.LayoutSetPrototype)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.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
249 HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
250 java.lang.String settings)
251 throws com.liferay.portal.kernel.exception.PortalException,
252 com.liferay.portal.kernel.exception.SystemException {
253 try {
254 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
255 "updateLayoutSetPrototype",
256 _updateLayoutSetPrototypeParameterTypes5);
257
258 MethodHandler methodHandler = new MethodHandler(methodKey,
259 layoutSetPrototypeId, settings);
260
261 Object returnObj = null;
262
263 try {
264 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
265 }
266 catch (Exception e) {
267 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
268 throw (com.liferay.portal.kernel.exception.PortalException)e;
269 }
270
271 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
272 throw (com.liferay.portal.kernel.exception.SystemException)e;
273 }
274
275 throw new com.liferay.portal.kernel.exception.SystemException(e);
276 }
277
278 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
279 }
280 catch (com.liferay.portal.kernel.exception.SystemException se) {
281 _log.error(se, se);
282
283 throw se;
284 }
285 }
286
287 private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceHttp.class);
288 private static final Class<?>[] _addLayoutSetPrototypeParameterTypes0 = new Class[] {
289 java.util.Map.class, java.lang.String.class, boolean.class,
290 boolean.class, com.liferay.portal.service.ServiceContext.class
291 };
292 private static final Class<?>[] _deleteLayoutSetPrototypeParameterTypes1 = new Class[] {
293 long.class
294 };
295 private static final Class<?>[] _getLayoutSetPrototypeParameterTypes2 = new Class[] {
296 long.class
297 };
298 private static final Class<?>[] _searchParameterTypes3 = new Class[] {
299 long.class, java.lang.Boolean.class,
300 com.liferay.portal.kernel.util.OrderByComparator.class
301 };
302 private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes4 = new Class[] {
303 long.class, java.util.Map.class, java.lang.String.class,
304 boolean.class, boolean.class,
305 com.liferay.portal.service.ServiceContext.class
306 };
307 private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes5 = new Class[] {
308 long.class, java.lang.String.class
309 };
310 }