Class EPPAuthTokenCreateCmd

java.lang.Object
com.verisign.epp.codec.gen.EPPCommand
com.verisign.epp.codec.gen.EPPCreateCmd
com.verisign.epp.codec.authtoken.v01.EPPAuthTokenCreateCmd
All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPAuthTokenCreateCmd extends EPPCreateCmd
Represents an EPP Authentication Token <create> command, which provides a transform operation that allows a client to create an authentication token. The <authToken:create> element MUST contain the following child elements:
  • A <authToken:scope> element that scopes the authentication to a set of registry systems or domain names.
  • Authentication credentials that are either <authToken:credential> element or <authToken:bearerToken> information to create the authentication token.
See Also:
  • Field Details

  • Constructor Details

    • EPPAuthTokenCreateCmd

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

      public EPPAuthTokenCreateCmd(String aTransId, EPPAuthTokenCredential aCredential, String aBearerToken)
      Allocates a new EPPAuthTokenCreateCmd with all the required attributes. Only aCredential or aBearerToken is required.
      Parameters:
      aTransId - Transaction Id associated with command.
      aCredential - authorization information to authorize creation of the authentication token
      aBearerToken - bearer token to authorize creation of the authentication token
    • EPPAuthTokenCreateCmd

      public EPPAuthTokenCreateCmd(String aTransId, EPPAuthTokenCredential aCredential)
      Allocates a new EPPAuthTokenCreateCmd with all the required attributes. Only aCredential or aBearerToken is required.
      Parameters:
      aTransId - Transaction Id associated with command.
      aCredential - authorization information to authorize creation of the authentication token
    • EPPAuthTokenCreateCmd

      public EPPAuthTokenCreateCmd(String aTransId, String aBearerToken)
      Allocates a new EPPAuthTokenCreateCmd with all the required attributes. Only aCredential or aBearerToken is required.
      Parameters:
      aTransId - Transaction Id associated with command.
      aBearerToken - bearer token to authorize creation of the authentication token
    • EPPAuthTokenCreateCmd

      public EPPAuthTokenCreateCmd(String aTransId, List<EPPAuthTokenScope> aScope, EPPAuthTokenCredential aCredential, String aBearerToken)
      Allocates a new EPPAuthTokenCreateCmd with all the required attributes. Only aCredential or aBearerToken is required.
      Parameters:
      aTransId - Transaction Id associated with command.
      aScope - List of EPPAuthTokenScope elements
      aCredential - authorization information to authorize creation of the authentication token
      aBearerToken - bearer token to authorize creation of the authentication token
  • Method Details

    • getNamespace

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

      public String getBearerToken()
      Get the bearer token for the create command.
      Returns:
      bearer token
    • setBearerToken

      public void setBearerToken(String aBearerToken)
      Set the bearer token for the create command.
      Parameters:
      aBearerToken - bearer token for the create command
    • getCredential

      public EPPAuthTokenCredential getCredential()
      Get the credential for the create command.
      Returns:
      EPPAuthTokenCredential instance
    • setCredential

      public void setCredential(EPPAuthTokenCredential aCredential)
      Set the credential to create the auth token.
      Parameters:
      aCredential - credential to create the auth token
    • hasScope

      public boolean hasScope()
      Returns:
      returns true only when scope is not null or empty
    • getScope

      public List<EPPAuthTokenScope> getScope()
      Gets the scope data.
      Returns:
      List of scope EPPAuthTokenScope instances if defined; null otherwise.
    • setScope

      public void setScope(List<EPPAuthTokenScope> aScope)
      Sets the List of scope data EPPAuthTokenScope instances to send
      Parameters:
      aScope - List of EPPAuthTokenScope instances
    • appendScope

      public void appendScope(EPPAuthTokenScope aScope)
      Appends to the List of scope data EPPAuthTokenScope instances to send.
      Parameters:
      aScope - EPPAuthTokenScope instance
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPAuthTokenCreateCmd 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 EPPAuthTokenCreateCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPAuthTokenCreateCmd
      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.
    • doEncode

      protected Element doEncode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPAuthTokenCreateCmd 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 EPPAuthTokenCreateCmd instance.
      Throws:
      EPPEncodeException - Unable to encode EPPAuthTokenCreateCmd instance.
    • doDecode

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