Class EndpointUtil
java.lang.Object
org.opencastproject.adminui.endpoint.EndpointUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddRequestFiltersToQuery(String filterString, ResourceListQueryImpl query) Add the string based filters to the given list query.static <T> org.json.simple.JSONObjectgenerateJSONObject(Map<String, T> list) Returns a generated JSON object with key-value from given list.static org.json.simple.JSONArraytransformAccessControList(AccessControlList acl, UserDirectoryService userDirectoryService) Transform ACL into the format the admin ui frontend uses.
-
Method Details
-
generateJSONObject
public static <T> org.json.simple.JSONObject generateJSONObject(Map<String, T> list) throws JsonCreationExceptionReturns a generated JSON object with key-value from given list. Note that JSONObject (and JSON in general) does not preserve key ordering, so while the Map passed to this function may have ordered keys, the resulting JSONObject is not ordered.- Parameters:
list- The source list for the JSON object- Returns:
- a JSON object containing the all the key-value as parameter
- Throws:
JsonCreationException
-
addRequestFiltersToQuery
Add the string based filters to the given list query.- Parameters:
filterString- The string based filtersquery- The query to update with the filters
-
transformAccessControList
public static org.json.simple.JSONArray transformAccessControList(AccessControlList acl, UserDirectoryService userDirectoryService) Transform ACL into the format the admin ui frontend uses. We do this in the backend so we can attach information about users to user roles.
-