1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.BooleanWrapper;
20 import com.liferay.portal.kernel.util.LongWrapper;
21 import com.liferay.portal.kernel.util.MethodWrapper;
22 import com.liferay.portal.kernel.util.NullWrapper;
23 import com.liferay.portal.security.auth.HttpPrincipal;
24 import com.liferay.portal.service.LayoutSetPrototypeServiceUtil;
25
26
63 public class LayoutSetPrototypeServiceHttp {
64 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
65 HttpPrincipal httpPrincipal,
66 java.util.Map<java.util.Locale, String> nameMap,
67 java.lang.String description, boolean active)
68 throws com.liferay.portal.kernel.exception.PortalException,
69 com.liferay.portal.kernel.exception.SystemException {
70 try {
71 Object paramObj0 = nameMap;
72
73 if (nameMap == null) {
74 paramObj0 = new NullWrapper("java.util.Map");
75 }
76
77 Object paramObj1 = description;
78
79 if (description == null) {
80 paramObj1 = new NullWrapper("java.lang.String");
81 }
82
83 Object paramObj2 = new BooleanWrapper(active);
84
85 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetPrototypeServiceUtil.class.getName(),
86 "addLayoutSetPrototype",
87 new Object[] { paramObj0, paramObj1, paramObj2 });
88
89 Object returnObj = null;
90
91 try {
92 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
93 }
94 catch (Exception e) {
95 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
96 throw (com.liferay.portal.kernel.exception.PortalException)e;
97 }
98
99 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
100 throw (com.liferay.portal.kernel.exception.SystemException)e;
101 }
102
103 throw new com.liferay.portal.kernel.exception.SystemException(e);
104 }
105
106 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
107 }
108 catch (com.liferay.portal.kernel.exception.SystemException se) {
109 _log.error(se, se);
110
111 throw se;
112 }
113 }
114
115 public static void deleteLayoutSetPrototype(HttpPrincipal httpPrincipal,
116 long layoutSetPrototypeId)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException {
119 try {
120 Object paramObj0 = new LongWrapper(layoutSetPrototypeId);
121
122 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetPrototypeServiceUtil.class.getName(),
123 "deleteLayoutSetPrototype", new Object[] { paramObj0 });
124
125 try {
126 TunnelUtil.invoke(httpPrincipal, methodWrapper);
127 }
128 catch (Exception e) {
129 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
130 throw (com.liferay.portal.kernel.exception.PortalException)e;
131 }
132
133 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
134 throw (com.liferay.portal.kernel.exception.SystemException)e;
135 }
136
137 throw new com.liferay.portal.kernel.exception.SystemException(e);
138 }
139 }
140 catch (com.liferay.portal.kernel.exception.SystemException se) {
141 _log.error(se, se);
142
143 throw se;
144 }
145 }
146
147 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
148 HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
149 throws com.liferay.portal.kernel.exception.PortalException,
150 com.liferay.portal.kernel.exception.SystemException {
151 try {
152 Object paramObj0 = new LongWrapper(layoutSetPrototypeId);
153
154 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetPrototypeServiceUtil.class.getName(),
155 "getLayoutSetPrototype", new Object[] { paramObj0 });
156
157 Object returnObj = null;
158
159 try {
160 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
161 }
162 catch (Exception e) {
163 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164 throw (com.liferay.portal.kernel.exception.PortalException)e;
165 }
166
167 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
168 throw (com.liferay.portal.kernel.exception.SystemException)e;
169 }
170
171 throw new com.liferay.portal.kernel.exception.SystemException(e);
172 }
173
174 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
175 }
176 catch (com.liferay.portal.kernel.exception.SystemException se) {
177 _log.error(se, se);
178
179 throw se;
180 }
181 }
182
183 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
184 HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
185 com.liferay.portal.kernel.util.OrderByComparator obc)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 try {
189 Object paramObj0 = new LongWrapper(companyId);
190
191 Object paramObj1 = active;
192
193 if (active == null) {
194 paramObj1 = new NullWrapper("java.lang.Boolean");
195 }
196
197 Object paramObj2 = obc;
198
199 if (obc == null) {
200 paramObj2 = new NullWrapper(
201 "com.liferay.portal.kernel.util.OrderByComparator");
202 }
203
204 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetPrototypeServiceUtil.class.getName(),
205 "search", new Object[] { paramObj0, paramObj1, paramObj2 });
206
207 Object returnObj = null;
208
209 try {
210 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
211 }
212 catch (Exception e) {
213 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
214 throw (com.liferay.portal.kernel.exception.PortalException)e;
215 }
216
217 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
218 throw (com.liferay.portal.kernel.exception.SystemException)e;
219 }
220
221 throw new com.liferay.portal.kernel.exception.SystemException(e);
222 }
223
224 return (java.util.List<com.liferay.portal.model.LayoutSetPrototype>)returnObj;
225 }
226 catch (com.liferay.portal.kernel.exception.SystemException se) {
227 _log.error(se, se);
228
229 throw se;
230 }
231 }
232
233 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
234 HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
235 java.util.Map<java.util.Locale, String> nameMap,
236 java.lang.String description, boolean active)
237 throws com.liferay.portal.kernel.exception.PortalException,
238 com.liferay.portal.kernel.exception.SystemException {
239 try {
240 Object paramObj0 = new LongWrapper(layoutSetPrototypeId);
241
242 Object paramObj1 = nameMap;
243
244 if (nameMap == null) {
245 paramObj1 = new NullWrapper("java.util.Map");
246 }
247
248 Object paramObj2 = description;
249
250 if (description == null) {
251 paramObj2 = new NullWrapper("java.lang.String");
252 }
253
254 Object paramObj3 = new BooleanWrapper(active);
255
256 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetPrototypeServiceUtil.class.getName(),
257 "updateLayoutSetPrototype",
258 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
259
260 Object returnObj = null;
261
262 try {
263 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
264 }
265 catch (Exception e) {
266 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
267 throw (com.liferay.portal.kernel.exception.PortalException)e;
268 }
269
270 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
271 throw (com.liferay.portal.kernel.exception.SystemException)e;
272 }
273
274 throw new com.liferay.portal.kernel.exception.SystemException(e);
275 }
276
277 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
278 }
279 catch (com.liferay.portal.kernel.exception.SystemException se) {
280 _log.error(se, se);
281
282 throw se;
283 }
284 }
285
286 private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceHttp.class);
287 }