Package ndg :: Package saml :: Package common :: Class SAMLVersion
[hide private]

Class SAMLVersion

source code


Version helper class

Instance Methods [hide private]
 
__init__(self, version)
Instantiate from a given input version
source code
dict
__getstate__(self)
Enable pickling
source code
 
__setstate__(self, attrDict)
Enable pickling
source code
string
__str__(self)
Returns: string representation of SAML version
source code
bool
__eq__(self, version)
Test for equality against an input version string, tuple or list
source code
bool
__ne__(self, version)
Test True for this instance version not equal to input version
source code
bool
__gt__(self, version)
Test True for this instance version greater than input version
source code
bool
__lt__(self, version)
Test True for this instance version less than input version
source code
bool
__ge__(self, version)
Test True for this instance version greater or equal to the input version
source code
bool
__le__(self, version)
Test True for this instance version less than or equal to input version
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
tuple
valueOf(version)
Parse input string into version tuple
source code
Class Variables [hide private]
tuple VERSION_10 = (1, 0)
SAML Version 1.0 identifier
tuple VERSION_11 = (1, 1)
SAML Version 1.1 identifier
tuple VERSION_20 = (2, 0)
SAML Version 2.0 identifier
tuple KNOWN_VERSIONS = ((1, 0), (1, 1), (2, 0))
list of known SAML version identifiers
Instance Variables [hide private]
tuple __version
SAML version for the given class instance
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, version)
(Constructor)

source code 

Instantiate from a given input version

Parameters:
  • version (basestring or tuple or list) - SAML version to set
Raises:
  • TypeError - unexpected type for version input
Overrides: object.__init__

__getstate__(self)

source code 

Enable pickling

Returns: dict
object's attribute dictionary

__setstate__(self, attrDict)

source code 

Enable pickling

Parameters:
  • attrDict (dict) - object's attribute dictionary

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: string
string representation of SAML version
Overrides: object.__str__

__eq__(self, version)
(Equality operator)

source code 

Test for equality against an input version string, tuple or list

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if input and this object match
Raises:
  • TypeError - unexpected type for version input

__ne__(self, version)

source code 

Test True for this instance version not equal to input version

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if input and this object don't match
Raises:
  • TypeError - unexpected type for version input

__gt__(self, version)
(Greater-than operator)

source code 

Test True for this instance version greater than input version

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if this instance version greater than input version
Raises:
  • TypeError - unexpected type for version input

__lt__(self, version)
(Less-than operator)

source code 

Test True for this instance version less than input version

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if this instance version less than input version
Raises:
  • TypeError - unexpected type for version input

__ge__(self, version)
(Greater-than-or-equals operator)

source code 

Test True for this instance version greater or equal to the input version

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if this instance version greater than or equal to input version
Raises:
  • TypeError - unexpected type for version input

__le__(self, version)
(Less-than-or-equals operator)

source code 

Test True for this instance version less than or equal to input version

Parameters:
  • version (SAMLVersion, basestring, tuple or list) - SAML version to test
Returns: bool
True if this instance version less than or equal to input version
Raises:
  • TypeError - unexpected type for version input

valueOf(version)
Static Method

source code 

Parse input string into version tuple

Parameters:
  • version (basestring) - SAML version
Returns: tuple
SAML version tuple