1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.softwarecatalog.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="SCProductVersionServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link SCProductVersionService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       SCProductVersionService
39   * @generated
40   */
41  public class SCProductVersionServiceUtil {
42      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
43          long productEntryId, java.lang.String version,
44          java.lang.String changeLog, java.lang.String downloadPageURL,
45          java.lang.String directDownloadURL, boolean testDirectDownloadURL,
46          boolean repoStoreArtifact, long[] frameworkVersionIds,
47          com.liferay.portal.service.ServiceContext serviceContext)
48          throws com.liferay.portal.PortalException,
49              com.liferay.portal.SystemException {
50          return getService()
51                     .addProductVersion(productEntryId, version, changeLog,
52              downloadPageURL, directDownloadURL, testDirectDownloadURL,
53              repoStoreArtifact, frameworkVersionIds, serviceContext);
54      }
55  
56      public static void deleteProductVersion(long productVersionId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteProductVersion(productVersionId);
60      }
61  
62      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersion(
63          long productVersionId)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException {
66          return getService().getProductVersion(productVersionId);
67      }
68  
69      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getProductVersions(
70          long productEntryId, int start, int end)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException {
73          return getService().getProductVersions(productEntryId, start, end);
74      }
75  
76      public static int getProductVersionsCount(long productEntryId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService().getProductVersionsCount(productEntryId);
80      }
81  
82      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateProductVersion(
83          long productVersionId, java.lang.String version,
84          java.lang.String changeLog, java.lang.String downloadPageURL,
85          java.lang.String directDownloadURL, boolean testDirectDownloadURL,
86          boolean repoStoreArtifact, long[] frameworkVersionIds)
87          throws com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException {
89          return getService()
90                     .updateProductVersion(productVersionId, version, changeLog,
91              downloadPageURL, directDownloadURL, testDirectDownloadURL,
92              repoStoreArtifact, frameworkVersionIds);
93      }
94  
95      public static SCProductVersionService getService() {
96          if (_service == null) {
97              _service = (SCProductVersionService)PortalBeanLocatorUtil.locate(SCProductVersionService.class.getName());
98  
99              ReferenceRegistry.registerReference(SCProductVersionServiceUtil.class,
100                 "_service");
101             MethodCache.remove(SCProductVersionService.class);
102         }
103 
104         return _service;
105     }
106 
107     public void setService(SCProductVersionService service) {
108         MethodCache.remove(SCProductVersionService.class);
109 
110         _service = service;
111 
112         ReferenceRegistry.registerReference(SCProductVersionServiceUtil.class,
113             "_service");
114         MethodCache.remove(SCProductVersionService.class);
115     }
116 
117     private static SCProductVersionService _service;
118 }