org.wso2.balana.cond.xacml3
Class StringCreationFunction

java.lang.Object
  extended by org.wso2.balana.cond.FunctionBase
      extended by org.wso2.balana.cond.xacml3.StringCreationFunction
All Implemented Interfaces:
Expression, Function

public class StringCreationFunction
extends FunctionBase

String creation function that creates String from other data types


Field Summary
static String NAME_STRING_FROM_BOOLEAN
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_DATE
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_DATE_TIME
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_DAYTIME_DURATION
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_DNS
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_DOUBLE
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_INTEGER
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_IP_ADDRESS
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_RFC822NAME
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_TIME
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_URI
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_X500NAME
          Standard identifier for the String-from-boolean function.
static String NAME_STRING_FROM_YEAR_MONTH_DURATION
          Standard identifier for the String-from-boolean function.
 
Fields inherited from class org.wso2.balana.cond.FunctionBase
FUNCTION_NS, FUNCTION_NS_2, FUNCTION_NS_3
 
Constructor Summary
StringCreationFunction(String functionName)
          Creates a new EqualFunction object.
 
Method Summary
 EvaluationResult evaluate(List<Evaluatable> inputs, EvaluationCtx context)
          Evaluates the Function using the given inputs.
static Set<String> getSupportedIdentifiers()
          Returns a Set containing all the function identifiers supported by this class.
 
Methods inherited from class org.wso2.balana.cond.FunctionBase
checkInputs, checkInputsNoBag, encode, encode, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, getType, makeProcessingError, returnsBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_STRING_FROM_BOOLEAN

public static final String NAME_STRING_FROM_BOOLEAN
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_DOUBLE

public static final String NAME_STRING_FROM_DOUBLE
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_TIME

public static final String NAME_STRING_FROM_TIME
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_DATE_TIME

public static final String NAME_STRING_FROM_DATE_TIME
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_DATE

public static final String NAME_STRING_FROM_DATE
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_INTEGER

public static final String NAME_STRING_FROM_INTEGER
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_URI

public static final String NAME_STRING_FROM_URI
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_DAYTIME_DURATION

public static final String NAME_STRING_FROM_DAYTIME_DURATION
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_YEAR_MONTH_DURATION

public static final String NAME_STRING_FROM_YEAR_MONTH_DURATION
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_X500NAME

public static final String NAME_STRING_FROM_X500NAME
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_RFC822NAME

public static final String NAME_STRING_FROM_RFC822NAME
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_DNS

public static final String NAME_STRING_FROM_DNS
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values

NAME_STRING_FROM_IP_ADDRESS

public static final String NAME_STRING_FROM_IP_ADDRESS
Standard identifier for the String-from-boolean function.

See Also:
Constant Field Values
Constructor Detail

StringCreationFunction

public StringCreationFunction(String functionName)
Creates a new EqualFunction object.

Parameters:
functionName - the standard XACML name of the function to be handled by this object, including the full namespace
Method Detail

getSupportedIdentifiers

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

Returns:
a Set of Strings

evaluate

public EvaluationResult evaluate(List<Evaluatable> inputs,
                                 EvaluationCtx context)
Description copied from interface: Function
Evaluates the Function using the given inputs. The List contains Evaluatables which are all of the correct type if the Function has been created as part of an Apply or TargetMatch, but which may otherwise be invalid. Each parameter should be evaluated by the Function, unless the Function doesn't need to evaluate all inputs to determine a result (as in the case of the or function). The order of the List is significant, so a Function should have a very good reason if it wants to evaluate the inputs in a different order.

Note that if this is a higher-order function, like any-of, then some argument (typically the first) in the List will actually be a Function object representing the function to apply to some bag. A function needs to know if it's a higher-order function, and therefore whether or not to look for this case. Also, a higher-order function is responsible for checking that the inputs that it will pass to the Function provided as the first parameter are valid, ie. it must do a checkInputs on its sub-function when checkInputs is called on the higher-order function.

Parameters:
inputs - the List of inputs for the function
context - the representation of the request
Returns:
a result containing the AttributeValue computed when evaluating the function, or Status specifying some error condition


Copyright © 2015 WSO2. All rights reserved.