1
22
23 package com.liferay.portlet.softwarecatalog.service.http;
24
25 import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceUtil;
26
27 import org.json.JSONObject;
28
29
70 public class SCProductEntryServiceJSON {
71 public static JSONObject addProductEntry(long plid, java.lang.String name,
72 java.lang.String type, java.lang.String tags,
73 java.lang.String shortDescription, java.lang.String longDescription,
74 java.lang.String pageURL, java.lang.String author,
75 java.lang.String repoGroupId, java.lang.String repoArtifactId,
76 long[] licenseIds, java.util.List thumbnails,
77 java.util.List fullImages, boolean addCommunityPermissions,
78 boolean addGuestPermissions)
79 throws com.liferay.portal.SystemException,
80 com.liferay.portal.PortalException, java.rmi.RemoteException {
81 com.liferay.portlet.softwarecatalog.model.SCProductEntry returnValue = SCProductEntryServiceUtil.addProductEntry(plid,
82 name, type, tags, shortDescription, longDescription, pageURL,
83 author, repoGroupId, repoArtifactId, licenseIds, thumbnails,
84 fullImages, addCommunityPermissions, addGuestPermissions);
85
86 return SCProductEntryJSONSerializer.toJSONObject(returnValue);
87 }
88
89 public static JSONObject addProductEntry(long plid, java.lang.String name,
90 java.lang.String type, java.lang.String tags,
91 java.lang.String shortDescription, java.lang.String longDescription,
92 java.lang.String pageURL, java.lang.String author,
93 java.lang.String repoGroupId, java.lang.String repoArtifactId,
94 long[] licenseIds, java.util.List thumbnails,
95 java.util.List fullImages, java.lang.String[] communityPermissions,
96 java.lang.String[] guestPermissions)
97 throws com.liferay.portal.SystemException,
98 com.liferay.portal.PortalException, java.rmi.RemoteException {
99 com.liferay.portlet.softwarecatalog.model.SCProductEntry returnValue = SCProductEntryServiceUtil.addProductEntry(plid,
100 name, type, tags, shortDescription, longDescription, pageURL,
101 author, repoGroupId, repoArtifactId, licenseIds, thumbnails,
102 fullImages, communityPermissions, guestPermissions);
103
104 return SCProductEntryJSONSerializer.toJSONObject(returnValue);
105 }
106
107 public static void deleteProductEntry(long productEntryId)
108 throws com.liferay.portal.SystemException,
109 com.liferay.portal.PortalException, java.rmi.RemoteException {
110 SCProductEntryServiceUtil.deleteProductEntry(productEntryId);
111 }
112
113 public static JSONObject getProductEntry(long productEntryId)
114 throws com.liferay.portal.SystemException,
115 com.liferay.portal.PortalException, java.rmi.RemoteException {
116 com.liferay.portlet.softwarecatalog.model.SCProductEntry returnValue = SCProductEntryServiceUtil.getProductEntry(productEntryId);
117
118 return SCProductEntryJSONSerializer.toJSONObject(returnValue);
119 }
120
121 public static JSONObject updateProductEntry(long productEntryId,
122 java.lang.String name, java.lang.String type, java.lang.String tags,
123 java.lang.String shortDescription, java.lang.String longDescription,
124 java.lang.String pageURL, java.lang.String author,
125 java.lang.String repoGroupId, java.lang.String repoArtifactId,
126 long[] licenseIds, java.util.List thumbnails, java.util.List fullImages)
127 throws com.liferay.portal.SystemException,
128 com.liferay.portal.PortalException, java.rmi.RemoteException {
129 com.liferay.portlet.softwarecatalog.model.SCProductEntry returnValue = SCProductEntryServiceUtil.updateProductEntry(productEntryId,
130 name, type, tags, shortDescription, longDescription, pageURL,
131 author, repoGroupId, repoArtifactId, licenseIds, thumbnails,
132 fullImages);
133
134 return SCProductEntryJSONSerializer.toJSONObject(returnValue);
135 }
136 }