1
22
23 package com.liferay.portlet.softwarecatalog.service.http;
24
25 import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionServiceUtil;
26
27 import org.json.JSONArray;
28 import org.json.JSONObject;
29
30
71 public class SCFrameworkVersionServiceJSON {
72 public static JSONObject addFrameworkVersion(long plid,
73 java.lang.String name, java.lang.String url, boolean active,
74 int priority, boolean addCommunityPermissions,
75 boolean addGuestPermissions)
76 throws com.liferay.portal.SystemException,
77 com.liferay.portal.PortalException, java.rmi.RemoteException {
78 com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion returnValue =
79 SCFrameworkVersionServiceUtil.addFrameworkVersion(plid, name, url,
80 active, priority, addCommunityPermissions, addGuestPermissions);
81
82 return SCFrameworkVersionJSONSerializer.toJSONObject(returnValue);
83 }
84
85 public static JSONObject addFrameworkVersion(long plid,
86 java.lang.String name, java.lang.String url, boolean active,
87 int priority, java.lang.String[] communityPermissions,
88 java.lang.String[] guestPermissions)
89 throws com.liferay.portal.SystemException,
90 com.liferay.portal.PortalException, java.rmi.RemoteException {
91 com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion returnValue =
92 SCFrameworkVersionServiceUtil.addFrameworkVersion(plid, name, url,
93 active, priority, communityPermissions, guestPermissions);
94
95 return SCFrameworkVersionJSONSerializer.toJSONObject(returnValue);
96 }
97
98 public static void deleteFrameworkVersion(long frameworkVersionId)
99 throws com.liferay.portal.SystemException,
100 com.liferay.portal.PortalException, java.rmi.RemoteException {
101 SCFrameworkVersionServiceUtil.deleteFrameworkVersion(frameworkVersionId);
102 }
103
104 public static JSONObject getFrameworkVersion(long frameworkVersionId)
105 throws com.liferay.portal.SystemException,
106 com.liferay.portal.PortalException, java.rmi.RemoteException {
107 com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion returnValue =
108 SCFrameworkVersionServiceUtil.getFrameworkVersion(frameworkVersionId);
109
110 return SCFrameworkVersionJSONSerializer.toJSONObject(returnValue);
111 }
112
113 public static JSONArray getFrameworkVersions(long groupId, boolean active)
114 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
115 java.util.List returnValue = SCFrameworkVersionServiceUtil.getFrameworkVersions(groupId,
116 active);
117
118 return SCFrameworkVersionJSONSerializer.toJSONArray(returnValue);
119 }
120
121 public static JSONArray getFrameworkVersions(long groupId, boolean active,
122 int begin, int end)
123 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
124 java.util.List returnValue = SCFrameworkVersionServiceUtil.getFrameworkVersions(groupId,
125 active, begin, end);
126
127 return SCFrameworkVersionJSONSerializer.toJSONArray(returnValue);
128 }
129
130 public static JSONObject updateFrameworkVersion(long frameworkVersionId,
131 java.lang.String name, java.lang.String url, boolean active,
132 int priority)
133 throws com.liferay.portal.SystemException,
134 com.liferay.portal.PortalException, java.rmi.RemoteException {
135 com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion returnValue =
136 SCFrameworkVersionServiceUtil.updateFrameworkVersion(frameworkVersionId,
137 name, url, active, priority);
138
139 return SCFrameworkVersionJSONSerializer.toJSONObject(returnValue);
140 }
141 }