1 """NDG XACML module for Response type
2
3 NERC DataGrid
4 """
5 __author__ = "P J Kershaw"
6 __date__ = "23/03/10"
7 __copyright__ = "(C) 2010 Science and Technology Facilities Council"
8 __contact__ = "Philip.Kershaw@stfc.ac.uk"
9 __license__ = "BSD - see LICENSE file in top-level directory"
10 __contact__ = "Philip.Kershaw@stfc.ac.uk"
11 __revision__ = "$Id: response.py 8010 2012-01-30 16:24:06Z rwilkinson $"
12 import logging
13 log = logging.getLogger(__name__)
14
15 from ndg.xacml.utils import TypedList
16 from ndg.xacml.core.context import XacmlContextBase
17 from ndg.xacml.core.context.result import Result
21 """XACML Response type
22 @cvar ELEMENT_LOCAL_NAME: XML local element name for the response
23 @type ELEMENT_LOCAL_NAME: string
24
25 @ivar __results: resource content
26 @type __results: ndg.xacml.utils.TypedList
27 """
28 ELEMENT_LOCAL_NAME = 'Response'
29
30 __slots__ = ('__results', )
31
36
37 @property
39 """Get Response results list
40
41 @return: results list
42 @rtype: ndg.xacml.utils.TypedList
43 """
44 return self.__results
45
47 '''Enable pickling
48
49 @return: object's attribute dictionary
50 @rtype: dict
51 '''
52 _dict = super(Response, self).__getstate__()
53 for attrName in Response.__slots__:
54
55
56 if attrName.startswith('__'):
57 attrName = "_Response" + attrName
58
59 _dict[attrName] = getattr(self, attrName)
60
61 return _dict
62