Class EPPLoginSecEvent

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

public class EPPLoginSecEvent extends Object implements EPPCodecComponent
Login Security Event that identifies a security warning or error for the client to address. There may be many EPPLoginSecEvent instances in the EPPLoginSecData extension to the EPPResponse. The EPPLoginSecEvent includes a set of generic attributes and an extensible set of types to support a large set of possible security events.
See Also:
  • Field Details

  • Constructor Details

    • EPPLoginSecEvent

      public EPPLoginSecEvent()
      Default constructor for EPPLoginSecEvent.
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, EventLevel aLevel)
      EPPLoginSecEvent constructor that takes the required attributes of type and level.
      Parameters:
      aType - Event type
      aLevel - Event level
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, EventLevel aLevel, String aDescription)
      EPPLoginSecEvent constructor that takes required attributes and a description.
      Parameters:
      aType - Event type
      aLevel - Event level
      aDescription - Option description of event. Set to null for no description.
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, EventLevel aLevel, Date aExDate, String aDescription)
      EPPLoginSecEvent constructor that takes likely attributes for an expiry event.
      Parameters:
      aType - Event type
      aLevel - Event level
      aExDate - Expiration date of event
      aDescription - Option description of event. Set to null for no description.
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, EventLevel aLevel, String aValue, String aDescription)
      EPPLoginSecEvent constructor that takes likely attribute for a value event.
      Parameters:
      aType - Event type
      aLevel - Event level
      aValue - Value of event
      aDescription - Option description of event. Set to null for no description.
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, String aTypeName, EventLevel aLevel, String aDescription)
      EPPLoginSecEvent constructor that takes likely attributes for a custom event.
      Parameters:
      aType - Event type
      aTypeName - Custom type name
      aLevel - Event level
      aDescription - Option description of event. Set to null for no description.
    • EPPLoginSecEvent

      public EPPLoginSecEvent(EventType aType, String aTypeName, EventLevel aLevel, String aValue, String aDuration, String aDescription)
      EPPLoginSecEvent constructor that takes likely attribute for a statistical event.
      Parameters:
      aType - Event type
      aTypeName - Statistical sub-type name
      aLevel - Event level
      aValue - Value of event
      aDuration - Duration of the event
      aDescription - Option description of event. Set to null for no description.
  • Method Details

    • getType

      public EventType getType()
      Gets the type for the security event.
      Returns:
      Type of the security event if set; null otherwise.
    • setType

      public void setType(EventType aType)
      Sets the type of the security event.
      Parameters:
      aType - The type of the security event
    • hasTypeName

      public boolean hasTypeName()
      Is the type name (custom type or sub-type) set?
      Returns:
      true if the type name is defined; false otherwise.
    • getTypeName

      public String getTypeName()
      Gets the optional sub-type or the custom type name of the event. If the type is set to EventType.CUSTOM, then the type name must be set.
      Returns:
      Gets the optional type name if set; null otherwise.
    • setTypeName

      public void setTypeName(String aTypeName)
      Sets the optional sub-type or the custom type name of the event.
      Parameters:
      aTypeName - Sub-type or custom type name of the event.
    • getLevel

      public EventLevel getLevel()
      Gets the event level.
      Returns:
      Level of the event if defined; null otherwise.
    • setLevel

      public void setLevel(EventLevel aLevel)
      Sets the event level.
      Parameters:
      aLevel - Level of the event
    • hasExDate

      public boolean hasExDate()
      Is the expiration date set?
      Returns:
      true if the expiration date is defined; false otherwise.
    • getExDate

      public Date getExDate()
      Gets the optional expiration of the event item (e.g., password, client certificate). The client must address the event prior to the expiration date and time.
      Returns:
      The expiration date and time if set; null otherwise.
    • setExDate

      public void setExDate(Date aExDate)
      Sets the optional expiration of the event item (e.g., password, client certificate). The client must address the event prior to the expiration date and time.
      Parameters:
      aExDate - Expiration date and time of the event item
    • hasValue

      public boolean hasValue()
      Is the event value set?
      Returns:
      true if the event value is defined; false otherwise.
    • getValue

      public String getValue()
      Gets the optional value associated with the event (e.g., cipher of an cipher event or TLS protocol of a TLS protocol event).
      Returns:
      The event value if defined; null otherwise.
    • setValue

      public void setValue(String aValue)
      Sets the optional value associated with the event (e.g., cipher of an cipher event or TLS protocol of a TLS protocol event).
      Parameters:
      aValue - Event value to set
    • hasDuration

      public boolean hasDuration()
      Is the duration set?
      Returns:
      true if the duration is defined; false otherwise.
    • getDuration

      public String getDuration()
      Gets the optional duration associated with a statistical warning event. The duration follows the format of an XML schema duration type.
      Returns:
      The duration if defined; null otherwise.
    • setDuration

      public void setDuration(String aDuration)
      Sets the optional duration associated with a statistical warning event. The duration follows the format of an XML schema duration type.
      Parameters:
      aDuration - The duration to set
    • getLang

      public String getLang()
      Gets the optional language of the description with the default of DEFAULT_LANG ("en").
      Returns:
      The language of the description
    • setLang

      public void setLang(String aLang)
      Sets the optional language of the description with the default of DEFAULT_LANG ("en").
      Parameters:
      aLang - Language of the description
    • hasDescription

      public boolean hasDescription()
      Is the description set?
      Returns:
      true if the description is defined; false otherwise.
    • getDescription

      public String getDescription()
      Gets the optional description for the event. The language of the description is defined by getLang().
      Returns:
      The description if defined; null otherwise.
    • setDescription

      public void setDescription(String aDescription)
      Sets the optional description for the event. If the language is not English ("en"), set the language using setLang(String).
      Parameters:
      aDescription - The description to set.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document, which acts is an Element factory
      Returns:
      Element Root element associated with the object
      Throws:
      EPPEncodeException - Error encoding EPPLoginSecEvent
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode a DOM element tree to initialize the instance attributes. The aElement argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Element to decode
      Throws:
      EPPDecodeException - Error decoding Element
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPLoginSecEvent with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.
    • clone

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