source: TI12-security/trunk/ndg_xacml/ndg/xacml/core/policydefaults.py @ 7108

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/ndg_xacml/ndg/xacml/core/policydefaults.py@7668
Revision 7108, 1.8 KB checked in by pjkersha, 11 years ago (diff)

Incomplete - task 2: XACML-Security Integration

  • updating epydoc ready for release.
  • Property svn:keywords set to Id
Line 
1"""NDG Security Policy Defaults type definition
2
3NERC DataGrid
4"""
5__author__ = "P J Kershaw"
6__date__ = "19/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$"
12from ndg.xacml.core import XacmlCoreBase
13
14
15class PolicyDefaults(XacmlCoreBase):
16    """XACML PolicyDefaults type
17   
18    @cvar ELEMENT_LOCAL_NAME: XML local name for this element
19    @type ELEMENT_LOCAL_NAME: string
20    @cvar XPATH_VERSION_ELEMENT_NAME: XML local name for XPath version element
21    @type XPATH_VERSION_ELEMENT_NAME: string
22   
23    @ivar __xpathVersion: XPath version
24    @type __xpathVersion: basestring / NoneType
25    """
26    ELEMENT_LOCAL_NAME = 'PolicyDefaults'
27    XPATH_VERSION_ELEMENT_NAME = 'XPathVersion'
28   
29    __slots__ = ('__xpathVersion', )
30   
31    def __init__(self):
32        """Initialise attributes"""
33        super(PolicyDefaults, self).__init__()
34        self.__xpathVersion = None
35       
36    def _get_xpathVersion(self):
37        """@return: XPath version
38        @rtype: basestring / NoneType
39        """
40        return self.__xpathVersion
41
42    def _set_xpathVersion(self, value):
43        """@param value: XPath version
44        @type value: basestring / NoneType
45        @raise TypeError: incorrect input type
46        """
47        if not isinstance(value, basestring):
48            raise TypeError('Expecting %r type for "xpathVersion" '
49                            'attribute; got %r' % (basestring, type(value)))
50           
51        self.__xpathVersion = value   
52
53    xpathVersion = property(_get_xpathVersion, _set_xpathVersion, None, 
54                            "PolicyDefaults type XPath version") 
55
56         
Note: See TracBrowser for help on using the repository browser.