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