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.File file)
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, file);
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 com.liferay.portal.model.LayoutSet updateLookAndFeel(
089 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
090 java.lang.String themeId, java.lang.String colorSchemeId,
091 java.lang.String css, boolean wapTheme)
092 throws com.liferay.portal.kernel.exception.PortalException,
093 com.liferay.portal.kernel.exception.SystemException {
094 try {
095 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
096 "updateLookAndFeel", _updateLookAndFeelParameterTypes1);
097
098 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
099 privateLayout, themeId, colorSchemeId, css, wapTheme);
100
101 Object returnObj = null;
102
103 try {
104 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
105 }
106 catch (Exception e) {
107 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
108 throw (com.liferay.portal.kernel.exception.PortalException)e;
109 }
110
111 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
112 throw (com.liferay.portal.kernel.exception.SystemException)e;
113 }
114
115 throw new com.liferay.portal.kernel.exception.SystemException(e);
116 }
117
118 return (com.liferay.portal.model.LayoutSet)returnObj;
119 }
120 catch (com.liferay.portal.kernel.exception.SystemException se) {
121 _log.error(se, se);
122
123 throw se;
124 }
125 }
126
127 public static com.liferay.portal.model.LayoutSet updateSettings(
128 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
129 java.lang.String settings)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 try {
133 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
134 "updateSettings", _updateSettingsParameterTypes2);
135
136 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
137 privateLayout, settings);
138
139 Object returnObj = null;
140
141 try {
142 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
143 }
144 catch (Exception e) {
145 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
146 throw (com.liferay.portal.kernel.exception.PortalException)e;
147 }
148
149 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
150 throw (com.liferay.portal.kernel.exception.SystemException)e;
151 }
152
153 throw new com.liferay.portal.kernel.exception.SystemException(e);
154 }
155
156 return (com.liferay.portal.model.LayoutSet)returnObj;
157 }
158 catch (com.liferay.portal.kernel.exception.SystemException se) {
159 _log.error(se, se);
160
161 throw se;
162 }
163 }
164
165 public static com.liferay.portal.model.LayoutSet updateVirtualHost(
166 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
167 java.lang.String virtualHost)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 try {
171 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
172 "updateVirtualHost", _updateVirtualHostParameterTypes3);
173
174 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
175 privateLayout, virtualHost);
176
177 Object returnObj = null;
178
179 try {
180 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
181 }
182 catch (Exception e) {
183 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
184 throw (com.liferay.portal.kernel.exception.PortalException)e;
185 }
186
187 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
188 throw (com.liferay.portal.kernel.exception.SystemException)e;
189 }
190
191 throw new com.liferay.portal.kernel.exception.SystemException(e);
192 }
193
194 return (com.liferay.portal.model.LayoutSet)returnObj;
195 }
196 catch (com.liferay.portal.kernel.exception.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 private static Log _log = LogFactoryUtil.getLog(LayoutSetServiceHttp.class);
204 private static final Class<?>[] _updateLogoParameterTypes0 = new Class[] {
205 long.class, boolean.class, boolean.class, java.io.File.class
206 };
207 private static final Class<?>[] _updateLookAndFeelParameterTypes1 = new Class[] {
208 long.class, boolean.class, java.lang.String.class,
209 java.lang.String.class, java.lang.String.class, boolean.class
210 };
211 private static final Class<?>[] _updateSettingsParameterTypes2 = new Class[] {
212 long.class, boolean.class, java.lang.String.class
213 };
214 private static final Class<?>[] _updateVirtualHostParameterTypes3 = new Class[] {
215 long.class, boolean.class, java.lang.String.class
216 };
217 }