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.StringELM_LOCALNAMEConstant for the treaty or statute local namestatic java.lang.StringELM_NAMEConstant for the treaty or statute tag
-
Constructor Summary
Constructors Constructor Description EPPTreatyOrStatute()Create anEPPTreatyOrStatuteinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContact(EPPMarkContact aContact)Adds a contact to the list of contacts of the treaty or statute.voidaddHolder(EPPMarkContact aHolder)Adds a holder to the list of holders of the treaty or statute.voidaddLabel(java.lang.String aLabel)Adds a domain name label to the domain name labels that corresponds to the treaty or statute.voidaddProtection(EPPProtection aProtection)Adds a protection to the list of protections of the treaty or statute.java.lang.Objectclone()CloneEPPTreatyOrStatute.voiddecode(byte[] aMarkArray)Decode theEPPTreatyOrStatuteattributes from the inputbyte[].voiddecode(org.w3c.dom.Element aElement)Decode theEPPTreatyOrStatutecomponentbyte[]encode()Encode the treaty or statute to abyte[].org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Sets all this instance's data in the given XML documentbooleanequals(java.lang.Object aObject)implements a deepEPPTreatyOrStatutecompare.java.util.List<EPPMarkContact>getContacts()Gets contacts of the treaty or statute.java.util.DategetExecDate()Gets the execution date of the treaty or statute.java.lang.StringgetGoodsAndServices()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.StringgetId()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.StringgetName()Gets the registered treaty or statute text string.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.util.DategetProDate()Gets the date of protection of the mark.java.util.List<EPPProtection>getProtections()Gets protections of the treaty or statute.java.lang.StringgetRefNum()Gets the reference number of the mark of the treaty or statute.java.lang.StringgetTitle()Gets the title of the treaty or statute.voidsetContacts(java.util.List<EPPMarkContact> aContacts)Sets contacts of the treaty or statute.voidsetExecDate(java.util.Date aExecDate)Sets the execution date of the treaty or statute.voidsetGoodsAndServices(java.lang.String aGoodsAndServices)Sets full description of the goods and services mentioned in the treaty or statute registration document.voidsetHolders(java.util.List<EPPMarkContact> aHolders)Sets holders of the treaty or statute.voidsetId(java.lang.String aId)Sets the identifier for the treaty or statute.voidsetLabels(java.util.List<java.lang.String> aLabels)Sets the domain name labels that corresponds to the treaty or statute.voidsetName(java.lang.String aName)Sets the registered treaty or statute text string.voidsetProDate(java.util.Date aProDate)Sets the date of protection of the mark.voidsetProtections(java.util.List<EPPProtection> aProtections)Sets protections of the treaty or statute.voidsetRefNum(java.lang.String aRefNum)Sets the reference number of the mark of the treaty or statute.voidsetTitle(java.lang.String aTitle)Sets the title of the treaty or statute.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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.CloneNotSupportedExceptionCloneEPPTreatyOrStatute.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPTreatyOrStatute - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
encode
public byte[] encode() throws EPPEncodeExceptionEncode 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 EPPEncodeExceptionSets all this instance's data in the given XML document- Specified by:
encodein 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 EPPDecodeExceptionDecode theEPPTreatyOrStatuteattributes 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 EPPDecodeExceptionDecode theEPPTreatyOrStatutecomponent- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root element of theEPPTreatyOrStatute- Throws:
EPPDecodeException- Error decoding theEPPTreatyOrStatute
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPTreatyOrStatutecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPTreatyOrStatuteinstance 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;
nullotherwise.
-
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;
nullotherwise.
-
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
Listotherwise.
-
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
Listotherwise.
-
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
Listotherwise.
-
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
Listotherwise.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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 XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-