Changeset 7099


Ignore:
Timestamp:
25/06/10 14:58:45 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 2: XACML-Security Integration

  • updating epydoc ready for release.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/__init__.py

    r7098 r7099  
    103103 
    104104class XacmlPolicyBase(XacmlCoreBase): 
    105     """Base class for policy types""" 
     105    """Base class for policy types 
     106     
     107    @cvar XACML_2_0_POLICY_NS: XACML 2.0 policy XML namespace 
     108    @type XACML_2_0_POLICY_NS: string 
     109    """ 
    106110    XACML_2_0_POLICY_NS = (XacmlCoreBase.XACML_2_0_NS_PREFIX + 
    107111                           ":policy:schema:os") 
     
    109113     
    110114    def __init__(self): 
     115        """Initialise parent class xmlns attribute based on this classes' 
     116        policy namespace 
     117        """ 
    111118        super(XacmlPolicyBase, self).__init__() 
    112119        self.xmlns = XacmlPolicyBase.XACML_2_0_POLICY_NS 
     
    114121         
    115122class TargetChildBase(XacmlPolicyBase): 
    116     """Base type for XACML Policy Subject, Resource, Action and Environment  
    117     types""" 
     123    """Abstract Base class for XACML Policy Subject, Resource, Action and  
     124    Environment types: e.g. ndg.xacml.core.subject.Subject 
     125     
     126    @cvar MATCH_TYPE: Set the type for match attributes in the derived class 
     127    implementation e.g. ResourceMatch, SubjectMatch etc. 
     128    @type MATCH_TYPE: NoneType - derived class must implement 
     129     
     130    @ivar __matches: list of matches for this target 
     131    @type __matches: ndg.xacml.core.utils.TypedList 
     132    """ 
    118133    MATCH_TYPE = None 
    119134     
     
    125140        # Derived types can specify the type for matches via the MATCH_TYPE 
    126141        # class variable 
     142        if self.__class__.MATCH_TYPE is None: 
     143            raise NotImplementedError('Match type attribute must be specified ' 
     144                                      'in a derived class') 
    127145        self.__matches = TypedList(self.__class__.MATCH_TYPE) 
    128146         
    129147    @property 
    130148    def matches(self): 
     149        """Get matches list for this target 
     150        @return: list of matches 
     151        @rtype: ndg.xacml.core.utils.TypedList 
     152        """ 
    131153        return self.__matches 
Note: See TracChangeset for help on using the changeset viewer.