Changeset 7100 for TI12-security/trunk/ndg_xacml
- Timestamp:
- 25/06/10 16:12:02 (11 years ago)
- 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 15 15 16 16 class 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 """ 17 26 MATCH_TYPE = ActionMatch 18 27 ELEMENT_LOCAL_NAME = 'Action' … … 22 31 @property 23 32 def actionMatches(self): 33 """Convenience wrapper to base class method 34 @return: list of matches 35 @rtype: ndg.xacml.utils.TypedList 36 """ 24 37 return self.matches -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/apply.py
r7087 r7100 18 18 19 19 class 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 """ 21 40 ELEMENT_LOCAL_NAME = 'Apply' 22 41 FUNCTION_ID_ATTRIB_NAME = 'FunctionId' … … 31 50 32 51 def __init__(self): 52 """Initialise attributes""" 33 53 super(Apply, self).__init__() 34 54 self.__functionId = None … … 41 61 def loadFunctionFromId(self): 42 62 """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""" 44 67 return self.__loadFunctionFromId 45 68 46 69 @loadFunctionFromId.setter 47 70 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 """ 48 78 if not isinstance(value, bool): 49 79 raise TypeError('Expecting %r type for "loadFunctionFromId" ' … … 53 83 54 84 def _get_functionId(self): 85 """Get function ID 86 @return: function ID for this Apply statement 87 @rtype: basestring/NoneType 88 """ 55 89 return self.__functionId 56 90 57 91 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 """ 58 97 if not isinstance(value, basestring): 59 98 raise TypeError('Expecting %r type for "functionId" ' … … 76 115 77 116 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 78 121 79 122 @raise UnsupportedStdFunctionError: policy references a function type … … 102 145 def functionMap(self): 103 146 """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 """ 105 151 return self.__functionMap 106 152 … … 108 154 def functionMap(self, value): 109 155 '''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 ''' 111 162 if not isinstance(value, FunctionMap): 112 163 raise TypeError('Expecting %r derived type for "functionMap" ' … … 117 168 @property 118 169 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 """ 120 174 return self.__function 121 175 122 176 @property 123 177 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 """ 125 182 return self.__expressions 126 183 -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/environment.py
r7087 r7100 15 15 16 16 class 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 """ 17 25 MATCH_TYPE = EnvironmentMatch 18 26 ELEMENT_LOCAL_NAME = 'Environment' … … 22 30 @property 23 31 def environmentMatches(self): 32 """Convenience wrapper to base class method 33 @return: list of matches 34 @rtype: ndg.xacml.utils.TypedList 35 """ 24 36 return self.matches -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/resource.py
r7087 r7100 15 15 16 16 class 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 """ 17 25 MATCH_TYPE = ResourceMatch 18 26 ELEMENT_LOCAL_NAME = 'Resource' … … 22 30 @property 23 31 def resourceMatches(self): 32 """Convenience wrapper to base class method 33 @return: list of matches 34 @rtype: ndg.xacml.utils.TypedList 35 """ 24 36 return self.matches -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/subject.py
r7087 r7100 14 14 15 15 class 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 """ 16 24 MATCH_TYPE = SubjectMatch 17 25 ELEMENT_LOCAL_NAME = 'Subject' … … 21 29 @property 22 30 def subjectMatches(self): 31 """Convenience wrapper to base class method 32 @return: list of matches 33 @rtype: ndg.xacml.utils.TypedList 34 """ 23 35 return self.matches
Note: See TracChangeset
for help on using the changeset viewer.