public final class EvaluableCredentialCriteriaRegistry extends Object
Criteria
to the class type which can evaluate that criteria's
data against a Credential
target. That latter class will be a subtype of EvaluableCredentialCriteria
.
Each EvaluableCredentialCriteria implementation that is registered MUST implement a single-arg
constructor which takes an instance of the Criteria to be evaluated. The evaluable instance is instantiated
reflectively based on this requirement.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MAPPINGS_FILE
Properties file storing default mappings from criteria to evaluable credential criteria.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearRegistry()
Clear all mappings from the registry.
|
static void |
deregister(Class<? extends Criteria> criteriaClass)
Deregister a criteria-evaluator mapping.
|
static EvaluableCredentialCriteria |
getEvaluator(Criteria criteria)
Get an instance of EvaluableCredentialCriteria which can evaluate the supplied criteria's requirements against a
Credential target.
|
static void |
init()
Initialize the registry.
|
static boolean |
isInitialized()
Check whether the registry has been initialized.
|
static void |
loadDefaultMappings()
Load the default set of criteria-evaluator mappings from the default mappings properties file.
|
static void |
loadMappings(Properties mappings)
Load a set of criteria-evaluator mappings from the supplied properties set.
|
static Class<? extends EvaluableCredentialCriteria> |
lookup(Class<? extends Criteria> clazz)
Lookup the class subtype of EvaluableCredentialCriteria which is registered for the specified Criteria class.
|
static void |
register(Class<? extends Criteria> criteriaClass,
Class<? extends EvaluableCredentialCriteria> evaluableClass)
Register a credential evaluator class for a criteria class.
|
public static final String DEFAULT_MAPPINGS_FILE
public static EvaluableCredentialCriteria getEvaluator(Criteria criteria) throws SecurityException
criteria
- the criteria to be evaluated against a credentialSecurityException
- thrown if there is an error reflectively instantiating a new instance of
EvaluableCredentialCriteria based on class information stored in the registrypublic static Class<? extends EvaluableCredentialCriteria> lookup(Class<? extends Criteria> clazz)
clazz
- the Criteria class subtype to lookuppublic static void register(Class<? extends Criteria> criteriaClass, Class<? extends EvaluableCredentialCriteria> evaluableClass)
criteriaClass
- class subtype of Criteria
evaluableClass
- class subtype of EvaluableCredentialCriteria
public static void deregister(Class<? extends Criteria> criteriaClass)
criteriaClass
- class subtype of Criteria
public static void clearRegistry()
public static boolean isInitialized()
public static void init()
public static void loadDefaultMappings()
public static void loadMappings(Properties mappings)
mappings
- properies set where the key is the criteria class name, the value is the evaluator class nameCopyright © 2018 JBoss by Red Hat. All rights reserved.