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