Package ndg :: Package xacml :: Package core :: Package functions :: Class AbstractFunction
[hide private]

Class AbstractFunction

source code

object --+
         |
        AbstractFunction
Known Subclasses:

Abstract Base class for all XACML matching functions

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
bool (derived type), NoneType for THIS implementation
evaluate(self, *inputs)
Evaluate the function from the given input arguments and context
source code

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

Class Variables [hide private]
NoneType (must be string in derived type) FUNCTION_NS = None
namespace for the given function
string V1_0_FUNCTION_NS = 'urn:oasis:names:tc:xacml:1.0:function:'
XACML 1.0 function namespace prefix
string V2_0_FUNCTION_NS = 'urn:oasis:names:tc:xacml:2.0:function:'
XACML 2.0 function namespace prefix
  __abstractmethods__ = frozenset(['evaluate'])
  _abc_cache = <_weakrefset.WeakSet object at 0x10123d410>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x10123d490>
  _abc_negative_cache_version = 10
  _abc_registry = <_weakrefset.WeakSet object at 0x10123d290>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

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

Raises:
  • TypeError - if FUNCTION_NS not set correctly
Overrides: object.__init__

evaluate(self, *inputs)

source code 

Evaluate the function from the given input arguments and context

Parameters:
  • inputs (tuple) - input arguments need to evaluate the function
Returns: bool (derived type), NoneType for THIS implementation
derived type should return True for match, False otherwise
Decorators:
  • @abstractmethod