com.att.research.xacmlatt.pdp.policy.FunctionDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xacml-pdp Show documentation
Show all versions of xacml-pdp Show documentation
ATT reference implementation of XACML PDP engine
/*
*
* Copyright (c) 2013,2019 AT&T Knowledge Ventures
* SPDX-License-Identifier: MIT
*/
package com.att.research.xacmlatt.pdp.policy;
import java.util.List;
import com.att.research.xacml.api.Identifier;
import com.att.research.xacmlatt.pdp.eval.EvaluationContext;
/**
* FunctionDefinition is the interface that objects representing XACML functions found in Match and Apply elements in Policies, PolicySets
* and Rules.
*
* @author car
* @version $Revision: 1.1 $
*/
public interface FunctionDefinition {
/**
* Gets the {@link com.att.research.xacml.api.Identifier} for this FunctionDefinition
.
*
* @return the Identifier
for this FunctionDefinition
.
*/
public Identifier getId();
/**
* Returns the Identifier
for the data type returned by this function if returnsBag()
is false or
* if this FunctionDefinition
returns a bag containing a single data type. Otherwise it returns null.
*
* @return the Identifier
for the XACML data type this FunctionDefinition
returns
*/
public Identifier getDataTypeId();
/**
* Determines if this FunctionDefinition
returns a bag of values or a single value.
*
* @return true if this FunctionDefinition
returns a bag, else false
*/
public boolean returnsBag();
/**
* Evaluates this FunctionDefinition
on the given List
of{@link com.att.research.xacmlatt.pdp.policy.FunctionArgument}s.
*
* @param evaluationContext the {@link com.att.research.xacmlatt.pdp.eval.EvaluationContext} to use in the evaluation
* @param arguments the List
of FunctionArgument
s for the evaluation
* @return an {@link com.att.research.xacmlatt.pdp.policy.ExpressionResult} with the results of the call
*/
public ExpressionResult evaluate(EvaluationContext evaluationContext, List arguments);
}