Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.cond
Class FunctionFactory  view FunctionFactory download FunctionFactory.java

java.lang.Object
  extended bycom.sun.xacml.cond.FunctionFactory
Direct Known Subclasses:
BaseFunctionFactory

public abstract class FunctionFactory
extends java.lang.Object

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.

Since:
1.0

Field Summary
private static FunctionFactoryProxy defaultFactoryProxy
           
 
Constructor Summary
protected FunctionFactory()
          Default constructor.
 
Method Summary
static void addAbstractConditionFunction(FunctionProxy proxy, java.net.URI identity)
          Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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, java.net.URI identity)
          Adds the abstract function proxy to the factory.
static void addAbstractGeneralFunction(FunctionProxy proxy, java.net.URI identity)
          Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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, java.net.URI identity)
          Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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) 55 . 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) 55 . 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) 55 . 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(java.lang.String identity, org.w3c.dom.Node root)
          Tries to get an instance of the specified abstract function.
abstract  Function createAbstractFunction(java.lang.String identity, org.w3c.dom.Node root, java.lang.String xpathVersion)
          Tries to get an instance of the specified abstract function.
abstract  Function createAbstractFunction(java.net.URI identity, org.w3c.dom.Node root)
          Tries to get an instance of the specified abstract function.
abstract  Function createAbstractFunction(java.net.URI identity, org.w3c.dom.Node root, java.lang.String xpathVersion)
          Tries to get an instance of the specified abstract function.
abstract  Function createFunction(java.lang.String identity)
          Tries to get an instance of the specified function.
abstract  Function createFunction(java.net.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 getGeneralInstance()
          Returns the default FunctionFactory that provides access to all the functions.
abstract  java.util.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 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
 

Field Detail

defaultFactoryProxy

private static FunctionFactoryProxy defaultFactoryProxy
Constructor Detail

FunctionFactory

protected FunctionFactory()
Default constructor. Used only by subclasses.

Method Detail

getTargetInstance

public static final FunctionFactory getTargetInstance()
Returns the default FunctionFactory that will only provide those functions that are usable in Target matching.


getConditionInstance

public static final FunctionFactory getConditionInstance()
Returns the default FuntionFactory that will only provide those functions that are usable in the root of the Condition. These Functions are a superset of the Target functions.


getGeneralInstance

public static final FunctionFactory getGeneralInstance()
Returns the default FunctionFactory that provides access to all the functions. These Functions are a superset of the Condition functions.


setDefaultFactory

public static final void setDefaultFactory(FunctionFactoryProxy proxy)
Sets the default factory. Note that this is just a placeholder for now, and will be replaced with a more useful mechanism soon.


addFunction

public abstract void addFunction(Function function)
Adds the function to the factory. Most functions have no state, so the singleton model used here is typically desireable. The factory will not enforce the requirement that a Target or Condition matching function must be boolean.


addAbstractFunction

public abstract void addAbstractFunction(FunctionProxy proxy,
                                         java.net.URI identity)
Adds the abstract function proxy to the factory. This is used for those functions which have state, or change behavior (for instance the standard map function, which changes its return type based on how it is used).


addTargetFunction

public static void addTargetFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) 55 . 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.

Adds a target function.


addAbstractTargetFunction

public static void addAbstractTargetFunction(FunctionProxy proxy,
                                             java.net.URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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.

Adds an abstract target function.


addConditionFunction

public static void addConditionFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) 55 . 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.

Adds a condition function.


addAbstractConditionFunction

public static void addAbstractConditionFunction(FunctionProxy proxy,
                                                java.net.URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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.

Adds an abstract condition function.


addGeneralFunction

public static void addGeneralFunction(Function function)
Deprecated. As of version 1.2, replaced by addFunction(Function) 55 . 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.

Adds a general function.


addAbstractGeneralFunction

public static void addAbstractGeneralFunction(FunctionProxy proxy,
                                              java.net.URI identity)
Deprecated. As of version 1.2, replaced by addAbstractFunction(FunctionProxy,URI) 55 . 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.

Adds an abstract general function.


getSupportedFunctions

public abstract java.util.Set getSupportedFunctions()
Returns the function identifiers supported by this factory.


createFunction

public abstract Function createFunction(java.net.URI identity)
                                 throws com.sun.xacml.UnknownIdentifierException,
                                        FunctionTypeException
Tries to get an instance of the specified function.


createFunction

public abstract Function createFunction(java.lang.String identity)
                                 throws com.sun.xacml.UnknownIdentifierException,
                                        FunctionTypeException
Tries to get an instance of the specified function.


createAbstractFunction

public abstract Function createAbstractFunction(java.net.URI identity,
                                                org.w3c.dom.Node root)
                                         throws com.sun.xacml.UnknownIdentifierException,
                                                com.sun.xacml.ParsingException,
                                                FunctionTypeException
Tries to get an instance of the specified abstract function.


createAbstractFunction

public abstract Function createAbstractFunction(java.net.URI identity,
                                                org.w3c.dom.Node root,
                                                java.lang.String xpathVersion)
                                         throws com.sun.xacml.UnknownIdentifierException,
                                                com.sun.xacml.ParsingException,
                                                FunctionTypeException
Tries to get an instance of the specified abstract function.


createAbstractFunction

public abstract Function createAbstractFunction(java.lang.String identity,
                                                org.w3c.dom.Node root)
                                         throws com.sun.xacml.UnknownIdentifierException,
                                                com.sun.xacml.ParsingException,
                                                FunctionTypeException
Tries to get an instance of the specified abstract function.


createAbstractFunction

public abstract Function createAbstractFunction(java.lang.String identity,
                                                org.w3c.dom.Node root,
                                                java.lang.String xpathVersion)
                                         throws com.sun.xacml.UnknownIdentifierException,
                                                com.sun.xacml.ParsingException,
                                                FunctionTypeException
Tries to get an instance of the specified abstract function.