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