Class EPPLoginSecPolicyEvent
- java.lang.Object
-
- com.verisign.epp.codec.loginsecpolicy.v04.EPPLoginSecPolicyEvent
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPLoginSecPolicyEvent extends java.lang.Object implements EPPCodecComponent
This class is encoded into the <loginSecPolicy:event> element that represents the policies of an individual login security event (warning or error). The <loginSecPolicy:event> element contains the following child elements:
- <loginSecPolicy:level> - One or two <loginSecPolicy:level> elements that indicate the possible set of event levels ("warning" or "error") the server will return to the client for the event type.
- <loginSecPolicy:exDate> - OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value of "0" (or "false").
- <loginSecPolicy:exPeriod> - OPTIONAL duration element that the event type must be reset. For example, the password will expire 30 days after being set.
- <loginSecPolicy:warningPeriod> - OPTIONAL duration element that indicates how long prior to expiry the server will include a warning event. For example, the server will include a password expiry warning event 15 days prior to expiry.
- <loginSecPolicy:exError> - OPTIONAL indication of what will error will occur at expiry.
- <loginSecPolicy:threshold> - OPTIONAL threshold value that triggers a warning event for a specific "stat" event. For example, a "failedLogins" "stat" warning event will occur if the number of failed logins exceeds 100.
- <loginSecPolicy:period> - OPTIONAL period value that is associated with a warning event for a specific "stat" event.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPPLoginSecPolicyEvent.EventErrorAction
Possible list of event error action types.static class
EPPLoginSecPolicyEvent.EventLevel
Possible list of security event levels.static class
EPPLoginSecPolicyEvent.EventType
Possible list of security event types.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPLoginSecPolicyEvent
.static java.lang.String
ELM_NAME
XML root tag forEPPLoginSecPolicyEvent
.
-
Constructor Summary
Constructors Constructor Description EPPLoginSecPolicyEvent()
EPPLoginSecPolicyEvent
default constructor.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, EPPLoginSecPolicyEvent.EventLevel aLevel)
EPPLoginSecPolicyEvent
constructor that takes the required type and an single level attributes.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)
EPPLoginSecPolicyEvent
constructor that takes the required type and levels attributes.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels, java.lang.String aName, java.lang.Boolean aExDate, java.lang.String aExPeriod, java.lang.String aWarningPeriod, EPPLoginSecPolicyEvent.EventErrorAction aErrorAction, java.lang.Integer aThreshold, java.lang.String aPeriod)
EPPLoginSecPolicyEvent
constructor that takes all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLevel(EPPLoginSecPolicyEvent.EventLevel aLevel)
Add a level to the list of levels.java.lang.Object
clone()
CloneEPPLoginSecPolicyEvent
instance.void
decode(org.w3c.dom.Element aElement)
Decode theEPPLoginSecPolicyEvent
element aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPLoginSecPolicyEvent
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPLoginSecPolicyEvent
compare.EPPLoginSecPolicyEvent.EventErrorAction
getErrorAction()
Gets the error action.java.lang.Boolean
getExDate()
Gets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse
.java.lang.String
getExPeriod()
Gets the OPTIONAL expiry period value, which identifies the duration that the event type must be set using the XML schema "duration" type.java.util.List<EPPLoginSecPolicyEvent.EventLevel>
getLevels()
Gets the level list.java.lang.String
getName()
Gets the OPTIONAL event name value.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getPeriod()
Gets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event.java.lang.Integer
getThreshold()
Gets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.EPPLoginSecPolicyEvent.EventType
getType()
Gets the event type value.java.lang.String
getWarningPeriod()
Gets the OPTIONAL warning period value, which indicates how long prior to expiry the server will include a warning event using the XML schema "duration" type.boolean
hasErrorAction()
Is the error action defined?boolean
hasExPeriod()
Is the expiry period defined?boolean
hasLevels()
Is the level list defined?boolean
hasName()
Is the name defined?boolean
hasPeriod()
Is the period defined?boolean
hasThreshold()
Is the threshold defined?boolean
hasType()
Is the type defined?boolean
hasWarningPeriod()
Is the warning period defined?void
setErrorAction(EPPLoginSecPolicyEvent.EventErrorAction aErrorAction)
Sets the error action.void
setExDate(java.lang.Boolean aExDate)
Sets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse
.void
setExPeriod(java.lang.String aExPeriod)
Sets the OPTIONAL expiry period value, which identifies the duration that the event type must be set using the XML schema "duration" type.void
setLevels(java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)
Sets the level list.void
setName(java.lang.String aName)
Sets the OPTIONAL event name value.void
setPeriod(java.lang.String aPeriod)
Sets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event.void
setThreshold(java.lang.Integer aThreshold)
Sets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.void
setType(EPPLoginSecPolicyEvent.EventType aType)
Sets the event type value.void
setWarningPeriod(java.lang.String aWarningPeriod)
Sets the OPTIONAL warning period value, which indicates how long prior to expiry the server will include a warning event using the XML schema "duration" type.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.void
validateState()
Validate the state of theEPPLoginSecPolicyEvent
instance.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPLoginSecPolicyEvent
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPLoginSecPolicyEvent
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent()
EPPLoginSecPolicyEvent
default constructor. At least one level must be defined period to callingencode(Document)
.
-
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, EPPLoginSecPolicyEvent.EventLevel aLevel)
EPPLoginSecPolicyEvent
constructor that takes the required type and an single level attributes.- Parameters:
aType
- Event typeaLevel
- Single event level the server will return
-
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)
EPPLoginSecPolicyEvent
constructor that takes the required type and levels attributes.- Parameters:
aType
- Event typeaLevels
- Possible set of event levels the server will return
-
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels, java.lang.String aName, java.lang.Boolean aExDate, java.lang.String aExPeriod, java.lang.String aWarningPeriod, EPPLoginSecPolicyEvent.EventErrorAction aErrorAction, java.lang.Integer aThreshold, java.lang.String aPeriod)
EPPLoginSecPolicyEvent
constructor that takes all attributes.- Parameters:
aType
- Event typeaLevels
- Possible set of event levels the server will returnaName
- OPTIONAL custom event type or specific statistical event. Set tonull
if undefined.aExDate
- OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with a default value offalse
. Set tonull
will set the default.aExPeriod
- OPTIONAL duration element that the event type must be reset. Set tonull
if undefined.aWarningPeriod
- OPTIONAL duration element that indicates how long prior to expiry the server will include a warning event. Set tonull
if undefined.aErrorAction
- OPTIONAL indication of what action will occur with an error Set tonull
if undefined.aThreshold
- OPTIONAL threshold value that triggers a warning event for a specific "stat" event. Set tonull
if undefined.aPeriod
- OPTIONAL period value that is associated with a warning event for a specific "stat" event. Set tonull
if undefined.
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPLoginSecPolicyEvent
instance.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPLoginSecPolicyEvent
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
validateState
public void validateState() throws EPPCodecException
Validate the state of theEPPLoginSecPolicyEvent
instance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, theEPPCodecException
will contain a description of the error. throws EPPCodecException State error. This will contain the name of the attribute that is not valid.- Throws:
EPPCodecException
- On invalid state
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPLoginSecPolicyEvent
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPLoginSecPolicyEvent
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPLoginSecPolicyEvent
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPLoginSecPolicyEvent
element aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- - Root DOM Element to decodeEPPLoginSecPolicyEvent
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPLoginSecPolicyEvent
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPLoginSecPolicyEvent
instance to compare with- Returns:
true
if equal;false
otherwise
-
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
.
-
hasType
public boolean hasType()
Is the type defined?- Returns:
true
if the type is defined;false
otherwise.
-
getType
public EPPLoginSecPolicyEvent.EventType getType()
Gets the event type value.- Returns:
EPPLoginSecPolicyEvent.EventType
enumerated value if set;null
otherwise.
-
setType
public void setType(EPPLoginSecPolicyEvent.EventType aType)
Sets the event type value.- Parameters:
aType
- Sets the event type value.
-
hasName
public boolean hasName()
Is the name defined?- Returns:
true
if the name is defined;false
otherwise.
-
getName
public java.lang.String getName()
Gets the OPTIONAL event name value.- Returns:
- The event type name if defined;
null
otherwise.
-
setName
public void setName(java.lang.String aName)
Sets the OPTIONAL event name value.- Parameters:
aName
- Event type name. Set tonull
if undefined.
-
hasLevels
public boolean hasLevels()
Is the level list defined?- Returns:
true
if the level list is defined;false
otherwise.
-
getLevels
public java.util.List<EPPLoginSecPolicyEvent.EventLevel> getLevels()
Gets the level list.- Returns:
- Level list
-
setLevels
public void setLevels(java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)
Sets the level list.- Parameters:
aLevels
- List of levels.
-
addLevel
public void addLevel(EPPLoginSecPolicyEvent.EventLevel aLevel)
Add a level to the list of levels.- Parameters:
aLevel
- Level to add to the list of levels.
-
getExDate
public java.lang.Boolean getExDate()
Gets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse
.- Returns:
true
orfalse
indicating whether the event type includes a <loginSec:exDate> element.
-
setExDate
public void setExDate(java.lang.Boolean aExDate)
Sets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse
.- Parameters:
aExDate
-true
orfalse
indicating whether the server event type includes a <loginSec:exDate> element. Ifnull
is passed, the default value offalse
will be set.
-
hasExPeriod
public boolean hasExPeriod()
Is the expiry period defined?- Returns:
true
if the expiry period is defined;false
otherwise.
-
getExPeriod
public java.lang.String getExPeriod()
Gets the OPTIONAL expiry period value, which identifies the duration that the event type must be set using the XML schema "duration" type. An example is a value of "P90D" for define 90 days.- Returns:
- expiry period if defined;
null
otherwise.
-
setExPeriod
public void setExPeriod(java.lang.String aExPeriod)
Sets the OPTIONAL expiry period value, which identifies the duration that the event type must be set using the XML schema "duration" type. An example is a value of "P90D" for define 90 days.- Parameters:
aExPeriod
- Expiry period using the XML schema "duration" type. Set tonull
if undefined.
-
hasWarningPeriod
public boolean hasWarningPeriod()
Is the warning period defined?- Returns:
true
if the warning period is defined;false
otherwise.
-
getWarningPeriod
public java.lang.String getWarningPeriod()
Gets the OPTIONAL warning period value, which indicates how long prior to expiry the server will include a warning event using the XML schema "duration" type. An example is a value of "P15D" for define 15 days.- Returns:
- warning period if defined;
null
otherwise.
-
setWarningPeriod
public void setWarningPeriod(java.lang.String aWarningPeriod)
Sets the OPTIONAL warning period value, which indicates how long prior to expiry the server will include a warning event using the XML schema "duration" type. An example is a value of "P15D" for define 15 days.- Parameters:
aWarningPeriod
- Warning period using the XML schema "duration" type. Set tonull
if undefined.
-
hasErrorAction
public boolean hasErrorAction()
Is the error action defined?- Returns:
true
if the error action is defined;false
otherwise.
-
getErrorAction
public EPPLoginSecPolicyEvent.EventErrorAction getErrorAction()
Gets the error action.- Returns:
- The error action if defined;
null
otherwise.
-
setErrorAction
public void setErrorAction(EPPLoginSecPolicyEvent.EventErrorAction aErrorAction)
Sets the error action.- Parameters:
aErrorAction
- Action that will occur with an error. Set tonull
if undefined.
-
hasThreshold
public boolean hasThreshold()
Is the threshold defined?- Returns:
true
if the threshold is defined;false
otherwise.
-
getThreshold
public java.lang.Integer getThreshold()
Gets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.- Returns:
- Threshold value that triggers a warning event for a specific
"stat" event if defined;
null
otherwise.
-
setThreshold
public void setThreshold(java.lang.Integer aThreshold)
Sets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.- Parameters:
aThreshold
- Threshold value that triggers a warning event for a specific "stat" event. Set tonull
if undefined.
-
hasPeriod
public boolean hasPeriod()
Is the period defined?- Returns:
true
if the period is defined;false
otherwise.
-
getPeriod
public java.lang.String getPeriod()
Gets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event. using the XML schema "duration" type. An example is a value of "P1D" for define 1 day.- Returns:
- period if defined;
null
otherwise.
-
setPeriod
public void setPeriod(java.lang.String aPeriod)
Sets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event. using the XML schema "duration" type. An example is a value of "P1D" for define 1 day.- Parameters:
aPeriod
- Period value, which indicates the period value that is associated with a warning event for a specific "stat" event. using the XML schema "duration" type. Set tonull
if undefined.
-
-