Package com.verisign.epp.codec.mark
Class EPPMark
- java.lang.Object
-
- com.verisign.epp.codec.mark.EPPMark
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPMark extends java.lang.Object implements EPPCodecComponent
Class for a Mark that can contain a list of trademarks, treaty or statutes, and courts. The Mark includes a set of attributes that are used to verify the eligibility for the registration of a domain name.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEConstant for the mark local namestatic java.lang.StringELM_NAMEConstant for the mark tagstatic java.lang.StringNSNamespace URI associated with EPPLaunchExtFactory.static java.lang.StringNS_PREFIXNamespace prefix associated with EPPLaunchExtFactory.static java.lang.StringNS_SCHEMAXML Schema definition for EPPLaunchExtFactory
-
Constructor Summary
Constructors Constructor Description EPPMark()Create anEPPMarkinstance.EPPMark(java.util.List<EPPTrademark> aTrademarks, java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes, java.util.List<EPPCourt> aCourts)Create anEPPMarkinstance with each of the supported lists including trademarks, treaty and statutes, and courts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCourt(EPPCourt aCourt)Adds a court to the list of courts.voidaddTrademark(EPPTrademark aTrademark)Adds a trademark to the list of trademarks.voidaddTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)Adds a treaty or statute to the list of treaty or statutes.java.lang.Objectclone()CloneEPPMark.voiddecode(byte[] aMarkArray)Decode theEPPMarkattributes from the inputbyte[].voiddecode(org.w3c.dom.Element aElement)Decode theEPPMarkcomponentbyte[]encode()Encode the mark 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 deepEPPMarkcompare.java.util.List<EPPCourt>getCourts()Gets the list of courts.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.util.List<EPPTrademark>getTrademarks()Gets the list of trademarks.java.util.List<EPPTreatyOrStatute>getTreatyOrStatutes()Gets the list of treaty or statutes.booleanhasCourts()Are courts defined?booleanhasTrademarks()Are trademarks defined?booleanhasTreatyOrStatutes()Are treaty or statutes defined?voidsetCourts(java.util.List<EPPCourt> aCourts)Sets the list of courts.voidsetTrademarks(java.util.List<EPPTrademark> aTrademarks)Sets the list of trademarks.voidsetTreatyOrStatutes(java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes)Sets the list of treaty or statutes.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
NS
public static final java.lang.String NS
Namespace URI associated with EPPLaunchExtFactory.- See Also:
- Constant Field Values
-
NS_PREFIX
public static final java.lang.String NS_PREFIX
Namespace prefix associated with EPPLaunchExtFactory.- See Also:
- Constant Field Values
-
NS_SCHEMA
public static final java.lang.String NS_SCHEMA
XML Schema definition for EPPLaunchExtFactory- See Also:
- Constant Field Values
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the mark local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the mark tag- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMark
public EPPMark()
Create anEPPMarkinstance. Use the setter methods to set the attributes of the instance.
-
EPPMark
public EPPMark(java.util.List<EPPTrademark> aTrademarks, java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes, java.util.List<EPPCourt> aCourts)
Create anEPPMarkinstance with each of the supported lists including trademarks, treaty and statutes, and courts.- Parameters:
aTrademarks- List of trademarks if defined;nullotherwise.aTreatyOrStatutes- List of treaty or statutes if defined;nullotherwise.aCourts- List of courts if defined;nullotherwise.
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPMark.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPMark - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
encode
public byte[] encode() throws EPPEncodeExceptionEncode the mark to abyte[].- Returns:
- Encoded mark
- Throws:
EPPEncodeException- Error encoding the mark
-
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 theEPPMarkattributes 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 theEPPMarkcomponent- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root element of theEPPMark- Throws:
EPPDecodeException- Error decoding theEPPMark
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMarkcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPMarkinstance to compare with- Returns:
- true if equal false otherwise
-
hasTrademarks
public boolean hasTrademarks()
Are trademarks defined?- Returns:
trueif trademarks are defined;falseotherwise.
-
getTrademarks
public java.util.List<EPPTrademark> getTrademarks()
Gets the list of trademarks.- Returns:
- List of trademarks if set;
nullotherwise.
-
setTrademarks
public void setTrademarks(java.util.List<EPPTrademark> aTrademarks)
Sets the list of trademarks.- Parameters:
aTrademarks- List of trademarks
-
addTrademark
public void addTrademark(EPPTrademark aTrademark)
Adds a trademark to the list of trademarks.- Parameters:
aTrademark- Trademark to add to the list of trademarks.
-
hasTreatyOrStatutes
public boolean hasTreatyOrStatutes()
Are treaty or statutes defined?- Returns:
trueif treaty or statutes are defined;falseotherwise.
-
getTreatyOrStatutes
public java.util.List<EPPTreatyOrStatute> getTreatyOrStatutes()
Gets the list of treaty or statutes.- Returns:
- List of treaty or statutes if set;
nullotherwise.
-
setTreatyOrStatutes
public void setTreatyOrStatutes(java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes)
Sets the list of treaty or statutes.- Parameters:
aTreatyOrStatutes- List of trademarks
-
addTreatyOrStatute
public void addTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)
Adds a treaty or statute to the list of treaty or statutes.- Parameters:
aTreatyOrStatute- Treaty or statute to add to the list of treaty or statutes.
-
hasCourts
public boolean hasCourts()
Are courts defined?- Returns:
trueif courts are defined;falseotherwise.
-
getCourts
public java.util.List<EPPCourt> getCourts()
Gets the list of courts.- Returns:
- List of courts if set;
nullotherwise.
-
setCourts
public void setCourts(java.util.List<EPPCourt> aCourts)
Sets the list of courts.- Parameters:
aCourts- List of courts
-
addCourt
public void addCourt(EPPCourt aCourt)
Adds a court to the list of courts.- Parameters:
aCourt- Court to add to the list of courts.
-
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.
-
-