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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.sun.xacml.cond.MapFunction
All Implemented Interfaces:
Function

class MapFunction
extends java.lang.Object
implements Function

Represents the higher order bag function map.

Since:
1.0

Field Summary
private static java.lang.RuntimeException earlyException
           
private static java.net.URI identifier
           
static java.lang.String NAME_MAP
          The name of this function
private  java.net.URI returnType
           
 
Constructor Summary
MapFunction(java.net.URI returnType)
          Creates a new instance of a MapFunction.
 
Method Summary
 void checkInputs(java.util.List inputs)
          Checks that the input list is valid for evaluation.
 void checkInputsNoBag(java.util.List inputs)
          Always throws IllegalArgumentException since map needs to work on a bag
 EvaluationResult evaluate(java.util.List inputs, com.sun.xacml.EvaluationCtx context)
          Evaluates the function given the input data.
 java.net.URI getIdentifier()
          Returns the full identifier of this function, as known by the factories.
static MapFunction getInstance(org.w3c.dom.Node root)
          Creates a new instance of the map function using the data found in the DOM node provided.
 java.net.URI getReturnType()
          Returns the attribute type returned by this function.
static java.util.Set getSupportedIdentifiers()
          Returns a Set containing all the function identifiers supported by this class.
private static EvaluationResult makeProcessingError(java.lang.String message)
          Helper function to create a processing error message.
 boolean returnsBag()
          Returns true, since the map function always returns a bag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_MAP

public static final java.lang.String NAME_MAP
The name of this function

See Also:
Constant Field Values

returnType

private java.net.URI returnType

identifier

private static java.net.URI identifier

earlyException

private static java.lang.RuntimeException earlyException
Constructor Detail

MapFunction

public MapFunction(java.net.URI returnType)
Creates a new instance of a MapFunction.

Method Detail

getSupportedIdentifiers

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


getInstance

public static MapFunction getInstance(org.w3c.dom.Node root)
                               throws com.sun.xacml.ParsingException
Creates a new instance of the map function using the data found in the DOM node provided. This is called by a proxy when the factory is asked to create one of these functions.


getIdentifier

public java.net.URI getIdentifier()
Returns the full identifier of this function, as known by the factories.

Specified by:
getIdentifier in interface Function

getReturnType

public java.net.URI getReturnType()
Returns the attribute type returned by this function.

Specified by:
getReturnType in interface Function

returnsBag

public boolean returnsBag()
Returns true, since the map function always returns a bag

Specified by:
returnsBag in interface Function

makeProcessingError

private static EvaluationResult makeProcessingError(java.lang.String message)
Helper function to create a processing error message.


evaluate

public EvaluationResult evaluate(java.util.List inputs,
                                 com.sun.xacml.EvaluationCtx context)
Evaluates the function given the input data. Map expects a Function followed by a BagAttribute.

Specified by:
evaluate in interface Function

checkInputs

public void checkInputs(java.util.List inputs)
                 throws java.lang.IllegalArgumentException
Checks that the input list is valid for evaluation.

Specified by:
checkInputs in interface Function

checkInputsNoBag

public void checkInputsNoBag(java.util.List inputs)
                      throws java.lang.IllegalArgumentException
Always throws IllegalArgumentException since map needs to work on a bag

Specified by:
checkInputsNoBag in interface Function