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.String
ELM_LOCALNAME
Constant for the mark local namestatic java.lang.String
ELM_NAME
Constant for the mark tagstatic java.lang.String
NS
Namespace URI associated with EPPLaunchExtFactory.static java.lang.String
NS_PREFIX
Namespace prefix associated with EPPLaunchExtFactory.static java.lang.String
NS_SCHEMA
XML Schema definition for EPPLaunchExtFactory
-
Constructor Summary
Constructors Constructor Description EPPMark()
Create anEPPMark
instance.EPPMark(java.util.List<EPPTrademark> aTrademarks, java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes, java.util.List<EPPCourt> aCourts)
Create anEPPMark
instance 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 void
addCourt(EPPCourt aCourt)
Adds a court to the list of courts.void
addTrademark(EPPTrademark aTrademark)
Adds a trademark to the list of trademarks.void
addTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)
Adds a treaty or statute to the list of treaty or statutes.java.lang.Object
clone()
CloneEPPMark
.void
decode(byte[] aMarkArray)
Decode theEPPMark
attributes from the inputbyte[]
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPMark
componentbyte[]
encode()
Encode the mark 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 deepEPPMark
compare.java.util.List<EPPCourt>
getCourts()
Gets the list of courts.java.lang.String
getNamespace()
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.boolean
hasCourts()
Are courts defined?boolean
hasTrademarks()
Are trademarks defined?boolean
hasTreatyOrStatutes()
Are treaty or statutes defined?void
setCourts(java.util.List<EPPCourt> aCourts)
Sets the list of courts.void
setTrademarks(java.util.List<EPPTrademark> aTrademarks)
Sets the list of trademarks.void
setTreatyOrStatutes(java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes)
Sets the list of treaty or statutes.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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 anEPPMark
instance. 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 anEPPMark
instance with each of the supported lists including trademarks, treaty and statutes, and courts.- Parameters:
aTrademarks
- List of trademarks if defined;null
otherwise.aTreatyOrStatutes
- List of treaty or statutes if defined;null
otherwise.aCourts
- List of courts if defined;null
otherwise.
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPMark
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPMark
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
encode
public byte[] encode() throws EPPEncodeException
Encode 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 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 theEPPMark
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 theEPPMark
component- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root element of theEPPMark
- Throws:
EPPDecodeException
- Error decoding theEPPMark
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMark
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPMark
instance to compare with- Returns:
- true if equal false otherwise
-
hasTrademarks
public boolean hasTrademarks()
Are trademarks defined?- Returns:
true
if trademarks are defined;false
otherwise.
-
getTrademarks
public java.util.List<EPPTrademark> getTrademarks()
Gets the list of trademarks.- Returns:
- List of trademarks if set;
null
otherwise.
-
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:
true
if treaty or statutes are defined;false
otherwise.
-
getTreatyOrStatutes
public java.util.List<EPPTreatyOrStatute> getTreatyOrStatutes()
Gets the list of treaty or statutes.- Returns:
- List of treaty or statutes if set;
null
otherwise.
-
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:
true
if courts are defined;false
otherwise.
-
getCourts
public java.util.List<EPPCourt> getCourts()
Gets the list of courts.- Returns:
- List of courts if set;
null
otherwise.
-
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 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
.
-
-