Class AuthorizationTemplates

    • Constructor Detail

      • AuthorizationTemplates

        public AuthorizationTemplates()
    • Method Detail

      • fromJSON

        public void fromJSON​(net.sf.json.JSON json)
        the actual argument is assumed to be a JSON array of templates. If there si a single template, it is wrapped in a JSONArray and passed to fromJSON(JSONArray).
        Parameters:
        json -
      • fromJSON

        public void fromJSON​(net.sf.json.JSONArray array)
        This actually does the work. The array is assumed to be an array of serialized AuthorizationTemplate objects.
        Parameters:
        array -
      • fromJSON

        public void fromJSON​(String rawJSON)
        Create this from a JSON object. If this is a single JSONObject, then it is assumed to be a AuthorizationTemplate. If it is JSONArray then it is assumed to be a collection of them.
        Parameters:
        rawJSON -
      • toJSON

        public net.sf.json.JSONArray toJSON()
        Turn the contents of this object into a JSON object
        Returns:
      • getCapabilities

        public Collection<String> getCapabilities​(String audience)
        Get All the capabilities for the given audience.
        Parameters:
        audience -
        Returns:
      • getCapabilities

        public Collection<String> getCapabilities​(String audience,
                                                  Collection<String> requested)
        Get the capabilities requested for the audience.
        Parameters:
        audience -
        requested -
        Returns:
      • main

        public static void main​(String[] args)