|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.cond.FunctionFactory
public abstract class FunctionFactory
Factory used to create all functions. There are three kinds of factories: general, condition, and target. These provide functions that can be used anywhere, only in a condition's root and only in a target (respectively).
Note that all functions, except for abstract functions, are singletons, so any instance that is added to a factory will be the same one returned from the create methods. This is done because most functions don't have state, so there is no need to have more than one, or to spend the time creating multiple instances that all do the same thing.
Constructor Summary | |
---|---|
protected |
FunctionFactory()
Default constructor. |
Method Summary | |
---|---|
static void |
addAbstractConditionFunction(FunctionProxy proxy,
URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
abstract void |
addAbstractFunction(FunctionProxy proxy,
URI identity)
Adds the abstract function proxy to the factory. |
static void |
addAbstractGeneralFunction(FunctionProxy proxy,
URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
static void |
addAbstractTargetFunction(FunctionProxy proxy,
URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
static void |
addConditionFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
abstract void |
addFunction(Function function)
Adds the function to the factory. |
static void |
addGeneralFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
static void |
addTargetFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) .
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version. |
abstract Function |
createAbstractFunction(String identity,
Node root)
Tries to get an instance of the specified abstract function. |
abstract Function |
createAbstractFunction(String identity,
Node root,
String xpathVersion)
Tries to get an instance of the specified abstract function. |
abstract Function |
createAbstractFunction(URI identity,
Node root)
Tries to get an instance of the specified abstract function. |
abstract Function |
createAbstractFunction(URI identity,
Node root,
String xpathVersion)
Tries to get an instance of the specified abstract function. |
abstract Function |
createFunction(String identity)
Tries to get an instance of the specified function. |
abstract Function |
createFunction(URI identity)
Tries to get an instance of the specified function. |
static FunctionFactory |
getConditionInstance()
Returns the default FuntionFactory that will only provide those functions that are usable in the root of the Condition. |
static FunctionFactory |
getConditionInstance(String identifier)
Returns a factory based on the given identifier. |
static FunctionFactory |
getGeneralInstance()
Returns the default FunctionFactory that provides access to all the functions. |
static FunctionFactory |
getGeneralInstance(String identifier)
Returns a factory based on the given identifier. |
static FunctionFactoryProxy |
getInstance()
Returns the default FunctionFactoryProxy that provides access to all the functions. |
static FunctionFactoryProxy |
getInstance(String identifier)
Returns a factory based on the given identifier. |
abstract Set |
getSupportedFunctions()
Returns the function identifiers supported by this factory. |
static FunctionFactory |
getTargetInstance()
Returns the default FunctionFactory that will only provide those functions that are usable in Target matching. |
static FunctionFactory |
getTargetInstance(String identifier)
Returns a factory based on the given identifier. |
static void |
registerFactory(String identifier,
FunctionFactoryProxy proxy)
Registers the given factory proxy with the given identifier. |
static void |
setDefaultFactory(FunctionFactoryProxy proxy)
Sets the default factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FunctionFactory()
Method Detail |
---|
public static final FunctionFactory getTargetInstance()
FunctionFactory
for target functionspublic static final FunctionFactory getTargetInstance(String identifier) throws UnknownIdentifierException
identifier
- the identifier for a factory
FunctionFactory
that supports Target functions
UnknownIdentifierException
- if the given identifier isn't
registeredpublic static final FunctionFactory getConditionInstance()
FunctionFactory
for condition functionspublic static final FunctionFactory getConditionInstance(String identifier) throws UnknownIdentifierException
identifier
- the identifier for a factory
FunctionFactory
that supports Condition functions
UnknownIdentifierException
- if the given identifier isn't
registeredpublic static final FunctionFactory getGeneralInstance()
FunctionFactory
for all functionspublic static final FunctionFactory getGeneralInstance(String identifier) throws UnknownIdentifierException
identifier
- the identifier for a factory
FunctionFactory
that supports General functions
UnknownIdentifierException
- if the given identifier isn't
registeredpublic static final FunctionFactoryProxy getInstance()
FunctionFactoryProxy
for all functionspublic static final FunctionFactoryProxy getInstance(String identifier) throws UnknownIdentifierException
identifier
- the identifier for a factory
FunctionFactoryProxy
UnknownIdentifierException
- if the given identifier isn't
registeredpublic static final void setDefaultFactory(FunctionFactoryProxy proxy)
proxy
- the FunctionFactoryProxy
to set as the new
default factory proxypublic static final void registerFactory(String identifier, FunctionFactoryProxy proxy) throws IllegalArgumentException
identifier
- the identifier for the proxyproxy
- the FunctionFactoryProxy
to register with
the given identifier
IllegalArgumentException
- if the identifier is already usedpublic abstract void addFunction(Function function)
function
- the Function
to add to the factory
IllegalArgumentException
- if the function's identifier is already
usedpublic abstract void addAbstractFunction(FunctionProxy proxy, URI identity)
proxy
- the FunctionProxy
to add to the factoryidentity
- the function's identifier
IllegalArgumentException
- if the function's identifier is already
usedpublic static void addTargetFunction(Function function)
addFunction(Function)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
function
- the function to add
IllegalArgumentException
- if the name is already in usepublic static void addAbstractTargetFunction(FunctionProxy proxy, URI identity)
addAbstractFunction(FunctionProxy,URI)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
proxy
- the function proxy to addidentity
- the name of the function
IllegalArgumentException
- if the name is already in usepublic static void addConditionFunction(Function function)
addFunction(Function)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
function
- the function to add
IllegalArgumentException
- if the name is already in usepublic static void addAbstractConditionFunction(FunctionProxy proxy, URI identity)
addAbstractFunction(FunctionProxy,URI)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
proxy
- the function proxy to addidentity
- the name of the function
IllegalArgumentException
- if the name is already in usepublic static void addGeneralFunction(Function function)
addFunction(Function)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
function
- the function to add
IllegalArgumentException
- if the name is already in usepublic static void addAbstractGeneralFunction(FunctionProxy proxy, URI identity)
addAbstractFunction(FunctionProxy,URI)
.
The new factory system requires you to get a factory
instance and then call the non-static methods on that
factory. The static versions of these methods have been
left in for now, but are slower and will be removed in
a future version.
proxy
- the function proxy to addidentity
- the name of the function
IllegalArgumentException
- if the name is already in usepublic abstract Set getSupportedFunctions()
Set
of String
spublic abstract Function createFunction(URI identity) throws UnknownIdentifierException, FunctionTypeException
identity
- the name of the function
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to an
abstract function, and should therefore
be created through createAbstractFunctionpublic abstract Function createFunction(String identity) throws UnknownIdentifierException, FunctionTypeException
identity
- the name of the function
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to an
abstract function, and should therefore
be created through createAbstractFunctionpublic abstract Function createAbstractFunction(URI identity, Node root) throws UnknownIdentifierException, ParsingException, FunctionTypeException
identity
- the name of the functionroot
- the DOM root containing info used to create the function
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to a
concrete function, and should therefore
be created through createFunction
ParsingException
- if the function can't be created with the
given inputspublic abstract Function createAbstractFunction(URI identity, Node root, String xpathVersion) throws UnknownIdentifierException, ParsingException, FunctionTypeException
identity
- the name of the functionroot
- the DOM root containing info used to create the functionxpathVersion
- the version specified in the contianing policy, or
null if no version was specified
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to a
concrete function, and should therefore
be created through createFunction
ParsingException
- if the function can't be created with the
given inputspublic abstract Function createAbstractFunction(String identity, Node root) throws UnknownIdentifierException, ParsingException, FunctionTypeException
identity
- the name of the functionroot
- the DOM root containing info used to create the function
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to a
concrete function, and should therefore
be created through createFunction
ParsingException
- if the function can't be created with the
given inputspublic abstract Function createAbstractFunction(String identity, Node root, String xpathVersion) throws UnknownIdentifierException, ParsingException, FunctionTypeException
identity
- the name of the functionroot
- the DOM root containing info used to create the functionxpathVersion
- the version specified in the contianing policy, or
null if no version was specified
UnknownIdentifierException
- if the name isn't known
FunctionTypeException
- if the name is known to map to a
concrete function, and should therefore
be created through createFunction
ParsingException
- if the function can't be created with the
given inputs
|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |