SunTM's XACML Implementation for JavaTM

com.sun.xacml.cond
Class SetFunction

java.lang.Object
  extended bycom.sun.xacml.cond.FunctionBase
      extended bycom.sun.xacml.cond.SetFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
ConditionSetFunction, GeneralSetFunction

public abstract class SetFunction
extends FunctionBase

Represents all of the Set functions, though the actual implementations are in two sub-classes specific to the condition and general set functions.

Since:
1.0

Field Summary
protected static String[] baseTypes
          A complete list of all the XACML datatypes supported by the Set functions
static String NAME_BASE_AT_LEAST_ONE_MEMBER_OF
          Base name for the type-at-least-one-member-of funtions.
static String NAME_BASE_INTERSECTION
          Base name for the type-intersection funtions.
static String NAME_BASE_SET_EQUALS
          Base name for the type-set-equals funtions.
static String NAME_BASE_SUBSET
          Base name for the type-subset funtions.
static String NAME_BASE_UNION
          Base name for the type-union funtions.
protected static String[] simpleTypes
          A complete list of all the XACML datatypes supported by the Set functions, using the "simple" form of the names (eg, string instead of http://www.w3.org/2001/XMLSchema#string)
 
Fields inherited from class com.sun.xacml.cond.FunctionBase
FUNCTION_NS
 
Constructor Summary
protected SetFunction(String functionName, int functionId, String argumentType, String returnType, boolean returnsBag)
          Protected constuctor used by the general and condition subclasses.
 
Method Summary
static SetFunction getAtLeastOneInstance(String functionName, String argumentType)
          Creates a new instance of the at-least-one-member-of set function.
static SetFunction getIntersectionInstance(String functionName, String argumentType)
          Creates a new instance of the intersection set function.
static SetFunction getSetEqualsInstance(String functionName, String argumentType)
          Creates a new instance of the equals set function.
static SetFunction getSubsetInstance(String functionName, String argumentType)
          Creates a new instance of the subset set function.
static Set getSupportedIdentifiers()
          Returns a Set containing all the function identifiers supported by this class.
static SetFunction getUnionInstance(String functionName, String argumentType)
          Creates a new instance of the union set function.
 
Methods inherited from class com.sun.xacml.cond.FunctionBase
checkInputs, checkInputsNoBag, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, makeProcessingError, returnsBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xacml.cond.Function
evaluate
 

Field Detail

NAME_BASE_INTERSECTION

public static final String NAME_BASE_INTERSECTION
Base name for the type-intersection funtions. To get the standard identifier for a given type, use FunctionBase.FUNCTION_NS + the datatype's base name (e.g., string) + NAME_BASE_INTERSECTION.

See Also:
Constant Field Values

NAME_BASE_AT_LEAST_ONE_MEMBER_OF

public static final String NAME_BASE_AT_LEAST_ONE_MEMBER_OF
Base name for the type-at-least-one-member-of funtions. To get the standard identifier for a given type, use FunctionBase.FUNCTION_NS + the datatype's base name (e.g., string) + NAME_BASE_AT_LEAST_ONE_MEMBER_OF.

See Also:
Constant Field Values

NAME_BASE_UNION

public static final String NAME_BASE_UNION
Base name for the type-union funtions. To get the standard identifier for a given type, use FunctionBase.FUNCTION_NS + the datatype's base name (e.g., string) + NAME_BASE_UNION.

See Also:
Constant Field Values

NAME_BASE_SUBSET

public static final String NAME_BASE_SUBSET
Base name for the type-subset funtions. To get the standard identifier for a given type, use FunctionBase.FUNCTION_NS + the datatype's base name (e.g., string) + NAME_BASE_SUBSET.

See Also:
Constant Field Values

NAME_BASE_SET_EQUALS

public static final String NAME_BASE_SET_EQUALS
Base name for the type-set-equals funtions. To get the standard identifier for a given type, use FunctionBase.FUNCTION_NS + the datatype's base name (e.g., string) + NAME_BASE_SET_EQUALS.

See Also:
Constant Field Values

baseTypes

protected static String[] baseTypes
A complete list of all the XACML datatypes supported by the Set functions


simpleTypes

protected static String[] simpleTypes
A complete list of all the XACML datatypes supported by the Set functions, using the "simple" form of the names (eg, string instead of http://www.w3.org/2001/XMLSchema#string)

Constructor Detail

SetFunction

protected SetFunction(String functionName,
                      int functionId,
                      String argumentType,
                      String returnType,
                      boolean returnsBag)
Protected constuctor used by the general and condition subclasses. If you need to create a new SetFunction instance you should either use one of the getInstance methods or construct one of the sub-classes directly.

Parameters:
functionName - the identitifer for the function
functionId - an optional, internal numeric identifier
argumentType - the datatype this function accepts
returnType - the datatype this function returns
returnsBag - whether this function returns bags
Method Detail

getIntersectionInstance

public static SetFunction getIntersectionInstance(String functionName,
                                                  String argumentType)
Creates a new instance of the intersection set function. This should be used to create support for any new attribute types and then the new SetFunction object should be added to the factory (all set functions for the base types are already installed in the factory).

Parameters:
functionName - the name of the function
argumentType - the attribute type this function will work with
Returns:
a new SetFunction for the given type

getAtLeastOneInstance

public static SetFunction getAtLeastOneInstance(String functionName,
                                                String argumentType)
Creates a new instance of the at-least-one-member-of set function. This should be used to create support for any new attribute types and then the new SetFunction object should be added to the factory (all set functions for the base types are already installed in the factory).

Parameters:
functionName - the name of the function
argumentType - the attribute type this function will work with
Returns:
a new SetFunction for the given type

getUnionInstance

public static SetFunction getUnionInstance(String functionName,
                                           String argumentType)
Creates a new instance of the union set function. This should be used to create support for any new attribute types and then the new SetFunction object should be added to the factory (all set functions for the base types are already installed in the factory).

Parameters:
functionName - the name of the function
argumentType - the attribute type this function will work with
Returns:
a new SetFunction for the given type

getSubsetInstance

public static SetFunction getSubsetInstance(String functionName,
                                            String argumentType)
Creates a new instance of the subset set function. This should be used to create support for any new attribute types and then the new SetFunction object should be added to the factory (all set functions for the base types are already installed in the factory).

Parameters:
functionName - the name of the function
argumentType - the attribute type this function will work with
Returns:
a new SetFunction for the given type

getSetEqualsInstance

public static SetFunction getSetEqualsInstance(String functionName,
                                               String argumentType)
Creates a new instance of the equals set function. This should be used to create support for any new attribute types and then the new SetFunction object should be added to the factory (all set functions for the base types are already installed in the factory).

Parameters:
functionName - the name of the function
argumentType - the attribute type this function will work with
Returns:
a new SetFunction for the given type

getSupportedIdentifiers

public static Set getSupportedIdentifiers()
Returns a Set containing all the function identifiers supported by this class.

Returns:
a Set of Strings

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.