source: TI12-security/trunk/NDG_XACML/ndg/xacml/core/policydefaults.py @ 6770

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDG_XACML/ndg/xacml/core/policydefaults.py@6797
Revision 6770, 1.2 KB checked in by pjkersha, 10 years ago (diff)

Added Context Handler and Attribute classes.

Line 
1"""NDG Security Policy Defaults type definition
2
3NERC DataGrid Project
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    ELEMENT_LOCAL_NAME = 'PolicyDefaults'
18    XPATH_VERSION_ELEMENT_NAME = 'XPathVersion'
19   
20    __slots__ = ('__xpathVersion', )
21   
22    def __init__(self):
23        super(PolicyDefaults, self).__init__()
24        self.__xpathVersion = None
25       
26    def _get_xpathVersion(self):
27        return self.__xpathVersion
28
29    def _set_xpathVersion(self, value):
30        if not isinstance(value, basestring):
31            raise TypeError('Expecting %r type for "xpathVersion" '
32                            'attribute; got %r' % (basestring, type(value)))
33           
34        self.__xpathVersion = value   
35
36    xpathVersion = property(_get_xpathVersion, _set_xpathVersion, None, 
37                            "PolicyDefaults type XPath version") 
38
39         
Note: See TracBrowser for help on using the repository browser.