001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.security.auth.HttpPrincipal;
022 import com.liferay.portal.kernel.util.MethodHandler;
023 import com.liferay.portal.kernel.util.MethodKey;
024 import com.liferay.portal.service.WebsiteServiceUtil;
025
026
054 @ProviderType
055 public class WebsiteServiceHttp {
056 public static com.liferay.portal.model.Website addWebsite(
057 HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
058 java.lang.String url, long typeId, boolean primary,
059 com.liferay.portal.service.ServiceContext serviceContext)
060 throws com.liferay.portal.kernel.exception.PortalException {
061 try {
062 MethodKey methodKey = new MethodKey(WebsiteServiceUtil.class,
063 "addWebsite", _addWebsiteParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey,
066 className, classPK, url, typeId, primary, 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 throw new com.liferay.portal.kernel.exception.SystemException(e);
079 }
080
081 return (com.liferay.portal.model.Website)returnObj;
082 }
083 catch (com.liferay.portal.kernel.exception.SystemException se) {
084 _log.error(se, se);
085
086 throw se;
087 }
088 }
089
090 public static void deleteWebsite(HttpPrincipal httpPrincipal, long websiteId)
091 throws com.liferay.portal.kernel.exception.PortalException {
092 try {
093 MethodKey methodKey = new MethodKey(WebsiteServiceUtil.class,
094 "deleteWebsite", _deleteWebsiteParameterTypes1);
095
096 MethodHandler methodHandler = new MethodHandler(methodKey, websiteId);
097
098 try {
099 TunnelUtil.invoke(httpPrincipal, methodHandler);
100 }
101 catch (Exception e) {
102 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
103 throw (com.liferay.portal.kernel.exception.PortalException)e;
104 }
105
106 throw new com.liferay.portal.kernel.exception.SystemException(e);
107 }
108 }
109 catch (com.liferay.portal.kernel.exception.SystemException se) {
110 _log.error(se, se);
111
112 throw se;
113 }
114 }
115
116 public static com.liferay.portal.model.Website getWebsite(
117 HttpPrincipal httpPrincipal, long websiteId)
118 throws com.liferay.portal.kernel.exception.PortalException {
119 try {
120 MethodKey methodKey = new MethodKey(WebsiteServiceUtil.class,
121 "getWebsite", _getWebsiteParameterTypes2);
122
123 MethodHandler methodHandler = new MethodHandler(methodKey, websiteId);
124
125 Object returnObj = null;
126
127 try {
128 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
129 }
130 catch (Exception e) {
131 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
132 throw (com.liferay.portal.kernel.exception.PortalException)e;
133 }
134
135 throw new com.liferay.portal.kernel.exception.SystemException(e);
136 }
137
138 return (com.liferay.portal.model.Website)returnObj;
139 }
140 catch (com.liferay.portal.kernel.exception.SystemException se) {
141 _log.error(se, se);
142
143 throw se;
144 }
145 }
146
147 public static java.util.List<com.liferay.portal.model.Website> getWebsites(
148 HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
149 throws com.liferay.portal.kernel.exception.PortalException {
150 try {
151 MethodKey methodKey = new MethodKey(WebsiteServiceUtil.class,
152 "getWebsites", _getWebsitesParameterTypes3);
153
154 MethodHandler methodHandler = new MethodHandler(methodKey,
155 className, classPK);
156
157 Object returnObj = null;
158
159 try {
160 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
161 }
162 catch (Exception e) {
163 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164 throw (com.liferay.portal.kernel.exception.PortalException)e;
165 }
166
167 throw new com.liferay.portal.kernel.exception.SystemException(e);
168 }
169
170 return (java.util.List<com.liferay.portal.model.Website>)returnObj;
171 }
172 catch (com.liferay.portal.kernel.exception.SystemException se) {
173 _log.error(se, se);
174
175 throw se;
176 }
177 }
178
179 public static com.liferay.portal.model.Website updateWebsite(
180 HttpPrincipal httpPrincipal, long websiteId, java.lang.String url,
181 long typeId, boolean primary)
182 throws com.liferay.portal.kernel.exception.PortalException {
183 try {
184 MethodKey methodKey = new MethodKey(WebsiteServiceUtil.class,
185 "updateWebsite", _updateWebsiteParameterTypes4);
186
187 MethodHandler methodHandler = new MethodHandler(methodKey,
188 websiteId, url, typeId, primary);
189
190 Object returnObj = null;
191
192 try {
193 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
194 }
195 catch (Exception e) {
196 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
197 throw (com.liferay.portal.kernel.exception.PortalException)e;
198 }
199
200 throw new com.liferay.portal.kernel.exception.SystemException(e);
201 }
202
203 return (com.liferay.portal.model.Website)returnObj;
204 }
205 catch (com.liferay.portal.kernel.exception.SystemException se) {
206 _log.error(se, se);
207
208 throw se;
209 }
210 }
211
212 private static Log _log = LogFactoryUtil.getLog(WebsiteServiceHttp.class);
213 private static final Class<?>[] _addWebsiteParameterTypes0 = new Class[] {
214 java.lang.String.class, long.class, java.lang.String.class,
215 long.class, boolean.class,
216 com.liferay.portal.service.ServiceContext.class
217 };
218 private static final Class<?>[] _deleteWebsiteParameterTypes1 = new Class[] {
219 long.class
220 };
221 private static final Class<?>[] _getWebsiteParameterTypes2 = new Class[] {
222 long.class
223 };
224 private static final Class<?>[] _getWebsitesParameterTypes3 = new Class[] {
225 java.lang.String.class, long.class
226 };
227 private static final Class<?>[] _updateWebsiteParameterTypes4 = new Class[] {
228 long.class, java.lang.String.class, long.class, boolean.class
229 };
230 }