public class ClaimSourceConfigurationUtil extends Object
Created by Jeff Gaynor
on 7/23/18 at 3:49 PM
Modifier and Type | Field and Description |
---|---|
static String |
ENABLED_TAG |
static String |
FAIL_ON_ERROR_TAG |
static String |
ID_TAG |
static String |
NAME_TAG |
static String |
NOTIFY_ON_FAIL_TAG |
static String |
OMIT_CLAIMS_LIST_TAG |
Constructor and Description |
---|
ClaimSourceConfigurationUtil() |
Modifier and Type | Method and Description |
---|---|
ClaimSourceConfiguration |
createConfiguration()
Override as needed to create a new configuration of the right type.
|
ClaimSourceConfiguration |
fromJSON(ClaimSourceConfiguration config,
net.sf.json.JSONObject json)
Populate and existing configuration.
|
String |
getComponentName() |
ClaimSourceConfiguration |
getConfiguration(MyLoggingFacade logger,
org.apache.commons.configuration.tree.ConfigurationNode node)
Populate a
ClaimSourceConfiguration
NOTE the node is assumed to be for the form {"componentName":{}} where the key is the component name
is the claim source, e.g. |
protected JSONUtil |
getJSONUtil() |
boolean |
isInstanceOf(net.sf.json.JSONObject jsonObject)
Returns if the JSON is the type for for this utility.
|
net.sf.json.JSONObject |
toJSON(ClaimSourceConfiguration config)
Note that is is assumed that the json object is the correct
|
public static final String ID_TAG
public static final String NAME_TAG
public static final String ENABLED_TAG
public static final String FAIL_ON_ERROR_TAG
public static final String NOTIFY_ON_FAIL_TAG
public static final String OMIT_CLAIMS_LIST_TAG
public String getComponentName()
public boolean isInstanceOf(net.sf.json.JSONObject jsonObject)
{"type":{config}}and all this does is check that the type matches the
getComponentName()
.jsonObject
- public ClaimSourceConfiguration createConfiguration()
public ClaimSourceConfiguration getConfiguration(MyLoggingFacade logger, org.apache.commons.configuration.tree.ConfigurationNode node)
ClaimSourceConfiguration
NOTE the node is assumed to be for the form {"componentName":{}} where the key is the component name
is the claim source, e.g. ldap that is used. The default is "default". The vlaue is the actual configuration.
This lets you stick these all over
the place and they stay encapsulated nicely in JSON configuration files.
The value will be of the form {"enabled":"true",...} (so all the tags are top-level in it).logger
- node
- public net.sf.json.JSONObject toJSON(ClaimSourceConfiguration config)
config
- public ClaimSourceConfiguration fromJSON(ClaimSourceConfiguration config, net.sf.json.JSONObject json)
config
- json
- protected JSONUtil getJSONUtil()
Copyright © 2019. All Rights Reserved.