Package ndg :: Package xacml :: Package core :: Module condition :: Class Condition
[hide private]

Class Condition

source code

   object --+    
            |    
XacmlCoreBase --+
                |
               Condition

XACML 2.0 Rule Condition Note the difference to XACML 1.0: the Condition element is its own type and not an Apply type. It expects a single Expression derived type child element

Instance Methods [hide private]
 
__init__(self)
Element local name check makes this a virtual method
source code
bool
evaluate(self, context)
Evaluate this rule condition
source code

Inherited from XacmlCoreBase: __getstate__

Inherited from XacmlCoreBase (private): _getXmlns, _setXmlns

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
NoneType but implement as string in derived classes ELEMENT_LOCAL_NAME = 'Condition'
XML element local name for the given type
string APPLY_ELEMENT_LOCAL_NAME = 'Apply'
XML local name for the apply element

Inherited from XacmlCoreBase: XACML_1_0_NS_PREFIX, XACML_2_0_NS_PREFIX, XMLNS

Instance Variables [hide private]
ndg.xacml.core.expression.Expression __expression
expression in this condition
Properties [hide private]
ndg.xacml.core.expression.Expression / NoneType expression
Get expression

Inherited from XacmlCoreBase: elem, isValidXmlns, xmlns

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Element local name check makes this a virtual method

Raises:
  • NotImplementedError - derived classes must set ELEMENT_LOCAL_NAME to a string
Overrides: object.__init__
(inherited documentation)

evaluate(self, context)

source code 

Evaluate this rule condition

Parameters:
  • context (ndg.xacml.core.request.Request) - the request context
Returns: bool
True/False status for whether the rule condition matched or not

Property Details [hide private]

expression

Get expression

Get Method:
unreachable.expression(self) - Get expression
Set Method:
unreachable.expression(self, value) - Set expression
Type:
ndg.xacml.core.expression.Expression / NoneType