1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.BooleanWrapper;
28 import com.liferay.portal.kernel.util.LongWrapper;
29 import com.liferay.portal.kernel.util.MethodWrapper;
30 import com.liferay.portal.kernel.util.NullWrapper;
31 import com.liferay.portal.security.auth.HttpPrincipal;
32 import com.liferay.portal.service.LayoutSetServiceUtil;
33
34
71 public class LayoutSetServiceHttp {
72 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
73 boolean privateLayout, boolean logo, java.io.File file)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 try {
77 Object paramObj0 = new LongWrapper(groupId);
78
79 Object paramObj1 = new BooleanWrapper(privateLayout);
80
81 Object paramObj2 = new BooleanWrapper(logo);
82
83 Object paramObj3 = file;
84
85 if (file == null) {
86 paramObj3 = new NullWrapper("java.io.File");
87 }
88
89 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetServiceUtil.class.getName(),
90 "updateLogo",
91 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
92
93 try {
94 TunnelUtil.invoke(httpPrincipal, methodWrapper);
95 }
96 catch (Exception e) {
97 if (e instanceof com.liferay.portal.PortalException) {
98 throw (com.liferay.portal.PortalException)e;
99 }
100
101 if (e instanceof com.liferay.portal.SystemException) {
102 throw (com.liferay.portal.SystemException)e;
103 }
104
105 throw new com.liferay.portal.SystemException(e);
106 }
107 }
108 catch (com.liferay.portal.SystemException se) {
109 _log.error(se, se);
110
111 throw se;
112 }
113 }
114
115 public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
116 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
117 java.lang.String themeId, java.lang.String colorSchemeId,
118 java.lang.String css, boolean wapTheme)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException {
121 try {
122 Object paramObj0 = new LongWrapper(groupId);
123
124 Object paramObj1 = new BooleanWrapper(privateLayout);
125
126 Object paramObj2 = themeId;
127
128 if (themeId == null) {
129 paramObj2 = new NullWrapper("java.lang.String");
130 }
131
132 Object paramObj3 = colorSchemeId;
133
134 if (colorSchemeId == null) {
135 paramObj3 = new NullWrapper("java.lang.String");
136 }
137
138 Object paramObj4 = css;
139
140 if (css == null) {
141 paramObj4 = new NullWrapper("java.lang.String");
142 }
143
144 Object paramObj5 = new BooleanWrapper(wapTheme);
145
146 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetServiceUtil.class.getName(),
147 "updateLookAndFeel",
148 new Object[] {
149 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
150 paramObj5
151 });
152
153 Object returnObj = null;
154
155 try {
156 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
157 }
158 catch (Exception e) {
159 if (e instanceof com.liferay.portal.PortalException) {
160 throw (com.liferay.portal.PortalException)e;
161 }
162
163 if (e instanceof com.liferay.portal.SystemException) {
164 throw (com.liferay.portal.SystemException)e;
165 }
166
167 throw new com.liferay.portal.SystemException(e);
168 }
169
170 return (com.liferay.portal.model.LayoutSet)returnObj;
171 }
172 catch (com.liferay.portal.SystemException se) {
173 _log.error(se, se);
174
175 throw se;
176 }
177 }
178
179 public static com.liferay.portal.model.LayoutSet updateVirtualHost(
180 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
181 java.lang.String virtualHost)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 try {
185 Object paramObj0 = new LongWrapper(groupId);
186
187 Object paramObj1 = new BooleanWrapper(privateLayout);
188
189 Object paramObj2 = virtualHost;
190
191 if (virtualHost == null) {
192 paramObj2 = new NullWrapper("java.lang.String");
193 }
194
195 MethodWrapper methodWrapper = new MethodWrapper(LayoutSetServiceUtil.class.getName(),
196 "updateVirtualHost",
197 new Object[] { paramObj0, paramObj1, paramObj2 });
198
199 Object returnObj = null;
200
201 try {
202 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
203 }
204 catch (Exception e) {
205 if (e instanceof com.liferay.portal.PortalException) {
206 throw (com.liferay.portal.PortalException)e;
207 }
208
209 if (e instanceof com.liferay.portal.SystemException) {
210 throw (com.liferay.portal.SystemException)e;
211 }
212
213 throw new com.liferay.portal.SystemException(e);
214 }
215
216 return (com.liferay.portal.model.LayoutSet)returnObj;
217 }
218 catch (com.liferay.portal.SystemException se) {
219 _log.error(se, se);
220
221 throw se;
222 }
223 }
224
225 private static Log _log = LogFactoryUtil.getLog(LayoutSetServiceHttp.class);
226 }