Ignore:
Timestamp:
25/06/10 16:12:02 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 2: XACML-Security Integration

  • updating epydoc ready for release.
Location:
TI12-security/trunk/ndg_xacml/ndg/xacml/core
Files:
5 edited

Legend:

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

    r7087 r7100  
    1515 
    1616class Action(TargetChildBase): 
     17    """XACML Action Target Policy element 
     18     
     19    @cvar MATCH_TYPE: Sets the type for match attributes in this  
     20    TargetChildBase derived class 
     21    implementation e.g. ResourceMatch, SubjectMatch etc. 
     22    @type MATCH_TYPE: ndg.xacml.core.match.ActionMatch 
     23    @cvar ELEMENT_LOCAL_NAME: XML element local name 
     24    @type ELEMENT_LOCAL_NAME: string 
     25    """ 
    1726    MATCH_TYPE = ActionMatch 
    1827    ELEMENT_LOCAL_NAME = 'Action' 
     
    2231    @property 
    2332    def actionMatches(self): 
     33        """Convenience wrapper to base class method 
     34        @return: list of matches 
     35        @rtype: ndg.xacml.utils.TypedList  
     36        """ 
    2437        return self.matches 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/apply.py

    r7087 r7100  
    1818 
    1919class Apply(Expression): 
    20     """XACML Apply type""" 
     20    """XACML Apply type 
     21     
     22    @cvar ELEMENT_LOCAL_NAME: XML element local name 
     23    @type ELEMENT_LOCAL_NAME: string 
     24    @cvar FUNCTION_ID_ATTRIB_NAME: function ID XML attribute name 
     25    @type FUNCTION_ID_ATTRIB_NAME: string 
     26 
     27    @ivar __functionId: URN corresponding to function to be applied 
     28    @type __functionId: basestring/NoneType 
     29    @ivar __function: function to be applied 
     30    @type __function: ndg.xacml.core.functions.AbstractFunction derived type 
     31    @ivar __functionMap: function mapping object to map URNs to function class 
     32    implementations 
     33    @type __functionMap: ndg.xacml.core.functions.FunctionMap 
     34    @ivar __loadFunctionFromId: boolean determines whether or not to load 
     35    function classes for given function URN in functionId set property method 
     36    @type __loadFunctionFromId: bool 
     37    @ivar __expressions: list of expressions contained in the Apply statement 
     38    @type __expressions: ndg.xacml.utils.TypedList 
     39    """ 
    2140    ELEMENT_LOCAL_NAME = 'Apply' 
    2241    FUNCTION_ID_ATTRIB_NAME = 'FunctionId' 
     
    3150     
    3251    def __init__(self): 
     52        """Initialise attributes""" 
    3353        super(Apply, self).__init__() 
    3454        self.__functionId = None 
     
    4161    def loadFunctionFromId(self): 
    4262        """Set to False to stop the functionId property set method automatically 
    43         trying to load the corresponding function for the given functionId"""  
     63        trying to load the corresponding function for the given functionId 
     64         
     65        @return: flag setting 
     66        @rtype: bool"""  
    4467        return self.__loadFunctionFromId 
    4568     
    4669    @loadFunctionFromId.setter 
    4770    def loadFunctionFromId(self, value): 
     71        """Set to False to stop the functionId property set method automatically 
     72        trying to load the corresponding function for the given functionId 
     73         
     74        @param value: flag setting 
     75        @type value: bool 
     76        @raise TypeError: incorrect input type 
     77        """  
    4878        if not isinstance(value, bool): 
    4979            raise TypeError('Expecting %r type for "loadFunctionFromId" ' 
     
    5383         
    5484    def _get_functionId(self): 
     85        """Get function ID 
     86        @return: function ID for this Apply statement 
     87        @rtype: basestring/NoneType 
     88        """ 
    5589        return self.__functionId 
    5690 
    5791    def _set_functionId(self, value): 
     92        """Set function ID 
     93        @param value: function URN 
     94        @type value: basestring 
     95        @raise TypeError: incorrect input type 
     96        """  
    5897        if not isinstance(value, basestring): 
    5998            raise TypeError('Expecting %r type for "functionId" ' 
     
    76115         
    77116        loadFunctionFromId = False 
     117     
     118        @param functionMap: function mapping object to map URNs to function  
     119        class implementations 
     120        @type functionMap: ndg.xacml.core.functions.FunctionMap 
    78121         
    79122        @raise UnsupportedStdFunctionError: policy references a function type  
     
    102145    def functionMap(self): 
    103146        """functionMap object for PDP to retrieve functions from given XACML 
    104         function URNs""" 
     147        function URNs 
     148        @return: function mapping object 
     149        @rtype: ndg.xacml.core.functions.FunctionMap 
     150        """ 
    105151        return self.__functionMap 
    106152     
     
    108154    def functionMap(self, value): 
    109155        '''functionMap object for PDP to retrieve functions from given XACML 
    110         function URNs''' 
     156        function URNs 
     157        @ivar value: function mapping object to map URNs to function  
     158        class implementations 
     159        @type value: ndg.xacml.core.functions.FunctionMap 
     160        @raise TypeError: incorrect type for input value 
     161        ''' 
    111162        if not isinstance(value, FunctionMap): 
    112163            raise TypeError('Expecting %r derived type for "functionMap" ' 
     
    117168    @property   
    118169    def function(self): 
    119         "Function for this <Apply> instance" 
     170        """Get Function for this <Apply> instance 
     171        @return: function to be applied 
     172        @rtype: ndg.xacml.core.functions.AbstractFunction derived type 
     173        """ 
    120174        return self.__function 
    121175         
    122176    @property 
    123177    def expressions(self): 
    124         """List of expression sub-elements""" 
     178        """List of expression sub-elements 
     179        @return: list of expressions contained in the Apply statement 
     180        @rtype: ndg.xacml.utils.TypedList 
     181        """ 
    125182        return self.__expressions  
    126183     
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/environment.py

    r7087 r7100  
    1515 
    1616class Environment(TargetChildBase): 
     17    """XACML Environment Target Policy element 
     18     
     19    @cvar MATCH_TYPE: Sets the type for match attributes in this  
     20    TargetChildBase derived class 
     21    @type MATCH_TYPE: ndg.xacml.core.match.EnvironmentMatch 
     22    @cvar ELEMENT_LOCAL_NAME: XML element local name 
     23    @type ELEMENT_LOCAL_NAME: string 
     24    """ 
    1725    MATCH_TYPE = EnvironmentMatch 
    1826    ELEMENT_LOCAL_NAME = 'Environment' 
     
    2230    @property 
    2331    def environmentMatches(self): 
     32        """Convenience wrapper to base class method 
     33        @return: list of matches 
     34        @rtype: ndg.xacml.utils.TypedList  
     35        """ 
    2436        return self.matches 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/resource.py

    r7087 r7100  
    1515 
    1616class Resource(TargetChildBase): 
     17    """XACML Resource Target Policy element 
     18     
     19    @cvar MATCH_TYPE: Sets the type for match attributes in this  
     20    TargetChildBase derived class 
     21    @type MATCH_TYPE: ndg.xacml.core.match.ResourceMatch 
     22    @cvar ELEMENT_LOCAL_NAME: XML element local name 
     23    @type ELEMENT_LOCAL_NAME: string 
     24    """ 
    1725    MATCH_TYPE = ResourceMatch 
    1826    ELEMENT_LOCAL_NAME = 'Resource' 
     
    2230    @property 
    2331    def resourceMatches(self): 
     32        """Convenience wrapper to base class method 
     33        @return: list of matches 
     34        @rtype: ndg.xacml.utils.TypedList  
     35        """ 
    2436        return self.matches 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/subject.py

    r7087 r7100  
    1414 
    1515class Subject(TargetChildBase): 
     16    """XACML Subject Target Policy element 
     17     
     18    @cvar MATCH_TYPE: Sets the type for match attributes in this  
     19    TargetChildBase derived class 
     20    @type MATCH_TYPE: ndg.xacml.core.match.SubjectMatch 
     21    @cvar ELEMENT_LOCAL_NAME: XML element local name 
     22    @type ELEMENT_LOCAL_NAME: string 
     23    """ 
    1624    MATCH_TYPE = SubjectMatch 
    1725    ELEMENT_LOCAL_NAME = 'Subject' 
     
    2129    @property 
    2230    def subjectMatches(self): 
     31        """Convenience wrapper to base class method 
     32        @return: list of matches 
     33        @rtype: ndg.xacml.utils.TypedList  
     34        """ 
    2335        return self.matches 
Note: See TracChangeset for help on using the changeset viewer.