public class EPPLoginSecEvent extends java.lang.Object implements EPPCodecComponent
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.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 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. |
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 . |
public static final java.lang.String DEFAULT_LANG
public static final java.lang.String ELM_LOCALNAME
EPPLoginSecEvent
.public static final java.lang.String ELM_NAME
EPPLoginSecEvent
.public EPPLoginSecEvent()
EPPLoginSecEvent
.public EPPLoginSecEvent(EventType aType, EventLevel aLevel)
EPPLoginSecEvent
constructor that takes the required attributes of
type and level.aType
- Event typeaLevel
- Event levelpublic EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aDescription)
EPPLoginSecEvent
constructor that takes required attributes and a
description.aType
- Event typeaLevel
- Event levelaDescription
- Option description of event. Set to null
for no
description.public EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.util.Date aExDate, java.lang.String aDescription)
EPPLoginSecEvent
constructor that takes likely attributes for an
expiry event.aType
- Event typeaLevel
- Event levelaExDate
- Expiration date of eventaDescription
- Option description of event. Set to null
for no
description.public EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aValue, java.lang.String aDescription)
EPPLoginSecEvent
constructor that takes likely attribute for a
value event.aType
- Event typeaLevel
- Event levelaValue
- Value of eventaDescription
- Option description of event. Set to null
for no
description.public EPPLoginSecEvent(EventType aType, java.lang.String aTypeName, EventLevel aLevel, java.lang.String aDescription)
EPPLoginSecEvent
constructor that takes likely attributes for a
custom event.aType
- Event typeaTypeName
- Custom type nameaLevel
- Event levelaDescription
- Option description of event. Set to null
for no
description.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.aType
- Event typeaTypeName
- Statistical sub-type nameaLevel
- Event levelaValue
- Value of eventaDuration
- Duration of the eventaDescription
- Option description of event. Set to null
for no
description.public EventType getType()
null
otherwise.public void setType(EventType aType)
aType
- The type of the security eventpublic boolean hasTypeName()
true
if the type name is defined; false
otherwise.public java.lang.String getTypeName()
EventType.CUSTOM
, then the type name must be set.null
otherwise.public void setTypeName(java.lang.String aTypeName)
aTypeName
- Sub-type or custom type name of the event.public EventLevel getLevel()
null
otherwise.public void setLevel(EventLevel aLevel)
aLevel
- Level of the eventpublic boolean hasExDate()
true
if the expiration date is defined; false
otherwise.public java.util.Date getExDate()
null
otherwise.public void setExDate(java.util.Date aExDate)
aExDate
- Expiration date and time of the event itempublic boolean hasValue()
true
if the event value is defined; false
otherwise.public java.lang.String getValue()
null
otherwise.public void setValue(java.lang.String aValue)
aValue
- Event value to setpublic boolean hasDuration()
true
if the duration is defined; false
otherwise.public java.lang.String getDuration()
null
otherwise.public void setDuration(java.lang.String aDuration)
aDuration
- The duration to setpublic java.lang.String getLang()
DEFAULT_LANG
("en").public void setLang(java.lang.String aLang)
DEFAULT_LANG
("en").aLang
- Language of the descriptionpublic boolean hasDescription()
true
if the description is defined; false
otherwise.public java.lang.String getDescription()
getLang()
.null
otherwise.public void setDescription(java.lang.String aDescription)
setLang(String)
.aDescription
- The description to set.public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encode
in interface EPPCodecComponent
aDocument
- DOM Document, which acts is an Element factoryEPPEncodeException
- Error encoding EPPLoginSecEvent
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
aElement
argument represents the root DOM element and is used to
traverse the DOM nodes for instance attribute values.decode
in interface EPPCodecComponent
aElement
- Element
to decodeEPPDecodeException
- Error decoding Element
public boolean equals(java.lang.Object aObject)
EPPLoginSecEvent
with this instance.equals
in class java.lang.Object
aObject
- Object to compare with.true
if equal; false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPCodecComponent
instance.clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPLoginSecEvent
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic java.lang.String toString()
Object.toString
, which will result in an
indented XML String
representation of the concrete
EPPCodecComponent
.toString
in class java.lang.Object
String
if successful; ERROR
otherwise.public java.lang.String getNamespace()
EPPCodecComponent
.getNamespace
in interface EPPCodecComponent
EPPCodecComponent
.