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 manyEPPLoginSecEventinstances in theEPPLoginSecDataextension to theEPPResponse. TheEPPLoginSecEventincludes 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.StringDEFAULT_LANGThe default language of the description, which is "en".static java.lang.StringELM_LOCALNAMEXML local name forEPPLoginSecEvent.static java.lang.StringELM_NAMEXML root tag forEPPLoginSecEvent.
-
Constructor Summary
Constructors Constructor Description EPPLoginSecEvent()Default constructor forEPPLoginSecEvent.EPPLoginSecEvent(EventType aType, EventLevel aLevel)EPPLoginSecEventconstructor that takes the required attributes of type and level.EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aDescription)EPPLoginSecEventconstructor that takes required attributes and a description.EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aValue, java.lang.String aDescription)EPPLoginSecEventconstructor that takes likely attribute for a value event.EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.util.Date aExDate, java.lang.String aDescription)EPPLoginSecEventconstructor that takes likely attributes for an expiry event.EPPLoginSecEvent(EventType aType, java.lang.String aTypeName, EventLevel aLevel, java.lang.String aDescription)EPPLoginSecEventconstructor 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)EPPLoginSecEventconstructor that takes likely attribute for a statistical event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Clone anEPPCodecComponentinstance.voiddecode(org.w3c.dom.Element aElement)Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode instance into a DOM element tree.booleanequals(java.lang.Object aObject)Compare an instance ofEPPLoginSecEventwith this instance.java.lang.StringgetDescription()Gets the optional description for the event.java.lang.StringgetDuration()Gets the optional duration associated with a statistical warning event.java.util.DategetExDate()Gets the optional expiration of the event item (e.g., password, client certificate).java.lang.StringgetLang()Gets the optional language of the description with the default ofDEFAULT_LANG("en").EventLevelgetLevel()Gets the event level.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.EventTypegetType()Gets the type for the security event.java.lang.StringgetTypeName()Gets the optional sub-type or the custom type name of the event.java.lang.StringgetValue()Gets the optional value associated with the event (e.g., cipher of an cipher event or TLS protocol of a TLS protocol event).booleanhasDescription()Is the description set?booleanhasDuration()Is the duration set?booleanhasExDate()Is the expiration date set?booleanhasTypeName()Is the type name (custom type or sub-type) set?booleanhasValue()Is the event value set?voidsetDescription(java.lang.String aDescription)Sets the optional description for the event.voidsetDuration(java.lang.String aDuration)Sets the optional duration associated with a statistical warning event.voidsetExDate(java.util.Date aExDate)Sets the optional expiration of the event item (e.g., password, client certificate).voidsetLang(java.lang.String aLang)Sets the optional language of the description with the default ofDEFAULT_LANG("en").voidsetLevel(EventLevel aLevel)Sets the event level.voidsetType(EventType aType)Sets the type of the security event.voidsetTypeName(java.lang.String aTypeName)Sets the optional sub-type or the custom type name of the event.voidsetValue(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.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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)
EPPLoginSecEventconstructor 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)
EPPLoginSecEventconstructor that takes required attributes and a description.- Parameters:
aType- Event typeaLevel- Event levelaDescription- Option description of event. Set tonullfor no description.
-
EPPLoginSecEvent
public EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.util.Date aExDate, java.lang.String aDescription)
EPPLoginSecEventconstructor that takes likely attributes for an expiry event.- Parameters:
aType- Event typeaLevel- Event levelaExDate- Expiration date of eventaDescription- Option description of event. Set tonullfor no description.
-
EPPLoginSecEvent
public EPPLoginSecEvent(EventType aType, EventLevel aLevel, java.lang.String aValue, java.lang.String aDescription)
EPPLoginSecEventconstructor that takes likely attribute for a value event.- Parameters:
aType- Event typeaLevel- Event levelaValue- Value of eventaDescription- Option description of event. Set tonullfor no description.
-
EPPLoginSecEvent
public EPPLoginSecEvent(EventType aType, java.lang.String aTypeName, EventLevel aLevel, java.lang.String aDescription)
EPPLoginSecEventconstructor that takes likely attributes for a custom event.- Parameters:
aType- Event typeaTypeName- Custom type nameaLevel- Event levelaDescription- Option description of event. Set tonullfor 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)
EPPLoginSecEventconstructor 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 tonullfor no description.
-
-
Method Detail
-
getType
public EventType getType()
Gets the type for the security event.- Returns:
- Type of the security event if set;
nullotherwise.
-
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:
trueif the type name is defined;falseotherwise.
-
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;
nullotherwise.
-
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;
nullotherwise.
-
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:
trueif the expiration date is defined;falseotherwise.
-
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;
nullotherwise.
-
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:
trueif the event value is defined;falseotherwise.
-
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;
nullotherwise.
-
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:
trueif the duration is defined;falseotherwise.
-
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;
nullotherwise.
-
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:
trueif the description is defined;falseotherwise.
-
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;
nullotherwise.
-
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 EPPEncodeExceptionEncode 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:
encodein 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 EPPDecodeExceptionDecode a DOM element tree to initialize the instance attributes. TheaElementargument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement-Elementto decode- Throws:
EPPDecodeException- Error decodingElement
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPLoginSecEventwith this instance.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionClone anEPPCodecComponentinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-