com.verisign.epp.codec.loginsec.v04

## Class EPPLoginSecEvent

- java.lang.Object
- - com.verisign.epp.codec.loginsec.v04.EPPLoginSecEvent

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

      public class EPPLoginSecEvent
      extends java.lang.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:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_LANG` The default language of the description, which is "en".
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPLoginSecEvent`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPLoginSecEvent`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPLoginSecEvent()` Default constructor for `EPPLoginSecEvent`.
    `EPPLoginSecEvent(EventType aType, EventLevel aLevel)` `EPPLoginSecEvent` constructor that takes the required attributes of type and level.
    `EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.util.Date aExDate, java.lang.String aDescription)` `EPPLoginSecEvent` constructor that takes likely attributes for an expiry event.
    `EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aDescription)` `EPPLoginSecEvent` constructor that takes required attributes and a description.
    `EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aValue, java.lang.String aDescription)` `EPPLoginSecEvent` constructor that takes likely attribute for a value event.
    `EPPLoginSecEvent(EventType aType, java.lang.String aTypeName, EventLevel aLevel, java.lang.String aDescription)` `EPPLoginSecEvent` constructor that takes likely attributes for a custom event.
    `EPPLoginSecEvent(EventType aType, java.lang.String aTypeName, EventLevel aLevel, java.lang.String aValue, java.lang.String aDuration, java.lang.String aDescription)` `EPPLoginSecEvent` constructor that takes likely attribute for a statistical event.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone an `EPPCodecComponent` instance.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode a DOM element tree to initialize the instance attributes.
    `org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` Encode instance into a DOM element tree.
    `boolean` | `equals(java.lang.Object aObject)` Compare an instance of `EPPLoginSecEvent` with this instance.
    `java.lang.String` | `getDescription()` Gets the optional description for the event.
    `java.lang.String` | `getDuration()` Gets the optional duration associated with a statistical warning event.
    `java.util.Date` | `getExDate()` Gets the optional expiration of the event item (e.g., password, client certificate).
    `java.lang.String` | `getLang()` Gets the optional language of the description with the default of `DEFAULT_LANG` ("en").
    `EventLevel` | `getLevel()` Gets the event level.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `EventType` | `getType()` Gets the type for the security event.
    `java.lang.String` | `getTypeName()` Gets the optional sub-type or the custom type name of the event.
    `java.lang.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).
    `boolean` | `hasDescription()` Is the description set?
    `boolean` | `hasDuration()` Is the duration set?
    `boolean` | `hasExDate()` Is the expiration date set?
    `boolean` | `hasTypeName()` Is the type name (custom type or sub-type) set?
    `boolean` | `hasValue()` Is the event value set?
    `void` | `setDescription(java.lang.String aDescription)` Sets the optional description for the event.
    `void` | `setDuration(java.lang.String aDuration)` Sets the optional duration associated with a statistical warning event.
    `void` | `setExDate(java.util.Date aExDate)` Sets the optional expiration of the event item (e.g., password, client certificate).
    `void` | `setLang(java.lang.String aLang)` Sets the optional language of the description with the default of `DEFAULT_LANG` ("en").
    `void` | `setLevel(EventLevel aLevel)` Sets the event level.
    `void` | `setType(EventType aType)` Sets the type of the security event.
    `void` | `setTypeName(java.lang.String aTypeName)` Sets the optional sub-type or the custom type name of the event.
    `void` | `setValue(java.lang.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).
    `java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_LANG

          public static final java.lang.String DEFAULT_LANG

      The default language of the description, which is "en".
      See Also:
        Constant Field Values

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      XML local name for `EPPLoginSecEvent`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPLoginSecEvent`.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### 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,
                                  java.lang.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,
                                  java.util.Date aExDate,
                                  java.lang.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,
                                  java.lang.String aValue,
                                  java.lang.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,
                                  java.lang.String aTypeName,
                                  EventLevel aLevel,
                                  java.lang.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,
                                  java.lang.String aTypeName,
                                  EventLevel aLevel,
                                  java.lang.String aValue,
                                  java.lang.String aDuration,
                                  java.lang.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 Detail

    - #### 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 java.lang.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(java.lang.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 java.util.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(java.util.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 org.w3c.dom.Element encode(org.w3c.dom.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(org.w3c.dom.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(java.lang.Object aObject)

      Compare an instance of `EPPLoginSecEvent` with this instance.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - Object to compare with.
      Returns:
        `true` if equal; `false` otherwise.

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone an `EPPCodecComponent` instance.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of concrete `EPPLoginSecEvent`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### toString

          public java.lang.String toString()

      Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.