Class EPPLoginSecPolicyEvent
java.lang.Object
com.verisign.epp.codec.loginsecpolicy.v04.EPPLoginSecPolicyEvent
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPossible list of event error action types.static enumPossible list of security event levels.static enumPossible list of security event types. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEPPLoginSecPolicyEventdefault constructor.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, EPPLoginSecPolicyEvent.EventLevel aLevel) EPPLoginSecPolicyEventconstructor that takes the required type and an single level attributes.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, List<EPPLoginSecPolicyEvent.EventLevel> aLevels) EPPLoginSecPolicyEventconstructor that takes the required type and levels attributes.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, List<EPPLoginSecPolicyEvent.EventLevel> aLevels, String aName, Boolean aExDate, String aExPeriod, String aWarningPeriod, EPPLoginSecPolicyEvent.EventErrorAction aErrorAction, Integer aThreshold, String aPeriod) EPPLoginSecPolicyEventconstructor that takes all attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a level to the list of levels.clone()CloneEPPLoginSecPolicyEventinstance.voidDecode theEPPLoginSecPolicyEventelement aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPLoginSecPolicyEventinstance.booleanimplements a deepEPPLoginSecPolicyEventcompare.Gets the error action.Gets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse.Gets the OPTIONAL expiry period value, which identifies the duration that the event type must be set using the XML schema "duration" type.Gets the level list.getName()Gets the OPTIONAL event name value.Returns the XML namespace associated with theEPPCodecComponent.Gets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event.Gets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.getType()Gets the event type value.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.booleanIs the error action defined?booleanIs the expiry period defined?booleanIs the level list defined?booleanhasName()Is the name defined?booleanIs the period defined?booleanIs the threshold defined?booleanhasType()Is the type defined?booleanIs the warning period defined?voidsetErrorAction(EPPLoginSecPolicyEvent.EventErrorAction aErrorAction) Sets the error action.voidSets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse.voidsetExPeriod(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.voidsetLevels(List<EPPLoginSecPolicyEvent.EventLevel> aLevels) Sets the level list.voidSets the OPTIONAL event name value.voidSets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event.voidsetThreshold(Integer aThreshold) Sets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.voidSets the event type value.voidsetWarningPeriod(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.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.voidValidate the state of theEPPLoginSecPolicyEventinstance.
-
Field Details
-
ELM_LOCALNAME
XML local name forEPPLoginSecPolicyEvent.- See Also:
-
ELM_NAME
XML root tag forEPPLoginSecPolicyEvent.- See Also:
-
-
Constructor Details
-
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent()EPPLoginSecPolicyEventdefault constructor. At least one level must be defined period to callingencode(Document). -
EPPLoginSecPolicyEvent
public EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, EPPLoginSecPolicyEvent.EventLevel aLevel) EPPLoginSecPolicyEventconstructor 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, List<EPPLoginSecPolicyEvent.EventLevel> aLevels) EPPLoginSecPolicyEventconstructor 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, List<EPPLoginSecPolicyEvent.EventLevel> aLevels, String aName, Boolean aExDate, String aExPeriod, String aWarningPeriod, EPPLoginSecPolicyEvent.EventErrorAction aErrorAction, Integer aThreshold, String aPeriod) EPPLoginSecPolicyEventconstructor 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 tonullif undefined.aExDate- OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with a default value offalse. Set tonullwill set the default.aExPeriod- OPTIONAL duration element that the event type must be reset. Set tonullif undefined.aWarningPeriod- OPTIONAL duration element that indicates how long prior to expiry the server will include a warning event. Set tonullif undefined.aErrorAction- OPTIONAL indication of what action will occur with an error Set tonullif undefined.aThreshold- OPTIONAL threshold value that triggers a warning event for a specific "stat" event. Set tonullif undefined.aPeriod- OPTIONAL period value that is associated with a warning event for a specific "stat" event. Set tonullif undefined.
-
-
Method Details
-
clone
CloneEPPLoginSecPolicyEventinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPLoginSecPolicyEvent - Throws:
CloneNotSupportedException- standard Object.clone exception
-
validateState
Validate the state of theEPPLoginSecPolicyEventinstance. 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, theEPPCodecExceptionwill 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
Encode a DOM Element tree from the attributes of theEPPLoginSecPolicyEventinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPLoginSecPolicyEventinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPLoginSecPolicyEventinstance.
-
decode
Decode theEPPLoginSecPolicyEventelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decodeEPPLoginSecPolicyEventfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
equals
implements a deepEPPLoginSecPolicyEventcompare. -
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
hasType
public boolean hasType()Is the type defined?- Returns:
trueif the type is defined;falseotherwise.
-
getType
Gets the event type value.- Returns:
EPPLoginSecPolicyEvent.EventTypeenumerated value if set;nullotherwise.
-
setType
Sets the event type value.- Parameters:
aType- Sets the event type value.
-
hasName
public boolean hasName()Is the name defined?- Returns:
trueif the name is defined;falseotherwise.
-
getName
Gets the OPTIONAL event name value.- Returns:
- The event type name if defined;
nullotherwise.
-
setName
Sets the OPTIONAL event name value.- Parameters:
aName- Event type name. Set tonullif undefined.
-
hasLevels
public boolean hasLevels()Is the level list defined?- Returns:
trueif the level list is defined;falseotherwise.
-
getLevels
Gets the level list.- Returns:
- Level list
-
setLevels
Sets the level list.- Parameters:
aLevels- List of levels.
-
addLevel
Add a level to the list of levels.- Parameters:
aLevel- Level to add to the list of levels.
-
getExDate
Gets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse.- Returns:
trueorfalseindicating whether the event type includes a <loginSec:exDate> element.
-
setExDate
Sets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse.- Parameters:
aExDate-trueorfalseindicating whether the server event type includes a <loginSec:exDate> element. Ifnullis passed, the default value offalsewill be set.
-
hasExPeriod
public boolean hasExPeriod()Is the expiry period defined?- Returns:
trueif the expiry period is defined;falseotherwise.
-
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;
nullotherwise.
-
setExPeriod
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 tonullif undefined.
-
hasWarningPeriod
public boolean hasWarningPeriod()Is the warning period defined?- Returns:
trueif the warning period is defined;falseotherwise.
-
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;
nullotherwise.
-
setWarningPeriod
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 tonullif undefined.
-
hasErrorAction
public boolean hasErrorAction()Is the error action defined?- Returns:
trueif the error action is defined;falseotherwise.
-
getErrorAction
Gets the error action.- Returns:
- The error action if defined;
nullotherwise.
-
setErrorAction
Sets the error action.- Parameters:
aErrorAction- Action that will occur with an error. Set tonullif undefined.
-
hasThreshold
public boolean hasThreshold()Is the threshold defined?- Returns:
trueif the threshold is defined;falseotherwise.
-
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;
nullotherwise.
-
setThreshold
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 tonullif undefined.
-
hasPeriod
public boolean hasPeriod()Is the period defined?- Returns:
trueif the period is defined;falseotherwise.
-
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;
nullotherwise.
-
setPeriod
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 tonullif undefined.
-