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.LayoutSetBranchServiceUtil;
023
024
052 public class LayoutSetBranchServiceHttp {
053 public static com.liferay.portal.model.LayoutSetBranch addLayoutSetBranch(
054 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
055 java.lang.String name, java.lang.String description, boolean master,
056 long copyLayoutSetBranchId,
057 com.liferay.portal.service.ServiceContext serviceContext)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 try {
061 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
062 "addLayoutSetBranch", _addLayoutSetBranchParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
065 privateLayout, name, description, master,
066 copyLayoutSetBranchId, serviceContext);
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.LayoutSetBranch)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 deleteLayoutSetBranch(HttpPrincipal httpPrincipal,
095 long layoutSetBranchId)
096 throws com.liferay.portal.kernel.exception.PortalException,
097 com.liferay.portal.kernel.exception.SystemException {
098 try {
099 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
100 "deleteLayoutSetBranch",
101 _deleteLayoutSetBranchParameterTypes1);
102
103 MethodHandler methodHandler = new MethodHandler(methodKey,
104 layoutSetBranchId);
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 java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches(
129 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 try {
132 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
133 "getLayoutSetBranches", _getLayoutSetBranchesParameterTypes2);
134
135 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
136 privateLayout);
137
138 Object returnObj = null;
139
140 try {
141 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
142 }
143 catch (Exception e) {
144 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
145 throw (com.liferay.portal.kernel.exception.SystemException)e;
146 }
147
148 throw new com.liferay.portal.kernel.exception.SystemException(e);
149 }
150
151 return (java.util.List<com.liferay.portal.model.LayoutSetBranch>)returnObj;
152 }
153 catch (com.liferay.portal.kernel.exception.SystemException se) {
154 _log.error(se, se);
155
156 throw se;
157 }
158 }
159
160 public static com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch(
161 HttpPrincipal httpPrincipal, long layoutSetBranchId,
162 long mergeLayoutSetBranchId,
163 com.liferay.portal.service.ServiceContext serviceContext)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 try {
167 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
168 "mergeLayoutSetBranch", _mergeLayoutSetBranchParameterTypes3);
169
170 MethodHandler methodHandler = new MethodHandler(methodKey,
171 layoutSetBranchId, mergeLayoutSetBranchId, serviceContext);
172
173 Object returnObj = null;
174
175 try {
176 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
177 }
178 catch (Exception e) {
179 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
180 throw (com.liferay.portal.kernel.exception.PortalException)e;
181 }
182
183 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
184 throw (com.liferay.portal.kernel.exception.SystemException)e;
185 }
186
187 throw new com.liferay.portal.kernel.exception.SystemException(e);
188 }
189
190 return (com.liferay.portal.model.LayoutSetBranch)returnObj;
191 }
192 catch (com.liferay.portal.kernel.exception.SystemException se) {
193 _log.error(se, se);
194
195 throw se;
196 }
197 }
198
199 public static com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch(
200 HttpPrincipal httpPrincipal, long groupId, long layoutSetBranchId,
201 java.lang.String name, java.lang.String description,
202 com.liferay.portal.service.ServiceContext serviceContext)
203 throws com.liferay.portal.kernel.exception.PortalException,
204 com.liferay.portal.kernel.exception.SystemException {
205 try {
206 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
207 "updateLayoutSetBranch",
208 _updateLayoutSetBranchParameterTypes4);
209
210 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
211 layoutSetBranchId, name, description, serviceContext);
212
213 Object returnObj = null;
214
215 try {
216 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
217 }
218 catch (Exception e) {
219 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
220 throw (com.liferay.portal.kernel.exception.PortalException)e;
221 }
222
223 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
224 throw (com.liferay.portal.kernel.exception.SystemException)e;
225 }
226
227 throw new com.liferay.portal.kernel.exception.SystemException(e);
228 }
229
230 return (com.liferay.portal.model.LayoutSetBranch)returnObj;
231 }
232 catch (com.liferay.portal.kernel.exception.SystemException se) {
233 _log.error(se, se);
234
235 throw se;
236 }
237 }
238
239 private static Log _log = LogFactoryUtil.getLog(LayoutSetBranchServiceHttp.class);
240 private static final Class<?>[] _addLayoutSetBranchParameterTypes0 = new Class[] {
241 long.class, boolean.class, java.lang.String.class,
242 java.lang.String.class, boolean.class, long.class,
243 com.liferay.portal.service.ServiceContext.class
244 };
245 private static final Class<?>[] _deleteLayoutSetBranchParameterTypes1 = new Class[] {
246 long.class
247 };
248 private static final Class<?>[] _getLayoutSetBranchesParameterTypes2 = new Class[] {
249 long.class, boolean.class
250 };
251 private static final Class<?>[] _mergeLayoutSetBranchParameterTypes3 = new Class[] {
252 long.class, long.class,
253 com.liferay.portal.service.ServiceContext.class
254 };
255 private static final Class<?>[] _updateLayoutSetBranchParameterTypes4 = new Class[] {
256 long.class, long.class, java.lang.String.class,
257 java.lang.String.class,
258 com.liferay.portal.service.ServiceContext.class
259 };
260 }