1
14
15 package com.liferay.portlet.softwarecatalog.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceUtil;
25
26
63 public class SCProductEntryServiceHttp {
64 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
65 HttpPrincipal httpPrincipal, java.lang.String name,
66 java.lang.String type, java.lang.String tags,
67 java.lang.String shortDescription, java.lang.String longDescription,
68 java.lang.String pageURL, java.lang.String author,
69 java.lang.String repoGroupId, java.lang.String repoArtifactId,
70 long[] licenseIds, java.util.List<byte[]> thumbnails,
71 java.util.List<byte[]> fullImages,
72 com.liferay.portal.service.ServiceContext serviceContext)
73 throws com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException {
75 try {
76 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
77 "addProductEntry", _addProductEntryParameterTypes0);
78
79 MethodHandler methodHandler = new MethodHandler(methodKey, name,
80 type, tags, shortDescription, longDescription, pageURL,
81 author, repoGroupId, repoArtifactId, licenseIds,
82 thumbnails, fullImages, serviceContext);
83
84 Object returnObj = null;
85
86 try {
87 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
88 }
89 catch (Exception e) {
90 if (e instanceof com.liferay.portal.PortalException) {
91 throw (com.liferay.portal.PortalException)e;
92 }
93
94 if (e instanceof com.liferay.portal.SystemException) {
95 throw (com.liferay.portal.SystemException)e;
96 }
97
98 throw new com.liferay.portal.SystemException(e);
99 }
100
101 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
102 }
103 catch (com.liferay.portal.SystemException se) {
104 _log.error(se, se);
105
106 throw se;
107 }
108 }
109
110 public static void deleteProductEntry(HttpPrincipal httpPrincipal,
111 long productEntryId)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException {
114 try {
115 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
116 "deleteProductEntry", _deleteProductEntryParameterTypes1);
117
118 MethodHandler methodHandler = new MethodHandler(methodKey,
119 productEntryId);
120
121 try {
122 TunnelUtil.invoke(httpPrincipal, methodHandler);
123 }
124 catch (Exception e) {
125 if (e instanceof com.liferay.portal.PortalException) {
126 throw (com.liferay.portal.PortalException)e;
127 }
128
129 if (e instanceof com.liferay.portal.SystemException) {
130 throw (com.liferay.portal.SystemException)e;
131 }
132
133 throw new com.liferay.portal.SystemException(e);
134 }
135 }
136 catch (com.liferay.portal.SystemException se) {
137 _log.error(se, se);
138
139 throw se;
140 }
141 }
142
143 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
144 HttpPrincipal httpPrincipal, long productEntryId)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 try {
148 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
149 "getProductEntry", _getProductEntryParameterTypes2);
150
151 MethodHandler methodHandler = new MethodHandler(methodKey,
152 productEntryId);
153
154 Object returnObj = null;
155
156 try {
157 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
158 }
159 catch (Exception e) {
160 if (e instanceof com.liferay.portal.PortalException) {
161 throw (com.liferay.portal.PortalException)e;
162 }
163
164 if (e instanceof com.liferay.portal.SystemException) {
165 throw (com.liferay.portal.SystemException)e;
166 }
167
168 throw new com.liferay.portal.SystemException(e);
169 }
170
171 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
172 }
173 catch (com.liferay.portal.SystemException se) {
174 _log.error(se, se);
175
176 throw se;
177 }
178 }
179
180 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
181 HttpPrincipal httpPrincipal, long productEntryId,
182 java.lang.String name, java.lang.String type, java.lang.String tags,
183 java.lang.String shortDescription, java.lang.String longDescription,
184 java.lang.String pageURL, java.lang.String author,
185 java.lang.String repoGroupId, java.lang.String repoArtifactId,
186 long[] licenseIds, java.util.List<byte[]> thumbnails,
187 java.util.List<byte[]> fullImages)
188 throws com.liferay.portal.PortalException,
189 com.liferay.portal.SystemException {
190 try {
191 MethodKey methodKey = new MethodKey(SCProductEntryServiceUtil.class.getName(),
192 "updateProductEntry", _updateProductEntryParameterTypes3);
193
194 MethodHandler methodHandler = new MethodHandler(methodKey,
195 productEntryId, name, type, tags, shortDescription,
196 longDescription, pageURL, author, repoGroupId,
197 repoArtifactId, licenseIds, thumbnails, fullImages);
198
199 Object returnObj = null;
200
201 try {
202 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
203 }
204 catch (Exception e) {
205 if (e instanceof com.liferay.portal.PortalException) {
206 throw (com.liferay.portal.PortalException)e;
207 }
208
209 if (e instanceof com.liferay.portal.SystemException) {
210 throw (com.liferay.portal.SystemException)e;
211 }
212
213 throw new com.liferay.portal.SystemException(e);
214 }
215
216 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
217 }
218 catch (com.liferay.portal.SystemException se) {
219 _log.error(se, se);
220
221 throw se;
222 }
223 }
224
225 private static Log _log = LogFactoryUtil.getLog(SCProductEntryServiceHttp.class);
226 private static final Class<?>[] _addProductEntryParameterTypes0 = new Class[] {
227 java.lang.String.class, java.lang.String.class,
228 java.lang.String.class, java.lang.String.class,
229 java.lang.String.class, java.lang.String.class,
230 java.lang.String.class, java.lang.String.class,
231 java.lang.String.class, long[].class, java.util.List.class,
232 java.util.List.class,
233 com.liferay.portal.service.ServiceContext.class
234 };
235 private static final Class<?>[] _deleteProductEntryParameterTypes1 = new Class[] {
236 long.class
237 };
238 private static final Class<?>[] _getProductEntryParameterTypes2 = new Class[] {
239 long.class
240 };
241 private static final Class<?>[] _updateProductEntryParameterTypes3 = new Class[] {
242 long.class, java.lang.String.class, java.lang.String.class,
243 java.lang.String.class, java.lang.String.class,
244 java.lang.String.class, java.lang.String.class,
245 java.lang.String.class, java.lang.String.class,
246 java.lang.String.class, long[].class, java.util.List.class,
247 java.util.List.class
248 };
249 }