1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.softwarecatalog.service;
24  
25  
26  /**
27   * <a href="SCProductVersionLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService
50   * @see com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalServiceFactory
51   *
52   */
53  public class SCProductVersionLocalServiceUtil {
54      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addSCProductVersion(
55          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
56          throws com.liferay.portal.SystemException {
57          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
58  
59          return scProductVersionLocalService.addSCProductVersion(scProductVersion);
60      }
61  
62      public static void deleteSCProductVersion(long productVersionId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
66  
67          scProductVersionLocalService.deleteSCProductVersion(productVersionId);
68      }
69  
70      public static void deleteSCProductVersion(
71          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
72          throws com.liferay.portal.SystemException {
73          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
74  
75          scProductVersionLocalService.deleteSCProductVersion(scProductVersion);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
82  
83          return scProductVersionLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
90  
91          return scProductVersionLocalService.dynamicQuery(dynamicQuery, start,
92              end);
93      }
94  
95      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getSCProductVersion(
96          long productVersionId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
100 
101         return scProductVersionLocalService.getSCProductVersion(productVersionId);
102     }
103 
104     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateSCProductVersion(
105         com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
106         throws com.liferay.portal.SystemException {
107         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
108 
109         return scProductVersionLocalService.updateSCProductVersion(scProductVersion);
110     }
111 
112     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
113         long userId, long productEntryId, java.lang.String version,
114         java.lang.String changeLog, java.lang.String downloadPageURL,
115         java.lang.String directDownloadURL, boolean repoStoreArtifact,
116         long[] frameworkVersionIds, boolean addCommunityPermissions,
117         boolean addGuestPermissions)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException {
120         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
121 
122         return scProductVersionLocalService.addProductVersion(userId,
123             productEntryId, version, changeLog, downloadPageURL,
124             directDownloadURL, repoStoreArtifact, frameworkVersionIds,
125             addCommunityPermissions, addGuestPermissions);
126     }
127 
128     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
129         long userId, long productEntryId, java.lang.String version,
130         java.lang.String changeLog, java.lang.String downloadPageURL,
131         java.lang.String directDownloadURL, boolean repoStoreArtifact,
132         long[] frameworkVersionIds, java.lang.String[] communityPermissions,
133         java.lang.String[] guestPermissions)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
137 
138         return scProductVersionLocalService.addProductVersion(userId,
139             productEntryId, version, changeLog, downloadPageURL,
140             directDownloadURL, repoStoreArtifact, frameworkVersionIds,
141             communityPermissions, guestPermissions);
142     }
143 
144     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
145         long userId, long productEntryId, java.lang.String version,
146         java.lang.String changeLog, java.lang.String downloadPageURL,
147         java.lang.String directDownloadURL, boolean repoStoreArtifact,
148         long[] frameworkVersionIds, java.lang.Boolean addCommunityPermissions,
149         java.lang.Boolean addGuestPermissions,
150         java.lang.String[] communityPermissions,
151         java.lang.String[] guestPermissions)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
155 
156         return scProductVersionLocalService.addProductVersion(userId,
157             productEntryId, version, changeLog, downloadPageURL,
158             directDownloadURL, repoStoreArtifact, frameworkVersionIds,
159             addCommunityPermissions, addGuestPermissions, communityPermissions,
160             guestPermissions);
161     }
162 
163     public static void deleteProductVersion(long productVersionId)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
167 
168         scProductVersionLocalService.deleteProductVersion(productVersionId);
169     }
170 
171     public static void deleteProductVersion(
172         com.liferay.portlet.softwarecatalog.model.SCProductVersion productVersion)
173         throws com.liferay.portal.SystemException {
174         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
175 
176         scProductVersionLocalService.deleteProductVersion(productVersion);
177     }
178 
179     public static void deleteProductVersions(long productEntryId)
180         throws com.liferay.portal.SystemException {
181         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
182 
183         scProductVersionLocalService.deleteProductVersions(productEntryId);
184     }
185 
186     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersion(
187         long productVersionId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
191 
192         return scProductVersionLocalService.getProductVersion(productVersionId);
193     }
194 
195     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersionByDirectDownloadURL(
196         java.lang.String directDownloadURL)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
200 
201         return scProductVersionLocalService.getProductVersionByDirectDownloadURL(directDownloadURL);
202     }
203 
204     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getProductVersions(
205         long productEntryId, int start, int end)
206         throws com.liferay.portal.SystemException {
207         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
208 
209         return scProductVersionLocalService.getProductVersions(productEntryId,
210             start, end);
211     }
212 
213     public static int getProductVersionsCount(long productEntryId)
214         throws com.liferay.portal.SystemException {
215         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
216 
217         return scProductVersionLocalService.getProductVersionsCount(productEntryId);
218     }
219 
220     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateProductVersion(
221         long productVersionId, java.lang.String version,
222         java.lang.String changeLog, java.lang.String downloadPageURL,
223         java.lang.String directDownloadURL, boolean repoStoreArtifact,
224         long[] frameworkVersionIds)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         SCProductVersionLocalService scProductVersionLocalService = SCProductVersionLocalServiceFactory.getService();
228 
229         return scProductVersionLocalService.updateProductVersion(productVersionId,
230             version, changeLog, downloadPageURL, directDownloadURL,
231             repoStoreArtifact, frameworkVersionIds);
232     }
233 }