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