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.LayoutRevisionServiceUtil;
023
024
052 public class LayoutRevisionServiceHttp {
053 public static com.liferay.portal.model.LayoutRevision addLayoutRevision(
054 HttpPrincipal httpPrincipal, long userId, long layoutSetBranchId,
055 long layoutBranchId, long parentLayoutRevisionId, boolean head,
056 long plid, long portletPreferencesPlid, boolean privateLayout,
057 java.lang.String name, java.lang.String title,
058 java.lang.String description, java.lang.String keywords,
059 java.lang.String robots, java.lang.String typeSettings,
060 boolean iconImage, long iconImageId, java.lang.String themeId,
061 java.lang.String colorSchemeId, java.lang.String wapThemeId,
062 java.lang.String wapColorSchemeId, java.lang.String css,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(LayoutRevisionServiceUtil.class,
068 "addLayoutRevision", _addLayoutRevisionParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
071 layoutSetBranchId, layoutBranchId, parentLayoutRevisionId,
072 head, plid, portletPreferencesPlid, privateLayout, name,
073 title, description, keywords, robots, typeSettings,
074 iconImage, iconImageId, themeId, colorSchemeId, wapThemeId,
075 wapColorSchemeId, css, serviceContext);
076
077 Object returnObj = null;
078
079 try {
080 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
081 }
082 catch (Exception e) {
083 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
084 throw (com.liferay.portal.kernel.exception.PortalException)e;
085 }
086
087 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
088 throw (com.liferay.portal.kernel.exception.SystemException)e;
089 }
090
091 throw new com.liferay.portal.kernel.exception.SystemException(e);
092 }
093
094 return (com.liferay.portal.model.LayoutRevision)returnObj;
095 }
096 catch (com.liferay.portal.kernel.exception.SystemException se) {
097 _log.error(se, se);
098
099 throw se;
100 }
101 }
102
103 private static Log _log = LogFactoryUtil.getLog(LayoutRevisionServiceHttp.class);
104 private static final Class<?>[] _addLayoutRevisionParameterTypes0 = new Class[] {
105 long.class, long.class, long.class, long.class, boolean.class,
106 long.class, long.class, boolean.class, java.lang.String.class,
107 java.lang.String.class, java.lang.String.class,
108 java.lang.String.class, java.lang.String.class,
109 java.lang.String.class, boolean.class, long.class,
110 java.lang.String.class, java.lang.String.class,
111 java.lang.String.class, java.lang.String.class,
112 java.lang.String.class,
113 com.liferay.portal.service.ServiceContext.class
114 };
115 }