public class StandardFunctionFactory extends BaseFunctionFactory
Note that because this supports only the standard functions, this factory does not allow the
addition of any other functions. If you call addFunction on an instance of this
class, an exception will be thrown. If you need a standard factory that is modifiable, you can
either create a new BaseFunctionFactory (or some other implementation of
FunctionFactory) populated with the standard functions from
getStandardFunctions or you can use getNewFactoryProxy to get a proxy
containing a new, modifiable set of factories.
| Modifier and Type | Method and Description |
|---|---|
void |
addAbstractFunction(FunctionProxy proxy,
URI identity)
Always throws an exception, since support for new functions may not be added to a standard
factory.
|
void |
addFunction(Function function)
Always throws an exception, since support for new functions may not be added to a standard
factory.
|
static StandardFunctionFactory |
getConditionFactory()
Returns a FuntionFactory that will only provide those functions that are usable in the root
of the Condition.
|
static StandardFunctionFactory |
getGeneralFactory()
Returns a FunctionFactory that provides access to all the functions.
|
static FunctionFactoryProxy |
getNewFactoryProxy()
A convenience method that returns a proxy containing newly created instances of
BaseFunctionFactorys that are correctly supersetted and contain the standard
functions and abstract functions. |
static Map |
getStandardAbstractFunctions(String xacmlVersion)
Returns the set of abstract functions that this standard factory supports as a mapping of
identifier to proxy.
|
static Set |
getStandardFunctions(String xacmlVersion)
Returns the identifiers supported for the given version of XACML.
|
static StandardFunctionFactory |
getTargetFactory()
Returns a FunctionFactory that will only provide those functions that are usable in Target
matching.
|
createAbstractFunction, createAbstractFunction, createAbstractFunction, createAbstractFunction, createFunction, createFunction, getSupportedFunctionsaddAbstractConditionFunction, addAbstractGeneralFunction, addAbstractTargetFunction, addConditionFunction, addGeneralFunction, addTargetFunction, getConditionInstance, getConditionInstance, getGeneralInstance, getGeneralInstance, getInstance, getInstance, getTargetInstance, getTargetInstance, registerFactory, setDefaultFactorypublic static StandardFunctionFactory getTargetFactory()
FunctionFactory, ensuring quick access to this factory.FunctionFactory for target functionspublic static StandardFunctionFactory getConditionFactory()
FunctionFactory, ensuring quick access to this factory.FunctionFactory for condition functionspublic static StandardFunctionFactory getGeneralFactory()
FunctionFactory, ensuring quick
access to this factory.FunctionFactory for all functionspublic static Set getStandardFunctions(String xacmlVersion)
xacmlVersion - a standard XACML identifier string, as provided in
PolicyMetaDataSet of identifiersUnknownIdentifierException - if the version string is unknownpublic static Map getStandardAbstractFunctions(String xacmlVersion)
Map mapping URIs to FunctionProxyspublic static FunctionFactoryProxy getNewFactoryProxy()
BaseFunctionFactorys that are correctly supersetted and contain the standard
functions and abstract functions. These factories allow adding support for new functions.public void addFunction(Function function) throws IllegalArgumentException
addFunction in class BaseFunctionFactoryfunction - the Function to add to the factoryUnsupportedOperationException - alwaysIllegalArgumentException - if the function's identifier is already used or if the
function is non-boolean (when this is a Target or Condition factory)public void addAbstractFunction(FunctionProxy proxy, URI identity) throws IllegalArgumentException
addAbstractFunction in class BaseFunctionFactoryproxy - the FunctionProxy to add to the factoryidentity - the function's identifierUnsupportedOperationException - alwaysIllegalArgumentException - if the function's identifier is already usedCopyright © 2024 WSO2. All rights reserved.