eu.xtreemos.xosd.vops.xacml.policy
Class PolicyApply

java.lang.Object
  extended by eu.xtreemos.xosd.vops.xacml.policy.PolicyApply

public class PolicyApply
extends java.lang.Object

This implements Apply function in Policy Rule's section.

Author:
ales.cernivec@xlab.si

Field Summary
private  java.util.ArrayList<PolicyApply> alApply
           
private  java.util.List applyArgs
           
 com.sun.xacml.cond.Function applyFunction
           
private  com.sun.xacml.attr.AttributeValue attribute
           
private  com.sun.xacml.attr.AttributeDesignator attributeDesignator
           
(package private)  com.sun.xacml.cond.FunctionFactory factory
           
private  java.lang.String functionId
           
 
Constructor Summary
PolicyApply()
           
PolicyApply(PolicyApply e, com.sun.xacml.attr.AttributeValue value)
          Constructs just attributeValue label with no apply function
PolicyApply(java.lang.String applyFunctionStr)
          Constructs Apply XACML object with provided function, designator, type and id.
PolicyApply(java.lang.String applyFunctionStr, int attrDesignator, java.net.URI designatorType, com.sun.xacml.attr.AttributeValue value, java.net.URI designatorId)
          Constructs Apply XACML object with provided function, designator, type and id.
PolicyApply(java.lang.String applyFunctionStr, int attrDesignator, java.net.URI designatorType, java.net.URI designatorId)
          Constructs Apply XACML object with provided function, designator, type and id.
PolicyApply(java.lang.String applyFunctionStr, int attrDesignator, java.net.URI designatorType, java.net.URI designatorId, com.sun.xacml.attr.AttributeValue value)
          Constructs Apply XACML object with provided function, designator, type and id.
 
Method Summary
 void addAlApply(PolicyApply pa)
          Adds Apply objects
 void addToApplyArgs(com.sun.xacml.attr.AttributeValue pa)
          Adds Attribute direct to apply arguments list.
 java.util.ArrayList<PolicyApply> getAlApply()
          Gets ArrayList of Apply objects.
 java.util.List getApply()
          Returns Apply of the Condition block.
 com.sun.xacml.cond.Function getApplyFunction()
          Gets Apply function.
 com.sun.xacml.attr.AttributeValue getAttribute()
           
 com.sun.xacml.attr.AttributeDesignator getAttributeDesignator()
           
 java.lang.String getFunctionId()
           
 void parse(eu.xtreemos.xosd.factory.utils.parsers.XMLSearchEngine xse, java.util.Hashtable<java.lang.String,java.lang.Object> inData)
          Parses Apply part of the XACML policy file.
 void setApplyFunction(java.lang.String applyFunction)
           
 void setAttribute(com.sun.xacml.attr.AttributeValue attribute)
           
 void setAttributeDesignator(com.sun.xacml.attr.AttributeDesignator attributeDesignator)
           
 void setFunctionId(java.lang.String functionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alApply

private java.util.ArrayList<PolicyApply> alApply

functionId

private java.lang.String functionId

attribute

private com.sun.xacml.attr.AttributeValue attribute

attributeDesignator

private com.sun.xacml.attr.AttributeDesignator attributeDesignator

applyArgs

private java.util.List applyArgs

factory

com.sun.xacml.cond.FunctionFactory factory

applyFunction

public com.sun.xacml.cond.Function applyFunction
Constructor Detail

PolicyApply

public PolicyApply()

PolicyApply

public PolicyApply(PolicyApply e,
                   com.sun.xacml.attr.AttributeValue value)
Constructs just attributeValue label with no apply function

Parameters:
e -
value -

PolicyApply

public PolicyApply(java.lang.String applyFunctionStr,
                   int attrDesignator,
                   java.net.URI designatorType,
                   java.net.URI designatorId)
            throws java.lang.Exception
Constructs Apply XACML object with provided function, designator, type and id. This Apply object Applies with other Apply objects

Parameters:
applyFunctionStr - Which function to use
attrDesignator - To which attribute this function will apply to
designatorType - DataType of the designator
designatorId - Id of the attribute designator.
Throws:
java.lang.Exception

PolicyApply

public PolicyApply(java.lang.String applyFunctionStr)
            throws java.lang.Exception
Constructs Apply XACML object with provided function, designator, type and id. This Apply object Applies with other Apply objects

Parameters:
applyFunctionStr - Which function to use
attrDesignator - To which attribute this function will apply to
designatorType - DataType of the designator
designatorId - Id of the attribute designator.
Throws:
java.lang.Exception

PolicyApply

public PolicyApply(java.lang.String applyFunctionStr,
                   int attrDesignator,
                   java.net.URI designatorType,
                   java.net.URI designatorId,
                   com.sun.xacml.attr.AttributeValue value)
            throws java.lang.Exception
Constructs Apply XACML object with provided function, designator, type and id. This Apply object Applies implicitly creates AttributeValue to apply with.

Parameters:
applyFunctionStr -
attrDesignator -
designatorType -
designatorId -
value -
Throws:
java.lang.Exception

PolicyApply

public PolicyApply(java.lang.String applyFunctionStr,
                   int attrDesignator,
                   java.net.URI designatorType,
                   com.sun.xacml.attr.AttributeValue value,
                   java.net.URI designatorId)
            throws java.lang.Exception
Constructs Apply XACML object with provided function, designator, type and id. This Apply object Applies implicitly creates AttributeValue to apply with. Difference between this constructor and the one with last two attributes exchanged is that value attribute is within apply label rather than outside it.

Parameters:
applyFunctionStr -
attrDesignator -
designatorType -
value -
designatorId -
Throws:
java.lang.Exception
Method Detail

getAlApply

public java.util.ArrayList<PolicyApply> getAlApply()
Gets ArrayList of Apply objects.

Returns:

getApply

public java.util.List getApply()
Returns Apply of the Condition block. Go through all Apply objects, call getApply and add XACML Apply objects to arraylist applyArgs.

Returns:
XACML Apply object

addAlApply

public void addAlApply(PolicyApply pa)
Adds Apply objects

Parameters:
alApply -

addToApplyArgs

public void addToApplyArgs(com.sun.xacml.attr.AttributeValue pa)
Adds Attribute direct to apply arguments list. This is to be changed!

Parameters:
alApply -

getFunctionId

public java.lang.String getFunctionId()

setFunctionId

public void setFunctionId(java.lang.String functionId)

getAttribute

public com.sun.xacml.attr.AttributeValue getAttribute()

setAttribute

public void setAttribute(com.sun.xacml.attr.AttributeValue attribute)

getAttributeDesignator

public com.sun.xacml.attr.AttributeDesignator getAttributeDesignator()

setAttributeDesignator

public void setAttributeDesignator(com.sun.xacml.attr.AttributeDesignator attributeDesignator)

parse

public void parse(eu.xtreemos.xosd.factory.utils.parsers.XMLSearchEngine xse,
                  java.util.Hashtable<java.lang.String,java.lang.Object> inData)
           throws java.lang.Exception
Parses Apply part of the XACML policy file.

Parameters:
xse -
inData -
Throws:
java.lang.Exception

getApplyFunction

public com.sun.xacml.cond.Function getApplyFunction()
Gets Apply function.

Returns:

setApplyFunction

public void setApplyFunction(java.lang.String applyFunction)