Class EndpointUtil

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

public final class EndpointUtil extends Object
  • 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