All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.att.research.xacmlatt.pdp.policy.FunctionDefinition Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
/*
 *
 *          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 FunctionArguments 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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy