Package org.opensaml.saml.common
Class SAMLVersion
java.lang.Object
org.opensaml.saml.common.SAMLVersion
A type safe SAML version enumeration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Major version number.private final int
Minor version number.static final SAMLVersion
SAML version 1.0.static final SAMLVersion
SAML Version 1.1.static final SAMLVersion
SAML Version 2.0.private final String
String representation of the version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the major version of the SAML version.int
Gets the minor version of the SAML version.toString()
static final SAMLVersion
valueOf
(int majorVersion, int minorVersion) Gets the SAMLVersion given the major and minor version number.static final SAMLVersion
Gets the SAMLVersion for a given version string, such as "2.0".
-
Field Details
-
VERSION_10
SAML version 1.0. -
VERSION_11
SAML Version 1.1. -
VERSION_20
SAML Version 2.0. -
majorVersion
private final int majorVersionMajor version number. -
minorVersion
private final int minorVersionMinor version number. -
versionString
String representation of the version.
-
-
Constructor Details
-
SAMLVersion
private SAMLVersion(int major, int minor) Constructor.- Parameters:
major
- SAML major version numberminor
- SAML minor version number
-
-
Method Details
-
valueOf
Gets the SAMLVersion given the major and minor version number.- Parameters:
majorVersion
- major version numberminorVersion
- minor version number- Returns:
- the SAMLVersion
-
valueOf
Gets the SAMLVersion for a given version string, such as "2.0".- Parameters:
version
- SAML version string- Returns:
- SAMLVersion for the given string
-
getMajorVersion
public int getMajorVersion()Gets the major version of the SAML version.- Returns:
- the major version of the SAML version
-
getMinorVersion
public int getMinorVersion()Gets the minor version of the SAML version.- Returns:
- the minor version of the SAML version
-
toString
-