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.LayoutPrototypeServiceUtil;
023
024
054 public class LayoutPrototypeServiceHttp {
055 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype(
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(LayoutPrototypeServiceUtil.class.getName(),
063 "addLayoutPrototype", _addLayoutPrototypeParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
066 description, active);
067
068 Object returnObj = null;
069
070 try {
071 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
072 }
073 catch (Exception e) {
074 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
075 throw (com.liferay.portal.kernel.exception.PortalException)e;
076 }
077
078 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
079 throw (com.liferay.portal.kernel.exception.SystemException)e;
080 }
081
082 throw new com.liferay.portal.kernel.exception.SystemException(e);
083 }
084
085 return (com.liferay.portal.model.LayoutPrototype)returnObj;
086 }
087 catch (com.liferay.portal.kernel.exception.SystemException se) {
088 _log.error(se, se);
089
090 throw se;
091 }
092 }
093
094 public static void deleteLayoutPrototype(HttpPrincipal httpPrincipal,
095 long layoutPrototypeId)
096 throws com.liferay.portal.kernel.exception.PortalException,
097 com.liferay.portal.kernel.exception.SystemException {
098 try {
099 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class.getName(),
100 "deleteLayoutPrototype",
101 _deleteLayoutPrototypeParameterTypes1);
102
103 MethodHandler methodHandler = new MethodHandler(methodKey,
104 layoutPrototypeId);
105
106 try {
107 TunnelUtil.invoke(httpPrincipal, methodHandler);
108 }
109 catch (Exception e) {
110 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
111 throw (com.liferay.portal.kernel.exception.PortalException)e;
112 }
113
114 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
115 throw (com.liferay.portal.kernel.exception.SystemException)e;
116 }
117
118 throw new com.liferay.portal.kernel.exception.SystemException(e);
119 }
120 }
121 catch (com.liferay.portal.kernel.exception.SystemException se) {
122 _log.error(se, se);
123
124 throw se;
125 }
126 }
127
128 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype(
129 HttpPrincipal httpPrincipal, long layoutPrototypeId)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 try {
133 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class.getName(),
134 "getLayoutPrototype", _getLayoutPrototypeParameterTypes2);
135
136 MethodHandler methodHandler = new MethodHandler(methodKey,
137 layoutPrototypeId);
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.LayoutPrototype)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 java.util.List<com.liferay.portal.model.LayoutPrototype> search(
166 HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
167 com.liferay.portal.kernel.util.OrderByComparator obc)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 try {
171 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class.getName(),
172 "search", _searchParameterTypes3);
173
174 MethodHandler methodHandler = new MethodHandler(methodKey,
175 companyId, active, obc);
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 (java.util.List<com.liferay.portal.model.LayoutPrototype>)returnObj;
195 }
196 catch (com.liferay.portal.kernel.exception.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
204 HttpPrincipal httpPrincipal, long layoutPrototypeId,
205 java.util.Map<java.util.Locale, java.lang.String> nameMap,
206 java.lang.String description, boolean active)
207 throws com.liferay.portal.kernel.exception.PortalException,
208 com.liferay.portal.kernel.exception.SystemException {
209 try {
210 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class.getName(),
211 "updateLayoutPrototype",
212 _updateLayoutPrototypeParameterTypes4);
213
214 MethodHandler methodHandler = new MethodHandler(methodKey,
215 layoutPrototypeId, nameMap, description, active);
216
217 Object returnObj = null;
218
219 try {
220 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
221 }
222 catch (Exception e) {
223 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
224 throw (com.liferay.portal.kernel.exception.PortalException)e;
225 }
226
227 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
228 throw (com.liferay.portal.kernel.exception.SystemException)e;
229 }
230
231 throw new com.liferay.portal.kernel.exception.SystemException(e);
232 }
233
234 return (com.liferay.portal.model.LayoutPrototype)returnObj;
235 }
236 catch (com.liferay.portal.kernel.exception.SystemException se) {
237 _log.error(se, se);
238
239 throw se;
240 }
241 }
242
243 private static Log _log = LogFactoryUtil.getLog(LayoutPrototypeServiceHttp.class);
244 private static final Class<?>[] _addLayoutPrototypeParameterTypes0 = new Class[] {
245 java.util.Map.class, java.lang.String.class, boolean.class
246 };
247 private static final Class<?>[] _deleteLayoutPrototypeParameterTypes1 = new Class[] {
248 long.class
249 };
250 private static final Class<?>[] _getLayoutPrototypeParameterTypes2 = new Class[] {
251 long.class
252 };
253 private static final Class<?>[] _searchParameterTypes3 = new Class[] {
254 long.class, java.lang.Boolean.class,
255 com.liferay.portal.kernel.util.OrderByComparator.class
256 };
257 private static final Class<?>[] _updateLayoutPrototypeParameterTypes4 = new Class[] {
258 long.class, java.util.Map.class, java.lang.String.class,
259 boolean.class
260 };
261 }