Class EPPMaintenanceListItem

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

public class EPPMaintenanceListItem extends Object implements EPPCodecComponent
Represents a maintenance list item that includes the following child elements:
  • <maint:id> element that is the maintenance identifier.
  • <maint:start> element that is the maintenance start date and time.
  • <maint:end> element that is the maintenance end date and time.
  • <maint:crDate> element that represents the created date and time for the maintenance.
  • An OPTIONAL <maint:upDate> element that represents the updated date and time for the maintenance.
See Also:
  • Field Details

  • Constructor Details

    • EPPMaintenanceListItem

      public EPPMaintenanceListItem()
      Default constructor for EPPMaintenanceItem. All the the attributes default to null. Must call required setter methods before invoking encode(Document), which include:

    • EPPMaintenanceListItem

      public EPPMaintenanceListItem(EPPMaintenanceId aMaintenanceId, Date aStartDate, Date aEndDate, Date aCreatedDate)
      Constructor for EPPMaintenanceItem with all of the required attributes as parameters.
      Parameters:
      aMaintenanceId - Maintenance identifier
      aStartDate - Maintenance start date and time
      aEndDate - Maintenance end date and time
      aCreatedDate - Maintenance created date
    • EPPMaintenanceListItem

      public EPPMaintenanceListItem(EPPMaintenanceId aMaintenanceId, Date aStartDate, Date aEndDate, Date aCreatedDate, Date aLastUpdatedDate)
      Constructor for EPPMaintenanceItem with all of the attributes as parameters.
      Parameters:
      aMaintenanceId - Maintenance identifier
      aStartDate - Maintenance start date. Set to null if undefined.
      aEndDate - Maintenance end date. Set to null if undefined.
      aCreatedDate - Maintenance created date
      aLastUpdatedDate - Maintenance last updated date. Set to null if undefined.
  • 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.
    • hasStartdDate

      public boolean hasStartdDate()
      Is the start date defined?
      Returns:
      true if the start date is defined; false otherwise.
    • 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.
    • hasEndDate

      public boolean hasEndDate()
      Is the end date defined?
      Returns:
      true if the end date is defined; false otherwise.
    • 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.
    • 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 EPPMaintenanceItem 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 EPPMaintenanceItem instance.
      Throws:
      EPPEncodeException - Unable to encode EPPMaintenanceItem instance.
    • decode

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

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

      public Object clone() throws CloneNotSupportedException
      Clone EPPMaintenanceItem.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPMaintenanceItem
      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.