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