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.LayoutSetPrototypeServiceUtil;
023
024
054 public class LayoutSetPrototypeServiceHttp {
055 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
056 HttpPrincipal httpPrincipal,
057 java.util.Map<java.util.Locale, java.lang.String> nameMap,
058 java.lang.String description, boolean active)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 try {
062 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class.getName(),
063 "addLayoutSetPrototype",
064 _addLayoutSetPrototypeParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
067 description, active);
068
069 Object returnObj = null;
070
071 try {
072 returnObj = 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 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
080 throw (com.liferay.portal.kernel.exception.SystemException)e;
081 }
082
083 throw new com.liferay.portal.kernel.exception.SystemException(e);
084 }
085
086 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
087 }
088 catch (com.liferay.portal.kernel.exception.SystemException se) {
089 _log.error(se, se);
090
091 throw se;
092 }
093 }
094
095 public static void deleteLayoutSetPrototype(HttpPrincipal httpPrincipal,
096 long layoutSetPrototypeId)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 try {
100 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class.getName(),
101 "deleteLayoutSetPrototype",
102 _deleteLayoutSetPrototypeParameterTypes1);
103
104 MethodHandler methodHandler = new MethodHandler(methodKey,
105 layoutSetPrototypeId);
106
107 try {
108 TunnelUtil.invoke(httpPrincipal, methodHandler);
109 }
110 catch (Exception e) {
111 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
112 throw (com.liferay.portal.kernel.exception.PortalException)e;
113 }
114
115 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
116 throw (com.liferay.portal.kernel.exception.SystemException)e;
117 }
118
119 throw new com.liferay.portal.kernel.exception.SystemException(e);
120 }
121 }
122 catch (com.liferay.portal.kernel.exception.SystemException se) {
123 _log.error(se, se);
124
125 throw se;
126 }
127 }
128
129 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
130 HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 try {
134 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class.getName(),
135 "getLayoutSetPrototype",
136 _getLayoutSetPrototypeParameterTypes2);
137
138 MethodHandler methodHandler = new MethodHandler(methodKey,
139 layoutSetPrototypeId);
140
141 Object returnObj = null;
142
143 try {
144 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
145 }
146 catch (Exception e) {
147 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
148 throw (com.liferay.portal.kernel.exception.PortalException)e;
149 }
150
151 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
152 throw (com.liferay.portal.kernel.exception.SystemException)e;
153 }
154
155 throw new com.liferay.portal.kernel.exception.SystemException(e);
156 }
157
158 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
159 }
160 catch (com.liferay.portal.kernel.exception.SystemException se) {
161 _log.error(se, se);
162
163 throw se;
164 }
165 }
166
167 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
168 HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
169 com.liferay.portal.kernel.util.OrderByComparator obc)
170 throws com.liferay.portal.kernel.exception.PortalException,
171 com.liferay.portal.kernel.exception.SystemException {
172 try {
173 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class.getName(),
174 "search", _searchParameterTypes3);
175
176 MethodHandler methodHandler = new MethodHandler(methodKey,
177 companyId, active, obc);
178
179 Object returnObj = null;
180
181 try {
182 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
183 }
184 catch (Exception e) {
185 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
186 throw (com.liferay.portal.kernel.exception.PortalException)e;
187 }
188
189 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190 throw (com.liferay.portal.kernel.exception.SystemException)e;
191 }
192
193 throw new com.liferay.portal.kernel.exception.SystemException(e);
194 }
195
196 return (java.util.List<com.liferay.portal.model.LayoutSetPrototype>)returnObj;
197 }
198 catch (com.liferay.portal.kernel.exception.SystemException se) {
199 _log.error(se, se);
200
201 throw se;
202 }
203 }
204
205 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
206 HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
207 java.util.Map<java.util.Locale, java.lang.String> nameMap,
208 java.lang.String description, boolean active)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 try {
212 MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class.getName(),
213 "updateLayoutSetPrototype",
214 _updateLayoutSetPrototypeParameterTypes4);
215
216 MethodHandler methodHandler = new MethodHandler(methodKey,
217 layoutSetPrototypeId, nameMap, description, active);
218
219 Object returnObj = null;
220
221 try {
222 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
223 }
224 catch (Exception e) {
225 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
226 throw (com.liferay.portal.kernel.exception.PortalException)e;
227 }
228
229 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
230 throw (com.liferay.portal.kernel.exception.SystemException)e;
231 }
232
233 throw new com.liferay.portal.kernel.exception.SystemException(e);
234 }
235
236 return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
237 }
238 catch (com.liferay.portal.kernel.exception.SystemException se) {
239 _log.error(se, se);
240
241 throw se;
242 }
243 }
244
245 private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceHttp.class);
246 private static final Class<?>[] _addLayoutSetPrototypeParameterTypes0 = new Class[] {
247 java.util.Map.class, java.lang.String.class, boolean.class
248 };
249 private static final Class<?>[] _deleteLayoutSetPrototypeParameterTypes1 = new Class[] {
250 long.class
251 };
252 private static final Class<?>[] _getLayoutSetPrototypeParameterTypes2 = new Class[] {
253 long.class
254 };
255 private static final Class<?>[] _searchParameterTypes3 = new Class[] {
256 long.class, java.lang.Boolean.class,
257 com.liferay.portal.kernel.util.OrderByComparator.class
258 };
259 private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes4 = new Class[] {
260 long.class, java.util.Map.class, java.lang.String.class,
261 boolean.class
262 };
263 }