Package com.verisign.epp.codec.mark
Class EPPTreatyOrStatute
- java.lang.Object
-
- com.verisign.epp.codec.mark.EPPTreatyOrStatute
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPTreatyOrStatute extends java.lang.Object implements EPPCodecComponent
Class for a Treaty or Statute that can be included in the list of treaty or statutes contained in theEPPMark
.- See Also:
EPPMark
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
Constant for the treaty or statute local namestatic java.lang.String
ELM_NAME
Constant for the treaty or statute tag
-
Constructor Summary
Constructors Constructor Description EPPTreatyOrStatute()
Create anEPPTreatyOrStatute
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContact(EPPMarkContact aContact)
Adds a contact to the list of contacts of the treaty or statute.void
addHolder(EPPMarkContact aHolder)
Adds a holder to the list of holders of the treaty or statute.void
addLabel(java.lang.String aLabel)
Adds a domain name label to the domain name labels that corresponds to the treaty or statute.void
addProtection(EPPProtection aProtection)
Adds a protection to the list of protections of the treaty or statute.java.lang.Object
clone()
CloneEPPTreatyOrStatute
.void
decode(byte[] aMarkArray)
Decode theEPPTreatyOrStatute
attributes from the inputbyte[]
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPTreatyOrStatute
componentbyte[]
encode()
Encode the treaty or statute to abyte[]
.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Sets all this instance's data in the given XML documentboolean
equals(java.lang.Object aObject)
implements a deepEPPTreatyOrStatute
compare.java.util.List<EPPMarkContact>
getContacts()
Gets contacts of the treaty or statute.java.util.Date
getExecDate()
Gets the execution date of the treaty or statute.java.lang.String
getGoodsAndServices()
Gets full description of the goods and services mentioned in the treaty or statute registration document.java.util.List<EPPMarkContact>
getHolders()
Gets holders of the treaty or statute.java.lang.String
getId()
Gets the identifier for the treaty or statute.java.util.List<java.lang.String>
getLabels()
Gets the domain name labels that corresponds to the treaty or statute.java.lang.String
getName()
Gets the registered treaty or statute text string.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.Date
getProDate()
Gets the date of protection of the mark.java.util.List<EPPProtection>
getProtections()
Gets protections of the treaty or statute.java.lang.String
getRefNum()
Gets the reference number of the mark of the treaty or statute.java.lang.String
getTitle()
Gets the title of the treaty or statute.void
setContacts(java.util.List<EPPMarkContact> aContacts)
Sets contacts of the treaty or statute.void
setExecDate(java.util.Date aExecDate)
Sets the execution date of the treaty or statute.void
setGoodsAndServices(java.lang.String aGoodsAndServices)
Sets full description of the goods and services mentioned in the treaty or statute registration document.void
setHolders(java.util.List<EPPMarkContact> aHolders)
Sets holders of the treaty or statute.void
setId(java.lang.String aId)
Sets the identifier for the treaty or statute.void
setLabels(java.util.List<java.lang.String> aLabels)
Sets the domain name labels that corresponds to the treaty or statute.void
setName(java.lang.String aName)
Sets the registered treaty or statute text string.void
setProDate(java.util.Date aProDate)
Sets the date of protection of the mark.void
setProtections(java.util.List<EPPProtection> aProtections)
Sets protections of the treaty or statute.void
setRefNum(java.lang.String aRefNum)
Sets the reference number of the mark of the treaty or statute.void
setTitle(java.lang.String aTitle)
Sets the title of the treaty or statute.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the treaty or statute local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the treaty or statute tag- See Also:
- Constant Field Values
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPTreatyOrStatute
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPTreatyOrStatute
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
encode
public byte[] encode() throws EPPEncodeException
Encode the treaty or statute to abyte[]
.- Returns:
- Encoded treaty or statute
- Throws:
EPPEncodeException
- Error encoding the treaty or statute
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Sets all this instance's data in the given XML document- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- a DOM Document to attach data to.- Returns:
- The root element of this component.
- Throws:
EPPEncodeException
- Thrown if any errors prevent encoding.
-
decode
public void decode(byte[] aMarkArray) throws EPPDecodeException
Decode theEPPTreatyOrStatute
attributes from the inputbyte[]
.- Parameters:
aMarkArray
-byte[]
to decode the attribute values- Throws:
EPPDecodeException
- Error decoding thebyte[]
.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPTreatyOrStatute
component- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root element of theEPPTreatyOrStatute
- Throws:
EPPDecodeException
- Error decoding theEPPTreatyOrStatute
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPTreatyOrStatute
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPTreatyOrStatute
instance to compare with- Returns:
- true if equal false otherwise
-
getId
public java.lang.String getId()
Gets the identifier for the treaty or statute.- Returns:
- The identifier for the treaty or statute if set;
null
otherwise.
-
setId
public void setId(java.lang.String aId)
Sets the identifier for the treaty or statute.- Parameters:
aId
- Identifier for the treaty or statute
-
getName
public java.lang.String getName()
Gets the registered treaty or statute text string.- Returns:
- The registered treaty or statute text string if set;
null
otherwise.
-
setName
public void setName(java.lang.String aName)
Sets the registered treaty or statute text string.- Parameters:
aName
- the registered treaty or statute text string
-
getHolders
public java.util.List<EPPMarkContact> getHolders()
Gets holders of the treaty or statute.- Returns:
- the holders of the treaty or statute if set; Empty
List
otherwise.
-
setHolders
public void setHolders(java.util.List<EPPMarkContact> aHolders)
Sets holders of the treaty or statute.- Parameters:
aHolders
- the holders of the treaty or statute
-
addHolder
public void addHolder(EPPMarkContact aHolder)
Adds a holder to the list of holders of the treaty or statute.- Parameters:
aHolder
- Holder to add to list of holders of the treaty or statute.
-
getContacts
public java.util.List<EPPMarkContact> getContacts()
Gets contacts of the treaty or statute.- Returns:
- the contacts of the treaty or statute if set; Empty
List
otherwise.
-
setContacts
public void setContacts(java.util.List<EPPMarkContact> aContacts)
Sets contacts of the treaty or statute.- Parameters:
aContacts
- the contacts of the treaty or statute
-
addContact
public void addContact(EPPMarkContact aContact)
Adds a contact to the list of contacts of the treaty or statute.- Parameters:
aContact
- Contact to add to list of contacts of the treaty or statute.
-
getProtections
public java.util.List<EPPProtection> getProtections()
Gets protections of the treaty or statute.- Returns:
- the protections of the treaty or statute if set; Empty
List
otherwise.
-
setProtections
public void setProtections(java.util.List<EPPProtection> aProtections)
Sets protections of the treaty or statute.- Parameters:
aProtections
- the protections of the treaty or statute
-
addProtection
public void addProtection(EPPProtection aProtection)
Adds a protection to the list of protections of the treaty or statute.- Parameters:
aProtection
- Protection to add to list of protections of the treaty or statute.
-
getLabels
public java.util.List<java.lang.String> getLabels()
Gets the domain name labels that corresponds to the treaty or statute.- Returns:
- the domain name labels that corresponds to the treaty or statute
if set; Empty
List
otherwise.
-
setLabels
public void setLabels(java.util.List<java.lang.String> aLabels)
Sets the domain name labels that corresponds to the treaty or statute.- Parameters:
aLabels
- the domain name labels that corresponds to the treaty or statute
-
addLabel
public void addLabel(java.lang.String aLabel)
Adds a domain name label to the domain name labels that corresponds to the treaty or statute.- Parameters:
aLabel
- Domain name label to add.
-
getGoodsAndServices
public java.lang.String getGoodsAndServices()
Gets full description of the goods and services mentioned in the treaty or statute registration document.- Returns:
- The goods and services if set;
null
otherwise.
-
setGoodsAndServices
public void setGoodsAndServices(java.lang.String aGoodsAndServices)
Sets full description of the goods and services mentioned in the treaty or statute registration document.- Parameters:
aGoodsAndServices
- The goods and services
-
getRefNum
public java.lang.String getRefNum()
Gets the reference number of the mark of the treaty or statute.- Returns:
- Reference number of the mark of the treaty or statute if defined;
null
otherwise.
-
setRefNum
public void setRefNum(java.lang.String aRefNum)
Sets the reference number of the mark of the treaty or statute.- Parameters:
aRefNum
- Reference number of the mark of the treaty or statute.
-
getProDate
public java.util.Date getProDate()
Gets the date of protection of the mark.- Returns:
- The date of protection of the mark if defined;
null
otherwise.
-
setProDate
public void setProDate(java.util.Date aProDate)
Sets the date of protection of the mark.- Parameters:
aProDate
- The date of protection of the mark.
-
getTitle
public java.lang.String getTitle()
Gets the title of the treaty or statute.- Returns:
- The title of the treaty or statute.
-
setTitle
public void setTitle(java.lang.String aTitle)
Sets the title of the treaty or statute.- Parameters:
aTitle
- The title of the treaty or statute.
-
getExecDate
public java.util.Date getExecDate()
Gets the execution date of the treaty or statute.- Returns:
- The execution date of the treaty or statute if set;
null
otherwise.
-
setExecDate
public void setExecDate(java.util.Date aExecDate)
Sets the execution date of the treaty or statute.- Parameters:
aExecDate
- The execution date of the treaty or statute
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-