001
014
015 package com.liferay.portal.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.LayoutSetServiceUtil;
025
026
054 @ProviderType
055 public class LayoutSetServiceHttp {
056 public static void updateLayoutSetPrototypeLinkEnabled(
057 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
058 boolean layoutSetPrototypeLinkEnabled,
059 java.lang.String layoutSetPrototypeUuid)
060 throws com.liferay.portal.kernel.exception.PortalException {
061 try {
062 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
063 "updateLayoutSetPrototypeLinkEnabled",
064 _updateLayoutSetPrototypeLinkEnabledParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
067 privateLayout, layoutSetPrototypeLinkEnabled,
068 layoutSetPrototypeUuid);
069
070 try {
071 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 catch (com.liferay.portal.kernel.exception.SystemException se) {
082 _log.error(se, se);
083
084 throw se;
085 }
086 }
087
088 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
089 boolean privateLayout, boolean logo, byte[] bytes)
090 throws com.liferay.portal.kernel.exception.PortalException {
091 try {
092 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
093 "updateLogo", _updateLogoParameterTypes1);
094
095 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
096 privateLayout, logo, bytes);
097
098 try {
099 TunnelUtil.invoke(httpPrincipal, methodHandler);
100 }
101 catch (Exception e) {
102 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
103 throw (com.liferay.portal.kernel.exception.PortalException)e;
104 }
105
106 throw new com.liferay.portal.kernel.exception.SystemException(e);
107 }
108 }
109 catch (com.liferay.portal.kernel.exception.SystemException se) {
110 _log.error(se, se);
111
112 throw se;
113 }
114 }
115
116 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
117 boolean privateLayout, boolean logo, java.io.File file)
118 throws com.liferay.portal.kernel.exception.PortalException {
119 try {
120 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
121 "updateLogo", _updateLogoParameterTypes2);
122
123 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
124 privateLayout, logo, file);
125
126 try {
127 TunnelUtil.invoke(httpPrincipal, methodHandler);
128 }
129 catch (Exception e) {
130 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
131 throw (com.liferay.portal.kernel.exception.PortalException)e;
132 }
133
134 throw new com.liferay.portal.kernel.exception.SystemException(e);
135 }
136 }
137 catch (com.liferay.portal.kernel.exception.SystemException se) {
138 _log.error(se, se);
139
140 throw se;
141 }
142 }
143
144 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
145 boolean privateLayout, boolean logo, java.io.InputStream inputStream)
146 throws com.liferay.portal.kernel.exception.PortalException {
147 try {
148 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
149 "updateLogo", _updateLogoParameterTypes3);
150
151 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
152 privateLayout, logo, inputStream);
153
154 try {
155 TunnelUtil.invoke(httpPrincipal, methodHandler);
156 }
157 catch (Exception e) {
158 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
159 throw (com.liferay.portal.kernel.exception.PortalException)e;
160 }
161
162 throw new com.liferay.portal.kernel.exception.SystemException(e);
163 }
164 }
165 catch (com.liferay.portal.kernel.exception.SystemException se) {
166 _log.error(se, se);
167
168 throw se;
169 }
170 }
171
172 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
173 boolean privateLayout, boolean logo, java.io.InputStream inputStream,
174 boolean cleanUpStream)
175 throws com.liferay.portal.kernel.exception.PortalException {
176 try {
177 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
178 "updateLogo", _updateLogoParameterTypes4);
179
180 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
181 privateLayout, logo, inputStream, cleanUpStream);
182
183 try {
184 TunnelUtil.invoke(httpPrincipal, methodHandler);
185 }
186 catch (Exception e) {
187 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
188 throw (com.liferay.portal.kernel.exception.PortalException)e;
189 }
190
191 throw new com.liferay.portal.kernel.exception.SystemException(e);
192 }
193 }
194 catch (com.liferay.portal.kernel.exception.SystemException se) {
195 _log.error(se, se);
196
197 throw se;
198 }
199 }
200
201 public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
202 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
203 java.lang.String themeId, java.lang.String colorSchemeId,
204 java.lang.String css, boolean wapTheme)
205 throws com.liferay.portal.kernel.exception.PortalException {
206 try {
207 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
208 "updateLookAndFeel", _updateLookAndFeelParameterTypes5);
209
210 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
211 privateLayout, themeId, colorSchemeId, css, wapTheme);
212
213 Object returnObj = null;
214
215 try {
216 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
217 }
218 catch (Exception e) {
219 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
220 throw (com.liferay.portal.kernel.exception.PortalException)e;
221 }
222
223 throw new com.liferay.portal.kernel.exception.SystemException(e);
224 }
225
226 return (com.liferay.portal.model.LayoutSet)returnObj;
227 }
228 catch (com.liferay.portal.kernel.exception.SystemException se) {
229 _log.error(se, se);
230
231 throw se;
232 }
233 }
234
235 public static com.liferay.portal.model.LayoutSet updateSettings(
236 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
237 java.lang.String settings)
238 throws com.liferay.portal.kernel.exception.PortalException {
239 try {
240 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
241 "updateSettings", _updateSettingsParameterTypes6);
242
243 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
244 privateLayout, settings);
245
246 Object returnObj = null;
247
248 try {
249 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
250 }
251 catch (Exception e) {
252 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
253 throw (com.liferay.portal.kernel.exception.PortalException)e;
254 }
255
256 throw new com.liferay.portal.kernel.exception.SystemException(e);
257 }
258
259 return (com.liferay.portal.model.LayoutSet)returnObj;
260 }
261 catch (com.liferay.portal.kernel.exception.SystemException se) {
262 _log.error(se, se);
263
264 throw se;
265 }
266 }
267
268 public static com.liferay.portal.model.LayoutSet updateVirtualHost(
269 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
270 java.lang.String virtualHost)
271 throws com.liferay.portal.kernel.exception.PortalException {
272 try {
273 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class,
274 "updateVirtualHost", _updateVirtualHostParameterTypes7);
275
276 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
277 privateLayout, virtualHost);
278
279 Object returnObj = null;
280
281 try {
282 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
283 }
284 catch (Exception e) {
285 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
286 throw (com.liferay.portal.kernel.exception.PortalException)e;
287 }
288
289 throw new com.liferay.portal.kernel.exception.SystemException(e);
290 }
291
292 return (com.liferay.portal.model.LayoutSet)returnObj;
293 }
294 catch (com.liferay.portal.kernel.exception.SystemException se) {
295 _log.error(se, se);
296
297 throw se;
298 }
299 }
300
301 private static Log _log = LogFactoryUtil.getLog(LayoutSetServiceHttp.class);
302 private static final Class<?>[] _updateLayoutSetPrototypeLinkEnabledParameterTypes0 =
303 new Class[] {
304 long.class, boolean.class, boolean.class, java.lang.String.class
305 };
306 private static final Class<?>[] _updateLogoParameterTypes1 = new Class[] {
307 long.class, boolean.class, boolean.class, byte[].class
308 };
309 private static final Class<?>[] _updateLogoParameterTypes2 = new Class[] {
310 long.class, boolean.class, boolean.class, java.io.File.class
311 };
312 private static final Class<?>[] _updateLogoParameterTypes3 = new Class[] {
313 long.class, boolean.class, boolean.class, java.io.InputStream.class
314 };
315 private static final Class<?>[] _updateLogoParameterTypes4 = new Class[] {
316 long.class, boolean.class, boolean.class, java.io.InputStream.class,
317 boolean.class
318 };
319 private static final Class<?>[] _updateLookAndFeelParameterTypes5 = new Class[] {
320 long.class, boolean.class, java.lang.String.class,
321 java.lang.String.class, java.lang.String.class, boolean.class
322 };
323 private static final Class<?>[] _updateSettingsParameterTypes6 = new Class[] {
324 long.class, boolean.class, java.lang.String.class
325 };
326 private static final Class<?>[] _updateVirtualHostParameterTypes7 = new Class[] {
327 long.class, boolean.class, java.lang.String.class
328 };
329 }