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 classEPPLoginSecPolicyEvent.EventErrorActionPossible list of event error action types.static classEPPLoginSecPolicyEvent.EventLevelPossible list of security event levels.static classEPPLoginSecPolicyEvent.EventTypePossible list of security event types.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEXML local name forEPPLoginSecPolicyEvent.static java.lang.StringELM_NAMEXML root tag forEPPLoginSecPolicyEvent.
-
Constructor Summary
Constructors Constructor Description EPPLoginSecPolicyEvent()EPPLoginSecPolicyEventdefault constructor.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, EPPLoginSecPolicyEvent.EventLevel aLevel)EPPLoginSecPolicyEventconstructor that takes the required type and an single level attributes.EPPLoginSecPolicyEvent(EPPLoginSecPolicyEvent.EventType aType, java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)EPPLoginSecPolicyEventconstructor 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)EPPLoginSecPolicyEventconstructor that takes all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLevel(EPPLoginSecPolicyEvent.EventLevel aLevel)Add a level to the list of levels.java.lang.Objectclone()CloneEPPLoginSecPolicyEventinstance.voiddecode(org.w3c.dom.Element aElement)Decode theEPPLoginSecPolicyEventelement aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPLoginSecPolicyEventinstance.booleanequals(java.lang.Object aObject)implements a deepEPPLoginSecPolicyEventcompare.EPPLoginSecPolicyEvent.EventErrorActiongetErrorAction()Gets the error action.java.lang.BooleangetExDate()Gets the OPTIONAL boolean element that indicates whether the event type includes a <loginSec:exDate> element with the default value offalse.java.lang.StringgetExPeriod()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.StringgetName()Gets the OPTIONAL event name value.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetPeriod()Gets the OPTIONAL period value, which indicates the period value that is associated with a warning event for a specific "stat" event.java.lang.IntegergetThreshold()Gets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.EPPLoginSecPolicyEvent.EventTypegetType()Gets the event type value.java.lang.StringgetWarningPeriod()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.booleanhasErrorAction()Is the error action defined?booleanhasExPeriod()Is the expiry period defined?booleanhasLevels()Is the level list defined?booleanhasName()Is the name defined?booleanhasPeriod()Is the period defined?booleanhasThreshold()Is the threshold defined?booleanhasType()Is the type defined?booleanhasWarningPeriod()Is the warning period defined?voidsetErrorAction(EPPLoginSecPolicyEvent.EventErrorAction aErrorAction)Sets the error action.voidsetExDate(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.voidsetExPeriod(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.voidsetLevels(java.util.List<EPPLoginSecPolicyEvent.EventLevel> aLevels)Sets the level list.voidsetName(java.lang.String aName)Sets the OPTIONAL event name value.voidsetPeriod(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.voidsetThreshold(java.lang.Integer aThreshold)Sets the OPTIONAL threshold value that triggers a warning event for a specific "stat" event.voidsetType(EPPLoginSecPolicyEvent.EventType aType)Sets the event type value.voidsetWarningPeriod(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.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.voidvalidateState()Validate the state of theEPPLoginSecPolicyEventinstance.
-
-
-
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()
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, java.util.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, 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)
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 Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPLoginSecPolicyEventinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPLoginSecPolicyEvent - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
validateState
public void validateState() throws EPPCodecExceptionValidate 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
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode 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
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPLoginSecPolicyEventelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decodeEPPLoginSecPolicyEventfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPLoginSecPolicyEventcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPLoginSecPolicyEventinstance to compare with- Returns:
trueif equal;falseotherwise
-
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.
-
hasType
public boolean hasType()
Is the type defined?- Returns:
trueif the type is defined;falseotherwise.
-
getType
public EPPLoginSecPolicyEvent.EventType getType()
Gets the event type value.- Returns:
EPPLoginSecPolicyEvent.EventTypeenumerated value if set;nullotherwise.
-
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:
trueif the name is defined;falseotherwise.
-
getName
public java.lang.String getName()
Gets the OPTIONAL event name value.- Returns:
- The event type name if defined;
nullotherwise.
-
setName
public void setName(java.lang.String aName)
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
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:
trueorfalseindicating 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-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
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;
nullotherwise.
-
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 tonullif undefined.
-
hasWarningPeriod
public boolean hasWarningPeriod()
Is the warning period defined?- Returns:
trueif the warning period is defined;falseotherwise.
-
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;
nullotherwise.
-
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 tonullif undefined.
-
hasErrorAction
public boolean hasErrorAction()
Is the error action defined?- Returns:
trueif the error action is defined;falseotherwise.
-
getErrorAction
public EPPLoginSecPolicyEvent.EventErrorAction getErrorAction()
Gets the error action.- Returns:
- The error action if defined;
nullotherwise.
-
setErrorAction
public void setErrorAction(EPPLoginSecPolicyEvent.EventErrorAction aErrorAction)
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
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;
nullotherwise.
-
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 tonullif undefined.
-
hasPeriod
public boolean hasPeriod()
Is the period defined?- Returns:
trueif the period is defined;falseotherwise.
-
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;
nullotherwise.
-
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 tonullif undefined.
-
-