Enum NamespaceVersion

java.lang.Object
java.lang.Enum<NamespaceVersion>
com.sun.xml.ws.policy.sourcemodel.wspolicy.NamespaceVersion
All Implemented Interfaces:
Serializable, Comparable<NamespaceVersion>

public enum NamespaceVersion extends Enum<NamespaceVersion>
Author:
Marek Potociar
  • Enum Constant Details

  • Method Details

    • values

      public static NamespaceVersion[] 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

      public static NamespaceVersion valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • resolveVersion

      public static NamespaceVersion resolveVersion(String uri)
      Resolves URI represented as a String into an enumeration value. If the URI doesn't represent any existing enumeration value, method returns null.
      Parameters:
      uri - WS-Policy namespace URI
      Returns:
      Enumeration value that represents given URI or null if no enumeration value exists for given URI.
    • resolveVersion

      public static NamespaceVersion resolveVersion(QName name)
      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 returns null
      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

      public static NamespaceVersion getLatestVersion()
      Returns latest supported version of the policy namespace
      Returns:
      latest supported policy namespace version.
    • resolveAsToken

      public static XmlToken resolveAsToken(QName name)
      Resolves FQN into a policy XML token. The version of the token can be determined by invoking resolveVersion(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

      public String getDefaultNamespacePrefix()
      Method returns default namespace prefix for given namespace version.
      Returns:
      default namespace prefix for given namespace version
    • asQName

      public QName asQName(XmlToken token) throws IllegalArgumentException
      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 returns null in case the token is not supported in given namespace version or in case XmlToken.UNKNOWN was used as an input parameter.
      Throws:
      IllegalArgumentException
    • toString

      public String toString()
      Overrides:
      toString in class Enum<NamespaceVersion>