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.LayoutSetServiceUtil;
023
024
054 public class LayoutSetServiceHttp {
055 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
056 boolean privateLayout, boolean logo, java.io.InputStream inputStream)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException {
059 try {
060 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
061 "updateLogo", _updateLogoParameterTypes0);
062
063 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
064 privateLayout, logo, inputStream);
065
066 try {
067 TunnelUtil.invoke(httpPrincipal, methodHandler);
068 }
069 catch (Exception e) {
070 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
071 throw (com.liferay.portal.kernel.exception.PortalException)e;
072 }
073
074 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
075 throw (com.liferay.portal.kernel.exception.SystemException)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, java.io.InputStream inputStream,
090 boolean cleanUpStream)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException {
093 try {
094 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
095 "updateLogo", _updateLogoParameterTypes1);
096
097 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
098 privateLayout, logo, inputStream, cleanUpStream);
099
100 try {
101 TunnelUtil.invoke(httpPrincipal, methodHandler);
102 }
103 catch (Exception e) {
104 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
105 throw (com.liferay.portal.kernel.exception.PortalException)e;
106 }
107
108 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
109 throw (com.liferay.portal.kernel.exception.SystemException)e;
110 }
111
112 throw new com.liferay.portal.kernel.exception.SystemException(e);
113 }
114 }
115 catch (com.liferay.portal.kernel.exception.SystemException se) {
116 _log.error(se, se);
117
118 throw se;
119 }
120 }
121
122 public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
123 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
124 java.lang.String themeId, java.lang.String colorSchemeId,
125 java.lang.String css, boolean wapTheme)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 try {
129 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
130 "updateLookAndFeel", _updateLookAndFeelParameterTypes2);
131
132 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
133 privateLayout, themeId, colorSchemeId, css, wapTheme);
134
135 Object returnObj = null;
136
137 try {
138 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
139 }
140 catch (Exception e) {
141 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
142 throw (com.liferay.portal.kernel.exception.PortalException)e;
143 }
144
145 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
146 throw (com.liferay.portal.kernel.exception.SystemException)e;
147 }
148
149 throw new com.liferay.portal.kernel.exception.SystemException(e);
150 }
151
152 return (com.liferay.portal.model.LayoutSet)returnObj;
153 }
154 catch (com.liferay.portal.kernel.exception.SystemException se) {
155 _log.error(se, se);
156
157 throw se;
158 }
159 }
160
161 public static com.liferay.portal.model.LayoutSet updateSettings(
162 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
163 java.lang.String settings)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 try {
167 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
168 "updateSettings", _updateSettingsParameterTypes3);
169
170 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
171 privateLayout, settings);
172
173 Object returnObj = null;
174
175 try {
176 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
177 }
178 catch (Exception e) {
179 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
180 throw (com.liferay.portal.kernel.exception.PortalException)e;
181 }
182
183 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
184 throw (com.liferay.portal.kernel.exception.SystemException)e;
185 }
186
187 throw new com.liferay.portal.kernel.exception.SystemException(e);
188 }
189
190 return (com.liferay.portal.model.LayoutSet)returnObj;
191 }
192 catch (com.liferay.portal.kernel.exception.SystemException se) {
193 _log.error(se, se);
194
195 throw se;
196 }
197 }
198
199 public static com.liferay.portal.model.LayoutSet updateVirtualHost(
200 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
201 java.lang.String virtualHost)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 try {
205 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
206 "updateVirtualHost", _updateVirtualHostParameterTypes4);
207
208 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
209 privateLayout, virtualHost);
210
211 Object returnObj = null;
212
213 try {
214 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
215 }
216 catch (Exception e) {
217 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
218 throw (com.liferay.portal.kernel.exception.PortalException)e;
219 }
220
221 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
222 throw (com.liferay.portal.kernel.exception.SystemException)e;
223 }
224
225 throw new com.liferay.portal.kernel.exception.SystemException(e);
226 }
227
228 return (com.liferay.portal.model.LayoutSet)returnObj;
229 }
230 catch (com.liferay.portal.kernel.exception.SystemException se) {
231 _log.error(se, se);
232
233 throw se;
234 }
235 }
236
237 private static Log _log = LogFactoryUtil.getLog(LayoutSetServiceHttp.class);
238 private static final Class<?>[] _updateLogoParameterTypes0 = new Class[] {
239 long.class, boolean.class, boolean.class, java.io.InputStream.class
240 };
241 private static final Class<?>[] _updateLogoParameterTypes1 = new Class[] {
242 long.class, boolean.class, boolean.class, java.io.InputStream.class,
243 boolean.class
244 };
245 private static final Class<?>[] _updateLookAndFeelParameterTypes2 = new Class[] {
246 long.class, boolean.class, java.lang.String.class,
247 java.lang.String.class, java.lang.String.class, boolean.class
248 };
249 private static final Class<?>[] _updateSettingsParameterTypes3 = new Class[] {
250 long.class, boolean.class, java.lang.String.class
251 };
252 private static final Class<?>[] _updateVirtualHostParameterTypes4 = new Class[] {
253 long.class, boolean.class, java.lang.String.class
254 };
255 }