Class EppInput.VersionAdapter

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,String>
google.registry.model.eppinput.EppInput.VersionAdapter
Enclosing class:
EppInput

public static class EppInput.VersionAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,String>
RFC 5730 says we should check the version and return special error code 2100 if it isn't what we support, but it also specifies a schema that only allows 1.0 in the version field, so any other version doesn't validate. As a result, if we didn't do this here it would throw a SyntaxErrorException when it failed to validate.
See Also:
  • Constructor Details

    • VersionAdapter

      public VersionAdapter()
  • Method Details

    • unmarshal

      public String unmarshal(String version) throws Exception
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,String>
      Throws:
      Exception
    • marshal

      public String marshal(String ignored)
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,String>