Class EPPMaintenanceItem

java.lang.Object
com.verisign.epp.codec.maintenance.v1_0.EPPMaintenanceItem
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPMaintenanceItem extends 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:
  • Field Details

  • Constructor Details

  • Method Details

    • getMaintenanceId

      public EPPMaintenanceId getMaintenanceId()
      Gets the maintenance identifier.
      Returns:
      The maintenance identifier if defined; null otherwise.
    • setMaintenanceId

      public void setMaintenanceId(EPPMaintenanceId aMaintenanceId)
      Sets the maintenance identifier.
      Parameters:
      aMaintenanceId - The maintenance identifier.
    • hasTypes

      public boolean hasTypes()
      Is the types defined?
      Returns:
      true if the types is defined; false otherwise.
    • getTypes

      public List<EPPMaintenanceType> getTypes()
      Gets the types of the maintenance.
      Returns:
      The types of the maintenance if defined; null otherwise.
    • 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(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:
      true if the poll type is defined; false otherwise.
    • 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; null otherwise.
    • 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 to null to unset it.
    • getSystems

      public List<EPPMaintenanceSystem> getSystems()
      Gets the maintenance systems.
      Returns:
      Maintenance systems if defined; null otherwise.
    • 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(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; code otherwise.
    • 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:
      true if the custom environment name is defined; false otherwise.
    • getCustomEnvironment

      public String getCustomEnvironment()
      Gets the custom environment name, when the environment is set to EPPMaintenanceItem.Environment.custom.
      Returns:
      Custom environment name if defined; null otherwise.
    • setCustomEnvironment

      public void setCustomEnvironment(String aCustomEnvironment)
      Sets the custom environment name, when the environment is set to EPPMaintenanceItem.Environment.custom.
      Parameters:
      aCustomEnvironment - The custom environment name to set.
    • getStartDate

      public Date getStartDate()
      Gets the optional maintenance start date and time.
      Returns:
      start date and time if defined; null otherwise.
    • setStartDate

      public void setStartDate(Date aStartDate)
      Sets the optional maintenance start date and time.
      Parameters:
      aStartDate - Maintenance start date and time. Set to null if undefined.
    • getEndDate

      public Date getEndDate()
      Gets the optional maintenance end date and time.
      Returns:
      end date and time if defined; null otherwise.
    • setEndDate

      public void setEndDate(Date aEndDate)
      Sets the optional maintenance end date and time.
      Parameters:
      aEndDate - Maintenance end date and time. Set to null if undefined.
    • getReason

      public EPPMaintenanceItem.Reason getReason()
      Gets the reason behind the maintenance.
      Returns:
      Reason behind the maintenance if defined; null otherwise.
    • 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:
      true if the detail is defined; false otherwise.
    • getDetail

      public String getDetail()
      Gets URI to detailed maintenance description.
      Returns:
      URI to detailed maintenance description if defined; null otherwise.
    • setDetail

      public void setDetail(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:
      true if the descriptions is defined; false otherwise.
    • getDescriptions

      public 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; null otherwise.
    • 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(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 to null to unset the descriptions.
    • getTlds

      public List<String> getTlds()
      Gets the optional top-level domains affected by the maintenance.
      Returns:
      top-level domains affected by the maintenance if defined; null otherwise.
    • addTld

      public void addTld(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(List<String> aTlds)
      Optional top-level domains affected by the maintenance.
      Parameters:
      aTlds - the tlds to set. Set to null if undefined.
    • getIntervention

      public EPPMaintenanceIntervention getIntervention()
      Gets the optional client intervention by the maintenance.
      Returns:
      optional client intervention if defined; null otherwise.
    • setIntervention

      public void setIntervention(EPPMaintenanceIntervention aIntervention)
      Sets the optional client intervention.
      Parameters:
      aIntervention - client intervention. Set to null if undefined.
    • getCreatedDate

      public Date getCreatedDate()
      Gets the maintenance created date.
      Returns:
      Maintenance created date if defined; null otherwise.
    • setCreatedDate

      public void setCreatedDate(Date aCreatedDate)
      Sets the maintenance created date.
      Parameters:
      aCreatedDate - Maintenance created date
    • hasLastUpdatedDate

      public boolean hasLastUpdatedDate()
      Is the last updated date defined?
      Returns:
      true if the last updated date is defined; false otherwise.
    • getLastUpdatedDate

      public Date getLastUpdatedDate()
      Gets the optional maintenance last updated date.
      Returns:
      Maintenance last updated date if defined; null otherwise.
    • setLastUpdatedDate

      public void setLastUpdatedDate(Date aLastUpdatedDate)
      Sets the maintenance last updated date.
      Parameters:
      aLastUpdatedDate - Maintenance last updated date
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPMaintenance instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Root DOM Element representing the EPPMaintenance instance.
      Throws:
      EPPEncodeException - Unable to encode EPPMaintenance instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPMaintenance attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPMaintenance from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPMaintenance compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPMaintenance instance to compare with
      Returns:
      true of aObject is equal to instance; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPMaintenance.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPMaintenance
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.