SunTM's XACML Implementation for JavaTM

com.sun.xacml.cond
Class GeneralBagFunction

java.lang.Object
  extended bycom.sun.xacml.cond.FunctionBase
      extended bycom.sun.xacml.cond.BagFunction
          extended bycom.sun.xacml.cond.GeneralBagFunction
All Implemented Interfaces:
Function

public class GeneralBagFunction
extends BagFunction

Specific BagFunction class that supports all of the general-purpose bag functions: type-one-and-only, type-bag-size, and type-bag.

Since:
1.2

Field Summary
 
Fields inherited from class com.sun.xacml.cond.BagFunction
baseTypes, NAME_BASE_BAG, NAME_BASE_BAG_SIZE, NAME_BASE_IS_IN, NAME_BASE_ONE_AND_ONLY, simpleTypes
 
Fields inherited from class com.sun.xacml.cond.FunctionBase
FUNCTION_NS
 
Constructor Summary
GeneralBagFunction(String functionName)
          Constructor that is used to create one of the general-purpose standard bag functions.
GeneralBagFunction(String functionName, String datatype, String functionType)
          Constructor that is used to create instances of general-purpose bag functions for new (non-standard) datatypes.
 
Method Summary
 EvaluationResult evaluate(List inputs, EvaluationCtx context)
          Evaluate the function, using the specified parameters.
static Set getSupportedIdentifiers()
          Returns a Set containing all the function identifiers supported by this class.
 
Methods inherited from class com.sun.xacml.cond.BagFunction
getBagInstance, getBagSizeInstance, getIsInInstance, getOneAndOnlyInstance
 
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
 

Constructor Detail

GeneralBagFunction

public GeneralBagFunction(String functionName)
Constructor that is used to create one of the general-purpose standard bag functions. The name supplied must be one of the standard XACML functions supported by this class, including the full namespace, otherwise an exception is thrown. Look in BagFunction for details about the supported names.

Parameters:
functionName - the name of the function to create
Throws:
IllegalArgumentException - if the function is unknown

GeneralBagFunction

public GeneralBagFunction(String functionName,
                          String datatype,
                          String functionType)
Constructor that is used to create instances of general-purpose bag functions for new (non-standard) datatypes. This is equivalent to using the getInstance methods in BagFunction and is generally only used by the run-time configuration code.

Parameters:
functionName - the name of the new function
datatype - the full identifier for the supported datatype
functionType - which kind of Bag function, based on the NAME_BASE_* fields
Method Detail

getSupportedIdentifiers

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

Returns:
a Set of Strings

evaluate

public EvaluationResult evaluate(List inputs,
                                 EvaluationCtx context)
Evaluate the function, using the specified parameters.

Parameters:
inputs - a List of Evaluatable objects representing the arguments passed to the function
context - an EvaluationCtx so that the Evaluatable objects can be evaluated
Returns:
an EvaluationResult representing the function's result

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.