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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.sun.xacml.cond.FunctionFactory
      extended bycom.sun.xacml.cond.BaseFunctionFactory
          extended bycom.sun.xacml.cond.StandardFunctionFactory

public class StandardFunctionFactory
extends BaseFunctionFactory

This factory supports the standard set of functions specified in XACML 1.0 and 1.1. It is the default factory used by the system, and imposes a singleton pattern insuring that there is only ever one instance of this class.

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.

Since:
1.2

Field Summary
private static java.util.Map conditionAbstractFunctions
           
private static StandardFunctionFactory conditionFactory
           
private static java.util.Set conditionFunctions
           
private static java.util.Map generalAbstractFunctions
           
private static StandardFunctionFactory generalFactory
           
private static java.util.Set generalFunctions
           
private static java.util.logging.Logger logger
           
private  java.util.Map supportedAbstractFunctions
           
private  java.util.Set supportedFunctions
           
private static java.util.Map targetAbstractFunctions
           
private static StandardFunctionFactory targetFactory
           
private static java.util.Set targetFunctions
           
 
Fields inherited from class com.sun.xacml.cond.BaseFunctionFactory
 
Fields inherited from class com.sun.xacml.cond.FunctionFactory
 
Constructor Summary
private StandardFunctionFactory(java.util.Set supportedFunctions, java.util.Map supportedAbstractFunctions)
          Creates a new StandardFunctionFactory, making sure that the default maps are initialized correctly.
 
Method Summary
 void addAbstractFunction(FunctionProxy proxy, java.net.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.
 java.util.Map getStandardAbstractFunctions()
          Returns the set of abstract functions that this standard factory supports as a mapping of identifier to proxy.
 java.util.Set getStandardFunctions()
          Returns the set of functions that this standard factory supports.
static StandardFunctionFactory getTargetFactory()
          Returns a FunctionFactory that will only provide those functions that are usable in Target matching.
private static void initConditionFunctions()
          Private initializer for the condition functions.
private static void initGeneralFunctions()
          Private initializer for the general functions.
private static void initTargetFunctions()
          Private initializer for the target functions.
 
Methods inherited from class com.sun.xacml.cond.BaseFunctionFactory
createAbstractFunction, createAbstractFunction, createAbstractFunction, createAbstractFunction, createFunction, createFunction, getSupportedFunctions
 
Methods inherited from class com.sun.xacml.cond.FunctionFactory
addAbstractConditionFunction, addAbstractGeneralFunction, addAbstractTargetFunction, addConditionFunction, addGeneralFunction, addTargetFunction, getConditionInstance, getGeneralInstance, getTargetInstance, setDefaultFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetFactory

private static StandardFunctionFactory targetFactory

conditionFactory

private static StandardFunctionFactory conditionFactory

generalFactory

private static StandardFunctionFactory generalFactory

targetFunctions

private static java.util.Set targetFunctions

conditionFunctions

private static java.util.Set conditionFunctions

generalFunctions

private static java.util.Set generalFunctions

targetAbstractFunctions

private static java.util.Map targetAbstractFunctions

conditionAbstractFunctions

private static java.util.Map conditionAbstractFunctions

generalAbstractFunctions

private static java.util.Map generalAbstractFunctions

supportedFunctions

private java.util.Set supportedFunctions

supportedAbstractFunctions

private java.util.Map supportedAbstractFunctions

logger

private static final java.util.logging.Logger logger
Constructor Detail

StandardFunctionFactory

private StandardFunctionFactory(java.util.Set supportedFunctions,
                                java.util.Map supportedAbstractFunctions)
Creates a new StandardFunctionFactory, making sure that the default maps are initialized correctly. Standard factories can't be modified, so there is no notion of supersetting since that's only used for correctly propagating new functions.

Method Detail

initTargetFunctions

private static void initTargetFunctions()
Private initializer for the target functions. This is only ever called once.


initConditionFunctions

private static void initConditionFunctions()
Private initializer for the condition functions. This is only ever called once.


initGeneralFunctions

private static void initGeneralFunctions()
Private initializer for the general functions. This is only ever called once.


getTargetFactory

public static StandardFunctionFactory getTargetFactory()
Returns a FunctionFactory that will only provide those functions that are usable in Target matching. This method enforces a singleton model, meaning that this always returns the same instance, creating the factory if it hasn't been requested before. This is the default model used by the FunctionFactory, ensuring quick access to this factory.


getConditionFactory

public static StandardFunctionFactory getConditionFactory()
Returns a 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. This method enforces a singleton model, meaning that this always returns the same instance, creating the factory if it hasn't been requested before. This is the default model used by the FunctionFactory, ensuring quick access to this factory.


getGeneralFactory

public static StandardFunctionFactory getGeneralFactory()
Returns a FunctionFactory that provides access to all the functions. These Functions are a superset of the Condition functions. This method enforces a singleton model, meaning that this always returns the same instance, creating the factory if it hasn't been requested before. This is the default model used by the FunctionFactory, ensuring quick access to this factory.


getStandardFunctions

public java.util.Set getStandardFunctions()
Returns the set of functions that this standard factory supports.


getStandardAbstractFunctions

public java.util.Map getStandardAbstractFunctions()
Returns the set of abstract functions that this standard factory supports as a mapping of identifier to proxy.


getNewFactoryProxy

public 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. These factories allow adding support for new functions.


addFunction

public void addFunction(Function function)
                 throws java.lang.IllegalArgumentException
Always throws an exception, since support for new functions may not be added to a standard factory.

Overrides:
addFunction in class BaseFunctionFactory

addAbstractFunction

public void addAbstractFunction(FunctionProxy proxy,
                                java.net.URI identity)
                         throws java.lang.IllegalArgumentException
Always throws an exception, since support for new functions may not be added to a standard factory.

Overrides:
addAbstractFunction in class BaseFunctionFactory