Package ndg :: Package xacml :: Package core :: Module rule :: Class Effect
[hide private]

Class Effect

source code

object --+
         |
        Effect
Known Subclasses:

Rule Effect

Instance Methods [hide private]
 
__init__(self, effect='Deny')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
dict
__getstate__(self)
Enable pickling
source code
 
__setstate__(self, attrDict)
Enable pickling
source code
 
_setValue(self, value)
Set effect value
source code
string
_getValue(self)
Get effect value
source code
string
__str__(self)
represent decision as a string
source code
bool
__eq__(self, effect)
Returns: True if the decision values match, False otherwise
source code
bool
__nonzero__(self)
Boolean evaluation of a rule effect - True = Allow; False = Deny
source code

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

Class Variables [hide private]
string DENY_STR = 'Deny'
deny decision string
string PERMIT_STR = 'Permit'
permit decision string
tuple TYPES = ('Deny', 'Permit')
list of valid effect strings
  PERMIT = PermitEffect()
  DENY = DenyEffect()
Instance Variables [hide private]
string value
effect value
Properties [hide private]
  __value

Inherited from object: __class__

Method Details [hide private]

__init__(self, effect='Deny')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • effect (basestring / ndg.xacml.core.rule.Effect) - initialise effect value, defaults to deny
Overrides: object.__init__

__getstate__(self)

source code 

Enable pickling

Returns: dict
class instance attributes dictionary

__setstate__(self, attrDict)

source code 

Enable pickling

Parameters:
  • attrDict (dict) - class instance attributes dictionary

_setValue(self, value)

source code 

Set effect value

Parameters:
  • value (string or ndg.xacml.core.rule.Effect) - effect value - constrained vocabulary to Effect.TYPES
Raises:
  • AttributeError - invalid decision string value input
  • TypeError - invalid type for input decision value

_getValue(self)

source code 

Get effect value

Returns: string
effect value

__str__(self)
(Informal representation operator)

source code 

represent decision as a string

Returns: string
decision value
Overrides: object.__str__

__eq__(self, effect)
(Equality operator)

source code 
Parameters:
  • effect (string or ndg.xacml.core.rule.Effect) - effect value to compare with self's
Returns: bool
True if the decision values match, False otherwise
Raises:
  • AttributeError - invalid decision string value input
  • TypeError - invalid type for input decision value

__nonzero__(self)
(Boolean test operator)

source code 

Boolean evaluation of a rule effect - True = Allow; False = Deny

Returns: bool
True if the effect value is permit, False otherwise

Instance Variable Details [hide private]

value

effect value
Get Method:
_getValue(self) - Get effect value
Set Method:
_setValue(self, value) - Set effect value