1
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
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 }