1
22
23 package com.liferay.portlet.softwarecatalog.service.http;
24
25 import com.liferay.portal.kernel.json.JSONArray;
26 import com.liferay.portal.kernel.json.JSONObject;
27
28 import com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceUtil;
29
30
76 public class SCProductVersionServiceJSON {
77 public static JSONObject addProductVersion(long productEntryId,
78 java.lang.String version, java.lang.String changeLog,
79 java.lang.String downloadPageURL, java.lang.String directDownloadURL,
80 boolean testDirectDownloadURL, boolean repoStoreArtifact,
81 long[] frameworkVersionIds, boolean addCommunityPermissions,
82 boolean addGuestPermissions)
83 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException {
85 com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue = SCProductVersionServiceUtil.addProductVersion(productEntryId,
86 version, changeLog, downloadPageURL, directDownloadURL,
87 testDirectDownloadURL, repoStoreArtifact, frameworkVersionIds,
88 addCommunityPermissions, addGuestPermissions);
89
90 return SCProductVersionJSONSerializer.toJSONObject(returnValue);
91 }
92
93 public static JSONObject addProductVersion(long productEntryId,
94 java.lang.String version, java.lang.String changeLog,
95 java.lang.String downloadPageURL, java.lang.String directDownloadURL,
96 boolean testDirectDownloadURL, boolean repoStoreArtifact,
97 long[] frameworkVersionIds, java.lang.String[] communityPermissions,
98 java.lang.String[] guestPermissions)
99 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
100 com.liferay.portal.SystemException {
101 com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue = SCProductVersionServiceUtil.addProductVersion(productEntryId,
102 version, changeLog, downloadPageURL, directDownloadURL,
103 testDirectDownloadURL, repoStoreArtifact, frameworkVersionIds,
104 communityPermissions, guestPermissions);
105
106 return SCProductVersionJSONSerializer.toJSONObject(returnValue);
107 }
108
109 public static void deleteProductVersion(long productVersionId)
110 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
111 com.liferay.portal.SystemException {
112 SCProductVersionServiceUtil.deleteProductVersion(productVersionId);
113 }
114
115 public static JSONObject getProductVersion(long productVersionId)
116 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException {
118 com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue = SCProductVersionServiceUtil.getProductVersion(productVersionId);
119
120 return SCProductVersionJSONSerializer.toJSONObject(returnValue);
121 }
122
123 public static JSONArray getProductVersions(long productEntryId, int start,
124 int end)
125 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
126 com.liferay.portal.SystemException {
127 java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> returnValue =
128 SCProductVersionServiceUtil.getProductVersions(productEntryId,
129 start, end);
130
131 return SCProductVersionJSONSerializer.toJSONArray(returnValue);
132 }
133
134 public static int getProductVersionsCount(long productEntryId)
135 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
136 com.liferay.portal.SystemException {
137 int returnValue = SCProductVersionServiceUtil.getProductVersionsCount(productEntryId);
138
139 return returnValue;
140 }
141
142 public static JSONObject updateProductVersion(long productVersionId,
143 java.lang.String version, java.lang.String changeLog,
144 java.lang.String downloadPageURL, java.lang.String directDownloadURL,
145 boolean testDirectDownloadURL, boolean repoStoreArtifact,
146 long[] frameworkVersionIds)
147 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
148 com.liferay.portal.SystemException {
149 com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue = SCProductVersionServiceUtil.updateProductVersion(productVersionId,
150 version, changeLog, downloadPageURL, directDownloadURL,
151 testDirectDownloadURL, repoStoreArtifact, frameworkVersionIds);
152
153 return SCProductVersionJSONSerializer.toJSONObject(returnValue);
154 }
155 }