Class EPPLoginSecEvent
- java.lang.Object
-
- com.verisign.epp.codec.loginsec.v1_0.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 manyEPPLoginSecEvent
instances in theEPPLoginSecData
extension to theEPPResponse
. TheEPPLoginSecEvent
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 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 forEPPLoginSecEvent
.static java.lang.String
ELM_NAME
XML root tag forEPPLoginSecEvent
.
-
Constructor Summary
Constructors Constructor Description EPPLoginSecEvent()
Default constructor forEPPLoginSecEvent
.EPPLoginSecEvent(EventType aType, EventLevel aLevel)
EPPLoginSecEvent
constructor that takes the required attributes of type and level.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, EventLevel aLevel, java.util.Date aExDate, java.lang.String aDescription)
EPPLoginSecEvent
constructor that takes likely attributes for an expiry 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 Description java.lang.Object
clone()
Clone anEPPCodecComponent
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 ofEPPLoginSecEvent
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 ofDEFAULT_LANG
("en").EventLevel
getLevel()
Gets the event level.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.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 ofDEFAULT_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 ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
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 forEPPLoginSecEvent
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPLoginSecEvent
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPLoginSecEvent
public EPPLoginSecEvent()
Default constructor forEPPLoginSecEvent
.
-
EPPLoginSecEvent
public EPPLoginSecEvent(EventType aType, EventLevel aLevel)
EPPLoginSecEvent
constructor that takes the required attributes of type and level.- Parameters:
aType
- Event typeaLevel
- 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 typeaLevel
- Event levelaDescription
- Option description of event. Set tonull
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 typeaLevel
- Event levelaExDate
- Expiration date of eventaDescription
- Option description of event. Set tonull
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 typeaLevel
- Event levelaValue
- Value of eventaDescription
- Option description of event. Set tonull
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 typeaTypeName
- Custom type nameaLevel
- Event levelaDescription
- Option description of event. Set tonull
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 typeaTypeName
- Statistical sub-type nameaLevel
- Event levelaValue
- Value of eventaDuration
- Duration of the eventaDescription
- Option description of event. Set tonull
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 toEventType.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 ofDEFAULT_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 ofDEFAULT_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 bygetLang()
.- 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 usingsetLang(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 interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException
- Error encodingEPPLoginSecEvent
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPLoginSecEvent
with this instance.- Overrides:
equals
in classjava.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 anEPPCodecComponent
instance.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of concrete
EPPLoginSecEvent
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-