Class AuthorizationTemplates
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,AuthorizationTemplate>
-
- org.oa4mp.server.loader.oauth2.tokens.AuthorizationTemplates
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,AuthorizationTemplate>
public class AuthorizationTemplates extends HashMap<String,AuthorizationTemplate>
This keys off the audience. TheAuthorizationTemplate
contains multiple paths. At this point we have a single one of these per audience, i.e. the audience is the unique key.Created by Jeff Gaynor
on 8/2/18 at 2:42 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXTENSIBLE_KEY
static String
OPERATION_KEY
static String
PATH_KEY
-
Constructor Summary
Constructors Constructor Description AuthorizationTemplates()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
void
fromJSON(String rawJSON)
Create this from aJSON
object.void
fromJSON(net.sf.json.JSON json)
the actual argument is assumed to be a JSON array of templates.void
fromJSON(net.sf.json.JSONArray array)
This actually does the work.static void
main(String[] args)
AuthorizationTemplate
put(AuthorizationTemplate value)
net.sf.json.JSONArray
toJSON()
Turn the contents of this object into a JSON object-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
hashCode, toString
-
-
-
-
Field Detail
-
OPERATION_KEY
public static final String OPERATION_KEY
- See Also:
- Constant Field Values
-
PATH_KEY
public static final String PATH_KEY
- See Also:
- Constant Field Values
-
EXTENSIBLE_KEY
public static final String EXTENSIBLE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
put
public AuthorizationTemplate put(AuthorizationTemplate value)
-
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 tofromJSON(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 serializedAuthorizationTemplate
objects.- Parameters:
array
-
-
fromJSON
public void fromJSON(String rawJSON)
Create this from aJSON
object. If this is a singleJSONObject
, then it is assumed to be aAuthorizationTemplate
. If it isJSONArray
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:
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceMap<String,AuthorizationTemplate>
- Overrides:
equals
in classAbstractMap<String,AuthorizationTemplate>
-
main
public static void main(String[] args)
-
-