Module com.sun.xml.ws.policy
Enum NamespaceVersion
- All Implemented Interfaces:
Serializable
,Comparable<NamespaceVersion>
- Author:
- Marek Potociar
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionResolves XML token into a fully qualified name within given namespace version.Method returns default namespace prefix for given namespace version.static NamespaceVersion
Returns latest supported version of the policy namespacestatic XmlToken
resolveAsToken
(QName name) Resolves FQN into a policy XML token.static NamespaceVersion
resolveVersion
(String uri) Resolves URI represented as a String into an enumeration value.static NamespaceVersion
resolveVersion
(QName name) Resolves fully qualified name defined in the WS-Policy namespace into an enumeration value.toString()
static NamespaceVersion
Returns the enum constant of this type with the specified name.static NamespaceVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
v1_2
-
v1_5
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
resolveVersion
Resolves URI represented as a String into an enumeration value. If the URI doesn't represent any existing enumeration value, method returnsnull
.- Parameters:
uri
- WS-Policy namespace URI- Returns:
- Enumeration value that represents given URI or
null
if no enumeration value exists for given URI.
-
resolveVersion
Resolves fully qualified name defined in the WS-Policy namespace into an enumeration value. If the URI in the name doesn't represent any existing enumeration value, method returnsnull
- Parameters:
name
- fully qualified name defined in the WS-Policy namespace- Returns:
- Enumeration value that represents given namespace or
null
if no enumeration value exists for given namespace.
-
getLatestVersion
Returns latest supported version of the policy namespace- Returns:
- latest supported policy namespace version.
-
resolveAsToken
Resolves FQN into a policy XML token. The version of the token can be determined by invokingresolveVersion(QName)
.- Parameters:
name
- fully qualified name defined in the WS-Policy namespace- Returns:
- XML token enumeration that represents this fully qualified name.
If the token or the namespace is not resolved
XmlToken.UNKNOWN
value is returned.
-
getDefaultNamespacePrefix
Method returns default namespace prefix for given namespace version.- Returns:
- default namespace prefix for given namespace version
-
asQName
Resolves XML token into a fully qualified name within given namespace version.- Parameters:
token
- XML token enumeration value.- Returns:
- fully qualified name of the
token
within given namespace version. Method returnsnull
in case the token is not supported in given namespace version or in caseXmlToken.UNKNOWN
was used as an input parameter. - Throws:
IllegalArgumentException
-
toString
- Overrides:
toString
in classEnum<NamespaceVersion>
-