1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.LayoutSetServiceUtil;
23
24
61 public class LayoutSetServiceHttp {
62 public static void updateLogo(HttpPrincipal httpPrincipal, long groupId,
63 boolean privateLayout, boolean logo, java.io.File file)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 try {
67 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
68 "updateLogo", _updateLogoParameterTypes0);
69
70 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
71 privateLayout, logo, file);
72
73 try {
74 TunnelUtil.invoke(httpPrincipal, methodHandler);
75 }
76 catch (Exception e) {
77 if (e instanceof com.liferay.portal.PortalException) {
78 throw (com.liferay.portal.PortalException)e;
79 }
80
81 if (e instanceof com.liferay.portal.SystemException) {
82 throw (com.liferay.portal.SystemException)e;
83 }
84
85 throw new com.liferay.portal.SystemException(e);
86 }
87 }
88 catch (com.liferay.portal.SystemException se) {
89 _log.error(se, se);
90
91 throw se;
92 }
93 }
94
95 public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
96 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
97 java.lang.String themeId, java.lang.String colorSchemeId,
98 java.lang.String css, boolean wapTheme)
99 throws com.liferay.portal.PortalException,
100 com.liferay.portal.SystemException {
101 try {
102 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
103 "updateLookAndFeel", _updateLookAndFeelParameterTypes1);
104
105 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
106 privateLayout, themeId, colorSchemeId, css, wapTheme);
107
108 Object returnObj = null;
109
110 try {
111 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
112 }
113 catch (Exception e) {
114 if (e instanceof com.liferay.portal.PortalException) {
115 throw (com.liferay.portal.PortalException)e;
116 }
117
118 if (e instanceof com.liferay.portal.SystemException) {
119 throw (com.liferay.portal.SystemException)e;
120 }
121
122 throw new com.liferay.portal.SystemException(e);
123 }
124
125 return (com.liferay.portal.model.LayoutSet)returnObj;
126 }
127 catch (com.liferay.portal.SystemException se) {
128 _log.error(se, se);
129
130 throw se;
131 }
132 }
133
134 public static com.liferay.portal.model.LayoutSet updateVirtualHost(
135 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
136 java.lang.String virtualHost)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException {
139 try {
140 MethodKey methodKey = new MethodKey(LayoutSetServiceUtil.class.getName(),
141 "updateVirtualHost", _updateVirtualHostParameterTypes2);
142
143 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
144 privateLayout, virtualHost);
145
146 Object returnObj = null;
147
148 try {
149 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
150 }
151 catch (Exception e) {
152 if (e instanceof com.liferay.portal.PortalException) {
153 throw (com.liferay.portal.PortalException)e;
154 }
155
156 if (e instanceof com.liferay.portal.SystemException) {
157 throw (com.liferay.portal.SystemException)e;
158 }
159
160 throw new com.liferay.portal.SystemException(e);
161 }
162
163 return (com.liferay.portal.model.LayoutSet)returnObj;
164 }
165 catch (com.liferay.portal.SystemException se) {
166 _log.error(se, se);
167
168 throw se;
169 }
170 }
171
172 private static Log _log = LogFactoryUtil.getLog(LayoutSetServiceHttp.class);
173 private static final Class<?>[] _updateLogoParameterTypes0 = new Class[] {
174 long.class, boolean.class, boolean.class, java.io.File.class
175 };
176 private static final Class<?>[] _updateLookAndFeelParameterTypes1 = new Class[] {
177 long.class, boolean.class, java.lang.String.class,
178 java.lang.String.class, java.lang.String.class, boolean.class
179 };
180 private static final Class<?>[] _updateVirtualHostParameterTypes2 = new Class[] {
181 long.class, boolean.class, java.lang.String.class
182 };
183 }