Class EndpointUtil

java.lang.Object
org.opencastproject.adminui.endpoint.EndpointUtil

public final class EndpointUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addRequestFiltersToQuery(String filterString, org.opencastproject.list.impl.ResourceListQueryImpl query)
    Add the string based filters to the given list query.
    static <T> org.json.simple.JSONObject
    Returns a generated JSON object with key-value from given list.
    static org.json.simple.JSONArray
    transformAccessControList(org.opencastproject.security.api.AccessControlList acl, org.opencastproject.security.api.UserDirectoryService userDirectoryService)
    Transform ACL into the format the admin ui frontend uses.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • generateJSONObject

      public static <T> org.json.simple.JSONObject generateJSONObject(Map<String,T> list) throws JsonCreationException
      Returns 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

      public static void addRequestFiltersToQuery(String filterString, org.opencastproject.list.impl.ResourceListQueryImpl query)
      Add the string based filters to the given list query.
      Parameters:
      filterString - The string based filters
      query - The query to update with the filters
    • transformAccessControList

      public static org.json.simple.JSONArray transformAccessControList(org.opencastproject.security.api.AccessControlList acl, org.opencastproject.security.api.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.