Class EPPMaintenanceItem
- java.lang.Object
-
- com.verisign.epp.codec.maintenance.v1_0.EPPMaintenanceItem
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPMaintenanceItem extends java.lang.Object implements EPPCodecComponent
Represents a maintenance that includes the following child elements:
- <maint:id> element that is the maintenance identifier.
- <maint:type> The OPTIONAL type of the maintenance that has the possible set of values defined by server policy.
- <maint:pollType> An OPTIONAL element that is the registry maintenance notification poll message type.
- <maint:systems> elements that contains one or more <maint:system> elements.
- <maint:environment> element that indicates the type of the affected system using the Environment enumeration.
- <maint:start> element that represents the maintenance start date and time.
- <maint:end> element that represents the maintenance end date and time.
- <maint:reason> element that is the reason behind the maintenance.
- <maint:description> OPTIONAL free-form description of the maintenance.
- <maint:tlds> OPTIONAL element containing list of affected top-level domains or registry zones.
- <maint:intervention> OPTIONAL element that contains when the maintenance affects the connection or implementation for the client.
- <maint:crDate> element that represents the created date and time for the maintenance.
- <maint:upDate> OPTIONAL element that represents the updated date and time for the maintenance.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEPPMaintenanceItem.EnvironmentEnvironment enumerated values.static classEPPMaintenanceItem.PollTypePoll type enumerated values.static classEPPMaintenanceItem.ReasonReason enumerated values.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEXML local name forEPPMaintenance.static java.lang.StringELM_NAMEXML root tag forEPPMaintenance.
-
Constructor Summary
Constructors Constructor Description EPPMaintenanceItem()Default constructor forEPPMaintenance.EPPMaintenanceItem(EPPMaintenanceId aMaintenanceId, java.util.List<EPPMaintenanceSystem> aSystems, EPPMaintenanceItem.Environment aEnvironment, java.util.Date aStartDate, java.util.Date aEndDate, EPPMaintenanceItem.Reason aReason, java.util.Date aCreatedDate)Constructor forEPPMaintenancewith all of the required attributes as parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescription(EPPMaintenanceDescription aDescription)Add a description to the list of descriptions.voidaddSystem(EPPMaintenanceSystem aSystem)Add a system to the list of affected systems.voidaddTld(java.lang.String aTld)Add a top-level domain to the list of affected top-level domains.voidaddType(EPPMaintenanceType aType)Add a type to the list of types.java.lang.Objectclone()CloneEPPMaintenance.voiddecode(org.w3c.dom.Element aElement)Decode theEPPMaintenanceattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPMaintenanceinstance.booleanequals(java.lang.Object aObject)implements a deepEPPMaintenancecompare.java.util.DategetCreatedDate()Gets the maintenance created date.java.lang.StringgetCustomEnvironment()Gets the custom environment name, when the environment is set toEPPMaintenanceItem.Environment.custom.java.util.List<EPPMaintenanceDescription>getDescriptions()Gets the free-form descriptions of the maintenance without having to create an external resource.java.lang.StringgetDetail()Gets URI to detailed maintenance description.java.util.DategetEndDate()Gets the optional maintenance end date and time.EPPMaintenanceItem.EnvironmentgetEnvironment()Gets the type of the affected system.EPPMaintenanceInterventiongetIntervention()Gets the optional client intervention by the maintenance.java.util.DategetLastUpdatedDate()Gets the optional maintenance last updated date.EPPMaintenanceIdgetMaintenanceId()Gets the maintenance identifier.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.EPPMaintenanceItem.PollTypegetPollType()Gets the poll type of the Registry Maintenance Notification poll message.EPPMaintenanceItem.ReasongetReason()Gets the reason behind the maintenance.java.util.DategetStartDate()Gets the optional maintenance start date and time.java.util.List<EPPMaintenanceSystem>getSystems()Gets the maintenance systems.java.util.List<java.lang.String>getTlds()Gets the optional top-level domains affected by the maintenance.java.util.List<EPPMaintenanceType>getTypes()Gets the types of the maintenance.booleanhasCustomEnvironment()Is the custom environment name defined?booleanhasDescriptions()Is the descriptions defined?booleanhasDetail()Is the detail defined?booleanhasLastUpdatedDate()Is the last updated date defined?booleanhasPollType()Is the poll type defined?booleanhasTypes()Is the types defined?voidsetCreatedDate(java.util.Date aCreatedDate)Sets the maintenance created date.voidsetCustomEnvironment(java.lang.String aCustomEnvironment)Sets the custom environment name, when the environment is set toEPPMaintenanceItem.Environment.custom.voidsetDescriptions(java.util.List<EPPMaintenanceDescription> aDescriptions)Sets the free-form descriptions of the maintenance without having to create an external resource.voidsetDetail(java.lang.String aDetail)Sets URI to detailed maintenance description.voidsetEndDate(java.util.Date aEndDate)Sets the optional maintenance end date and time.voidsetEnvironment(EPPMaintenanceItem.Environment aEnvironment)Sets the type of the affected system.voidsetIntervention(EPPMaintenanceIntervention aIntervention)Sets the optional client intervention.voidsetLastUpdatedDate(java.util.Date aLastUpdatedDate)Sets the maintenance last updated date.voidsetMaintenanceId(EPPMaintenanceId aMaintenanceId)Sets the maintenance identifier.voidsetPollType(EPPMaintenanceItem.PollType aPollType)Sets the poll type of the Registry Maintenance Notification poll message.voidsetReason(EPPMaintenanceItem.Reason aReason)Sets the reason behind the maintenance.voidsetStartDate(java.util.Date aStartDate)Sets the optional maintenance start date and time.voidsetSystems(java.util.List<EPPMaintenanceSystem> aSystems)Sets the maintenance systems.voidsetTlds(java.util.List<java.lang.String> aTlds)Optional top-level domains affected by the maintenance.voidsetTypes(java.util.List<EPPMaintenanceType> aTypes)Sets the types of the maintenance.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
XML local name forEPPMaintenance.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPMaintenance.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMaintenanceItem
public EPPMaintenanceItem()
Default constructor forEPPMaintenance. All the the attributes default tonull. Must call required setter methods before invokingencode(Document), which include:
- maintenance identifier -
setMaintenanceId(EPPMaintenanceId) - systems -
setSystems(List) - environment -
setStartDate(Date) - start date -
setEndDate(Date) - end date -
setEnvironment(Environment) - reason -
setReason(Reason) - created date -
setCreatedDate(Date)
- maintenance identifier -
-
EPPMaintenanceItem
public EPPMaintenanceItem(EPPMaintenanceId aMaintenanceId, java.util.List<EPPMaintenanceSystem> aSystems, EPPMaintenanceItem.Environment aEnvironment, java.util.Date aStartDate, java.util.Date aEndDate, EPPMaintenanceItem.Reason aReason, java.util.Date aCreatedDate)
Constructor forEPPMaintenancewith all of the required attributes as parameters.- Parameters:
aMaintenanceId- Maintenance identifieraSystems- Systems affected by the maintenance.aEnvironment- Type of the affected system.aStartDate- Maintenance start date and timeaEndDate- Maintenance end date and timeaReason- Reason behind the maintenance.aCreatedDate- Maintenance created date
-
-
Method Detail
-
getMaintenanceId
public EPPMaintenanceId getMaintenanceId()
Gets the maintenance identifier.- Returns:
- The maintenance identifier if defined;
nullotherwise.
-
setMaintenanceId
public void setMaintenanceId(EPPMaintenanceId aMaintenanceId)
Sets the maintenance identifier.- Parameters:
aMaintenanceId- The maintenance identifier.
-
hasTypes
public boolean hasTypes()
Is the types defined?- Returns:
trueif the types is defined;falseotherwise.
-
getTypes
public java.util.List<EPPMaintenanceType> getTypes()
Gets the types of the maintenance.- Returns:
- The types of the maintenance if defined;
nullotherwise.
-
addType
public void addType(EPPMaintenanceType aType)
Add a type to the list of types.- Parameters:
aType- Type to add to the list.
-
setTypes
public void setTypes(java.util.List<EPPMaintenanceType> aTypes)
Sets the types of the maintenance.- Parameters:
aTypes- Types of the maintenance.
-
hasPollType
public boolean hasPollType()
Is the poll type defined?- Returns:
trueif the poll type is defined;falseotherwise.
-
getPollType
public EPPMaintenanceItem.PollType getPollType()
Gets the poll type of the Registry Maintenance Notification poll message.- Returns:
- Poll type of the Registry Maintenance Notification poll message if
defined;
nullotherwise.
-
setPollType
public void setPollType(EPPMaintenanceItem.PollType aPollType)
Sets the poll type of the Registry Maintenance Notification poll message.- Parameters:
aPollType- Poll type of the Registry Maintenance Notification poll message. Set tonullto unset it.
-
getSystems
public java.util.List<EPPMaintenanceSystem> getSystems()
Gets the maintenance systems.- Returns:
- Maintenance systems if defined;
nullotherwise.
-
addSystem
public void addSystem(EPPMaintenanceSystem aSystem)
Add a system to the list of affected systems.- Parameters:
aSystem- Affected system to add to the list.
-
setSystems
public void setSystems(java.util.List<EPPMaintenanceSystem> aSystems)
Sets the maintenance systems.- Parameters:
aSystems- Maintenance systems to set.
-
getEnvironment
public EPPMaintenanceItem.Environment getEnvironment()
Gets the type of the affected system.- Returns:
- Type of the affected system if defined;
codeotherwise.
-
setEnvironment
public void setEnvironment(EPPMaintenanceItem.Environment aEnvironment)
Sets the type of the affected system.- Parameters:
aEnvironment- The type of the affect system to set.
-
hasCustomEnvironment
public boolean hasCustomEnvironment()
Is the custom environment name defined?- Returns:
trueif the custom environment name is defined;falseotherwise.
-
getCustomEnvironment
public java.lang.String getCustomEnvironment()
Gets the custom environment name, when the environment is set toEPPMaintenanceItem.Environment.custom.- Returns:
- Custom environment name if defined;
nullotherwise.
-
setCustomEnvironment
public void setCustomEnvironment(java.lang.String aCustomEnvironment)
Sets the custom environment name, when the environment is set toEPPMaintenanceItem.Environment.custom.- Parameters:
aCustomEnvironment- The custom environment name to set.
-
getStartDate
public java.util.Date getStartDate()
Gets the optional maintenance start date and time.- Returns:
- start date and time if defined;
nullotherwise.
-
setStartDate
public void setStartDate(java.util.Date aStartDate)
Sets the optional maintenance start date and time.- Parameters:
aStartDate- Maintenance start date and time. Set tonullif undefined.
-
getEndDate
public java.util.Date getEndDate()
Gets the optional maintenance end date and time.- Returns:
- end date and time if defined;
nullotherwise.
-
setEndDate
public void setEndDate(java.util.Date aEndDate)
Sets the optional maintenance end date and time.- Parameters:
aEndDate- Maintenance end date and time. Set tonullif undefined.
-
getReason
public EPPMaintenanceItem.Reason getReason()
Gets the reason behind the maintenance.- Returns:
- Reason behind the maintenance if defined;
nullotherwise.
-
setReason
public void setReason(EPPMaintenanceItem.Reason aReason)
Sets the reason behind the maintenance.- Parameters:
aReason- Reason behind the maintenance to set.
-
hasDetail
public boolean hasDetail()
Is the detail defined?- Returns:
trueif the detail is defined;falseotherwise.
-
getDetail
public java.lang.String getDetail()
Gets URI to detailed maintenance description.- Returns:
- URI to detailed maintenance description if defined;
nullotherwise.
-
setDetail
public void setDetail(java.lang.String aDetail)
Sets URI to detailed maintenance description.- Parameters:
aDetail- URI to detailed maintenance description to set
-
hasDescriptions
public boolean hasDescriptions()
Is the descriptions defined?- Returns:
trueif the descriptions is defined;falseotherwise.
-
getDescriptions
public java.util.List<EPPMaintenanceDescription> getDescriptions()
Gets the free-form descriptions of the maintenance without having to create an external resource.- Returns:
- The free-form descriptions of the maintenance if defined;
nullotherwise.
-
addDescription
public void addDescription(EPPMaintenanceDescription aDescription)
Add a description to the list of descriptions.- Parameters:
aDescription- Description to add to the list.
-
setDescriptions
public void setDescriptions(java.util.List<EPPMaintenanceDescription> aDescriptions)
Sets the free-form descriptions of the maintenance without having to create an external resource.- Parameters:
aDescriptions- Free-form descriptions of the maintenance without having to create an external resource. Set tonullto unset the descriptions.
-
getTlds
public java.util.List<java.lang.String> getTlds()
Gets the optional top-level domains affected by the maintenance.- Returns:
- top-level domains affected by the maintenance if defined;
nullotherwise.
-
addTld
public void addTld(java.lang.String aTld)
Add a top-level domain to the list of affected top-level domains.- Parameters:
aTld- Top-level domain to add to the list.
-
setTlds
public void setTlds(java.util.List<java.lang.String> aTlds)
Optional top-level domains affected by the maintenance.- Parameters:
aTlds- the tlds to set. Set tonullif undefined.
-
getIntervention
public EPPMaintenanceIntervention getIntervention()
Gets the optional client intervention by the maintenance.- Returns:
- optional client intervention if defined;
nullotherwise.
-
setIntervention
public void setIntervention(EPPMaintenanceIntervention aIntervention)
Sets the optional client intervention.- Parameters:
aIntervention- client intervention. Set tonullif undefined.
-
getCreatedDate
public java.util.Date getCreatedDate()
Gets the maintenance created date.- Returns:
- Maintenance created date if defined;
nullotherwise.
-
setCreatedDate
public void setCreatedDate(java.util.Date aCreatedDate)
Sets the maintenance created date.- Parameters:
aCreatedDate- Maintenance created date
-
hasLastUpdatedDate
public boolean hasLastUpdatedDate()
Is the last updated date defined?- Returns:
trueif the last updated date is defined;falseotherwise.
-
getLastUpdatedDate
public java.util.Date getLastUpdatedDate()
Gets the optional maintenance last updated date.- Returns:
- Maintenance last updated date if defined;
nullotherwise.
-
setLastUpdatedDate
public void setLastUpdatedDate(java.util.Date aLastUpdatedDate)
Sets the maintenance last updated date.- Parameters:
aLastUpdatedDate- Maintenance last updated date
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPMaintenanceinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPMaintenanceinstance. - Throws:
EPPEncodeException- Unable to encodeEPPMaintenanceinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPMaintenanceattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPMaintenancefrom.- Throws:
EPPDecodeException- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMaintenancecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPMaintenanceinstance to compare with- Returns:
trueofaObjectis equal to instance;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPMaintenance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPMaintenance - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
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.
-
-