public class EPPGreeting extends java.lang.Object implements EPPMessage
getServer
and setServer
to get and set the element.
getServerDate
and setServerData
to get
and set the element.getServiceMenu
and setServiceMenu
to
get and set the element.EPPFactory
,
Serialized FormModifier and Type | Field and Description |
---|---|
static short |
MAX_SERVER_LEN
Maximum length of the server attribute.
|
static short |
MIN_SERVER_LEN
Minimum length of the server attribute.
|
Constructor and Description |
---|
EPPGreeting()
Allocates a new
EPPGreeting with default attribute values. |
EPPGreeting(java.lang.String aServer,
java.util.Date aServerDate,
EPPServiceMenu aServiceMenu)
Allocates a new
EPPGreeting and sets all of the instance
attributes with the arguments. |
EPPGreeting(java.lang.String aServer,
java.util.Date aServerDate,
EPPServiceMenu aServiceMenu,
EPPDcp aDcp)
Allocates a new
EPPGreeting and sets the name and service
menu instance attributes with the arguments. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone
EPPGreeting . |
void |
decode(org.w3c.dom.Element aElement)
decode
EPPGreeting from a DOM element tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
encode
EPPGreeting into a DOM element tree. |
boolean |
equals(java.lang.Object aObject)
implements a deep
EPPGreeting compare. |
EPPDcp |
getDcp()
Gets the DataCollection policy associated with the server
|
java.lang.String |
getNamespace()
Gets the associated EPP namespace.
|
java.lang.String |
getServer()
Gets the name of the server.
|
java.util.Date |
getServerDate()
Gets the server current date and time.
|
EPPServiceMenu |
getServiceMenu()
Gets the service menu associated with the greeting, which defines the
features supported by the server.
|
boolean |
hasExtensionService(java.lang.String aNamespaceURI)
Does the greeting extension services include a specified extension service
based on the Namespace URI?
|
boolean |
hasService(java.lang.String aNamespaceURI)
Does the greeting include a specified service based on the Namespace URI?
|
void |
setDcp(EPPDcp aDcp)
Sets the DataCollectionPolciy associated with the greeting, which defines
the access and statement supported by the server.
|
void |
setServer(java.lang.String aServer)
Sets the name of the server.
|
void |
setServerDate(java.util.Date aServerDate)
Sets the server current date and time.
|
void |
setServiceMenu(EPPServiceMenu aServiceMenu)
Sets the service menu associated with the greeting, which defines the
features supported by the server.
|
java.lang.String |
toString()
Implementation of
Object.toString , which will result in an
indented XML String representation of the concrete
EPPCodecComponent . |
public static final short MIN_SERVER_LEN
public static final short MAX_SERVER_LEN
public EPPGreeting()
EPPGreeting
with default attribute values.
The defaults include the following: null
EPPServiceMenu
constructorsetServer
needs to be called before encode
when
using this constructor.public EPPGreeting(java.lang.String aServer, java.util.Date aServerDate, EPPServiceMenu aServiceMenu, EPPDcp aDcp)
EPPGreeting
and sets the name and service
menu instance attributes with the arguments. The server date is defaulted
to now.aServer
- name of the serveraServerDate
- current server date and timeaServiceMenu
- service menu instance associated with the greetingaDcp
- Dcp instance associated with the greetingpublic EPPGreeting(java.lang.String aServer, java.util.Date aServerDate, EPPServiceMenu aServiceMenu)
EPPGreeting
and sets all of the instance
attributes with the arguments.aServer
- name of the serveraServerDate
- current server date and timeaServiceMenu
- service menu instance associated with the greetingpublic java.lang.String getNamespace()
EPPCodec.NS
.getNamespace
in interface EPPCodecComponent
getNamespace
in interface EPPMessage
public java.lang.String getServer()
MIN_SERVER_LEN
and <= MAX_SERVER_LEN
.String
instance if defined; null otherwise.public void setServer(java.lang.String aServer)
MIN_SERVER_LEN
and <= MAX_SERVER_LEN
.aServer
- unique server name.public java.util.Date getServerDate()
public void setServerDate(java.util.Date aServerDate)
aServerDate
- Current server data and time.public EPPServiceMenu getServiceMenu()
public boolean hasService(java.lang.String aNamespaceURI)
aNamespaceURI
- Service Namespace URI to search fortrue
if the greeting includes the service Namespace
URI; false
otherwise.public boolean hasExtensionService(java.lang.String aNamespaceURI)
aNamespaceURI
- Extension service Namespace URI to search fortrue
if the greeting extension services include the
extension service Namespace URI; false
otherwise.public void setServiceMenu(EPPServiceMenu aServiceMenu)
aServiceMenu
- service menu instance to associate with the greeting.public void setDcp(EPPDcp aDcp)
aDcp
- service menu instance to associate with the greeting.public EPPDcp getDcp()
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
EPPGreeting
into a DOM element tree. The
<greeting> element is created and the attribute nodes are appended as
children.encode
in interface EPPCodecComponent
aDocument
- DOM Document to create elements fromEPPEncodeException
- Error encoding the DOM element tree.public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
EPPGreeting
from a DOM element tree. The "greeting"
element needs to be the value of the aElement
argument.decode
in interface EPPCodecComponent
aElement
- <greeting> root element tree.EPPDecodeException
- Error decoding the DOM element tree.public boolean equals(java.lang.Object aObject)
EPPGreeting
compare.equals
in class java.lang.Object
aObject
- EPPGreeting
instance to compare withtrue
if equal; false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPGreeting
.clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPGreeting
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic java.lang.String toString()
Object.toString
, which will result in an
indented XML String
representation of the concrete
EPPCodecComponent
.toString
in class java.lang.Object
String
if successful; ERROR
otherwise.