Class EPPKeyRelayCreateCmd

All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPKeyRelayCreateCmd extends EPPCreateCmd
Represents an EPP Key Relay <create> command, which provides a transform operation that allows a client to create a key relay message. The <keyrelay:create> element MUST contain the following child elements:
  • A <keyrelay:name> element that contains containing the domain name for which the DNSSEC key material is relayed.
  • A <keyrelay:authInfo> element that contains authorization information to insert the key relay message.
  • One or more REQUIRED <keyrelay:keyRelayData> elements containing data to be relayed.
See Also:
  • Field Details

  • Constructor Details

    • EPPKeyRelayCreateCmd

      public EPPKeyRelayCreateCmd()
      Allocates a new EPPKeyRelayCreateCmd with default attribute values, which are all set to null.
    • EPPKeyRelayCreateCmd

      public EPPKeyRelayCreateCmd(String aTransId, String aName, EPPAuthInfo aAuthInfo)
      Allocates a new EPPKeyRelayCreateCmd with all of the required attributes without the key data that can be appended with appendKeyData(com.verisign.epp.codec.keyrelay.EPPKeyRelayData).
      Parameters:
      aTransId - Transaction Id associated with command.
      aName - Domain name for the key relay message
      aAuthInfo - EPPAuthInfo authorization information to authorize insertion of the key relay message
    • EPPKeyRelayCreateCmd

      public EPPKeyRelayCreateCmd(String aTransId, String aName, EPPAuthInfo aAuthInfo, List<EPPKeyRelayData> aKeyData)
      Allocates a new EPPKeyRelayCreateCmd with all of the required attributes.
      Parameters:
      aTransId - Transaction Id associated with command.
      aName - Domain name for the key relay message
      aAuthInfo - EPPAuthInfo authorization information to authorize insertion of the key relay messsage
      aKeyData - Key data to send
  • Method Details

    • getNamespace

      public String getNamespace()
      Get the EPP command Namespace associated with EPPKeyRelayCreateCmd.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Specified by:
      getNamespace in class EPPCommand
      Returns:
      EPPKeyRelayMapFactory.NS
    • getKey

      public String getKey()
      Gets the key for the keyrelay name object, which is the keyrelay name.
      Overrides:
      getKey in class EPPCommand
      Returns:
      The keyrelay name if set; null otherwise.
    • getName

      public String getName()
      Get the domain name for the key relay message.
      Returns:
      Domain Name
    • setName

      public void setName(String aName)
      Set the domain name for the key relay message.
      Parameters:
      aName - Domain name for the key relay message
    • hasKeyData

      public boolean hasKeyData()
      Is there key data contained in EPPKeyRelayCreateCmd?
      Returns:
      true if list of EPPKeyRelayData is not null and not empty; false otherwise.
    • getKeyData

      public List<EPPKeyRelayData> getKeyData()
      Gets the key data.
      Returns:
      List of keyData EPPKeyRelayData instances if defined; null otherwise.
    • setKeyData

      public void setKeyData(List<EPPKeyRelayData> aKeyData)
      Sets the List of key data EPPKeyRelayData instances to send
      Parameters:
      aKeyData - List of EPPKeyRelayData instances
    • appendKeyData

      public void appendKeyData(EPPKeyRelayData aKeyData)
      Appends to the List of key data EPPKeyRelayData instances to send.
      Parameters:
      aKeyData - EPPKeyRelayData instance
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPKeyRelayCreateCmd with this instance.
      Overrides:
      equals in class EPPCreateCmd
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPKeyRelayCreateCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPKeyRelayCreateCmd
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class EPPCommand
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getAuthInfo

      public EPPAuthInfo getAuthInfo()
      Get authorization information to insert the key relay message.
      Returns:
      Authorization information for the key relay message
    • setAuthInfo

      public void setAuthInfo(EPPAuthInfo aAuthInfo)
      Set authorization information for the key relay message
      Parameters:
      aAuthInfo - Authorization information to authorize the insertion of the key relay message
    • doEncode

      protected Element doEncode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPKeyRelayCreateCmd instance.
      Specified by:
      doEncode in class EPPCreateCmd
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Root DOM Element representing the EPPKeyRelayCreateCmd instance.
      Throws:
      EPPEncodeException - Unable to encode EPPKeyRelayCreateCmd instance.
    • doDecode

      protected void doDecode(Element aElement) throws EPPDecodeException
      Decode the EPPKeyRelayCreateCmd attributes from the aElement DOM Element tree.
      Specified by:
      doDecode in class EPPCreateCmd
      Parameters:
      aElement - Root DOM Element to decode EPPKeyRelayCreateCmd from.
      Throws:
      EPPDecodeException - Unable to decode aElement