Class AbstractValidationState
- java.lang.Object
-
- org.jboss.as.domain.management.security.adduser.AbstractValidationState
-
- All Implemented Interfaces:
State
- Direct Known Subclasses:
ValidatePasswordState,ValidateUserState
public abstract class AbstractValidationState extends Object implements State
Where multiple stages of validation need to be performed thisStateprovides a way to coordinate ensuring each stage of the validation is performed. One instance of this state should be created when the validation begins and as each step passes this instance should be used as the next state. Should validation fail then the instance of this State should be discarded so that validation can commence from the beginning if alternative values are provided.- Author:
- Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description AbstractValidationState()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stateexecute()protected abstract StategetSuccessState()Get the state to transition to once all validation is complete.protected abstract Collection<State>getValidationStates()Get aCollectioncontaining all states required to perform the validation needed.
-
-
-
Method Detail
-
getValidationStates
protected abstract Collection<State> getValidationStates()
Get aCollectioncontaining all states required to perform the validation needed. On initialisation an Iterator will be created for this collection - each time this state is called the next state returned by the Iterator will be called to perform validation. Once the Iterator is exhausted the success state will be returned instead. If validation fails then it is expected that the individual validation states will transition away from this state, this is why there is no error or failure state.
-
getSuccessState
protected abstract State getSuccessState()
Get the state to transition to once all validation is complete.- Returns:
- The state to transition to once all validation is complete.
-
-