001
014
015 package com.liferay.portlet.softwarecatalog.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.http.TunnelUtil;
023
024 import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceUtil;
025
026
056 public class SCProductEntryServiceHttp {
057 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
058 HttpPrincipal httpPrincipal, java.lang.String name,
059 java.lang.String type, java.lang.String tags,
060 java.lang.String shortDescription, java.lang.String longDescription,
061 java.lang.String pageURL, java.lang.String author,
062 java.lang.String repoGroupId, java.lang.String repoArtifactId,
063 long[] licenseIds, java.util.List<byte[]> thumbnails,
064 java.util.List<byte[]> fullImages,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 try {
069 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
070 "addProductEntry", _addProductEntryParameterTypes0);
071
072 MethodHandler methodHandler = new MethodHandler(methodKey, name,
073 type, tags, shortDescription, longDescription, pageURL,
074 author, repoGroupId, repoArtifactId, licenseIds,
075 thumbnails, fullImages, 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.portlet.softwarecatalog.model.SCProductEntry)returnObj;
095 }
096 catch (com.liferay.portal.kernel.exception.SystemException se) {
097 _log.error(se, se);
098
099 throw se;
100 }
101 }
102
103 public static void deleteProductEntry(HttpPrincipal httpPrincipal,
104 long productEntryId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
109 "deleteProductEntry", _deleteProductEntryParameterTypes1);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey,
112 productEntryId);
113
114 try {
115 TunnelUtil.invoke(httpPrincipal, methodHandler);
116 }
117 catch (Exception e) {
118 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
119 throw (com.liferay.portal.kernel.exception.PortalException)e;
120 }
121
122 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
123 throw (com.liferay.portal.kernel.exception.SystemException)e;
124 }
125
126 throw new com.liferay.portal.kernel.exception.SystemException(e);
127 }
128 }
129 catch (com.liferay.portal.kernel.exception.SystemException se) {
130 _log.error(se, se);
131
132 throw se;
133 }
134 }
135
136 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
137 HttpPrincipal httpPrincipal, long productEntryId)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException {
140 try {
141 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
142 "getProductEntry", _getProductEntryParameterTypes2);
143
144 MethodHandler methodHandler = new MethodHandler(methodKey,
145 productEntryId);
146
147 Object returnObj = null;
148
149 try {
150 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
151 }
152 catch (Exception e) {
153 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
154 throw (com.liferay.portal.kernel.exception.PortalException)e;
155 }
156
157 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
158 throw (com.liferay.portal.kernel.exception.SystemException)e;
159 }
160
161 throw new com.liferay.portal.kernel.exception.SystemException(e);
162 }
163
164 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
165 }
166 catch (com.liferay.portal.kernel.exception.SystemException se) {
167 _log.error(se, se);
168
169 throw se;
170 }
171 }
172
173 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
174 HttpPrincipal httpPrincipal, long productEntryId,
175 java.lang.String name, java.lang.String type, java.lang.String tags,
176 java.lang.String shortDescription, java.lang.String longDescription,
177 java.lang.String pageURL, java.lang.String author,
178 java.lang.String repoGroupId, java.lang.String repoArtifactId,
179 long[] licenseIds, java.util.List<byte[]> thumbnails,
180 java.util.List<byte[]> fullImages)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException {
183 try {
184 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
185 "updateProductEntry", _updateProductEntryParameterTypes3);
186
187 MethodHandler methodHandler = new MethodHandler(methodKey,
188 productEntryId, name, type, tags, shortDescription,
189 longDescription, pageURL, author, repoGroupId,
190 repoArtifactId, licenseIds, thumbnails, fullImages);
191
192 Object returnObj = null;
193
194 try {
195 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
196 }
197 catch (Exception e) {
198 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
199 throw (com.liferay.portal.kernel.exception.PortalException)e;
200 }
201
202 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
203 throw (com.liferay.portal.kernel.exception.SystemException)e;
204 }
205
206 throw new com.liferay.portal.kernel.exception.SystemException(e);
207 }
208
209 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
210 }
211 catch (com.liferay.portal.kernel.exception.SystemException se) {
212 _log.error(se, se);
213
214 throw se;
215 }
216 }
217
218 private static Log _log = LogFactoryUtil.getLog(SCProductEntryServiceHttp.class);
219 private static final Class<?>[] _addProductEntryParameterTypes0 = new Class[] {
220 java.lang.String.class, java.lang.String.class,
221 java.lang.String.class, java.lang.String.class,
222 java.lang.String.class, java.lang.String.class,
223 java.lang.String.class, java.lang.String.class,
224 java.lang.String.class, long[].class, java.util.List.class,
225 java.util.List.class,
226 com.liferay.portal.service.ServiceContext.class
227 };
228 private static final Class<?>[] _deleteProductEntryParameterTypes1 = new Class[] {
229 long.class
230 };
231 private static final Class<?>[] _getProductEntryParameterTypes2 = new Class[] {
232 long.class
233 };
234 private static final Class<?>[] _updateProductEntryParameterTypes3 = new Class[] {
235 long.class, java.lang.String.class, java.lang.String.class,
236 java.lang.String.class, java.lang.String.class,
237 java.lang.String.class, java.lang.String.class,
238 java.lang.String.class, java.lang.String.class,
239 java.lang.String.class, long[].class, java.util.List.class,
240 java.util.List.class
241 };
242 }