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<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> returnValue =
119 SCFrameworkVersionServiceUtil.getFrameworkVersions(groupId, 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<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> returnValue =
128 SCFrameworkVersionServiceUtil.getFrameworkVersions(groupId, active,
129 begin, end);
130
131 return SCFrameworkVersionJSONSerializer.toJSONArray(returnValue);
132 }
133
134 public static JSONObject updateFrameworkVersion(long frameworkVersionId,
135 java.lang.String name, java.lang.String url, boolean active,
136 int priority)
137 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
138 com.liferay.portal.PortalException {
139 com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion returnValue =
140 SCFrameworkVersionServiceUtil.updateFrameworkVersion(frameworkVersionId,
141 name, url, active, priority);
142
143 return SCFrameworkVersionJSONSerializer.toJSONObject(returnValue);
144 }
145 }