Class OtpFieldTemplate<F extends OtpField,O>
java.lang.Object
org.bardframework.form.field.FieldTemplate<F>
org.bardframework.form.field.input.InputFieldTemplateAbstract<F,String>
org.bardframework.flow.form.field.input.FlowInputFieldTemplate<F,String>
org.bardframework.flow.form.field.input.otp.OtpFieldTemplate<F,O>
- Direct Known Subclasses:
CaptchaFieldTemplate,EotpFieldTemplate,SotpFieldTemplate,TotpFieldTemplate
public abstract class OtpFieldTemplate<F extends OtpField,O>
extends FlowInputFieldTemplate<F,String>
-
Field Summary
Fields inherited from class org.bardframework.flow.form.field.input.FlowInputFieldTemplate
actionProcessorsFields inherited from class org.bardframework.form.field.input.InputFieldTemplateAbstract
disableExpression, persistentValue, valueProviderFields inherited from class org.bardframework.form.field.FieldTemplate
defaultValue, fieldClazz, log, name, showExpression -
Constructor Summary
ConstructorsConstructorDescriptionOtpFieldTemplate(String name, OtpGenerator<O> otpGenerator, int maxTryToResolveCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract Stringprotected abstract Stringprotected abstract Stringfinal booleanprotected abstract booleanvoidresend(String flowToken, Map<String, String> flowData, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) protected abstract voidsend(String flowToken, Map<String, String> flowData, O otp, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) protected voidsendInternal(String flowToken, Map<String, String> flowData, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) Methods inherited from class org.bardframework.flow.form.field.input.FlowInputFieldTemplate
preProcessMethods inherited from class org.bardframework.form.field.input.InputFieldTemplateAbstract
getDisableExpression, getValidationOrder, getValueProvider, isPersistentValue, setDisableExpression, setPersistentValue, setValueProvider, validate, validateMethods inherited from class org.bardframework.form.field.FieldTemplate
getDefaultValue, getEmptyField, getFieldClazz, getLog, getName, getShowExpression, mustShow, setDefaultValue, setLog, setShowExpression, toField
-
Constructor Details
-
OtpFieldTemplate
-
-
Method Details
-
getResendAction
-
send
protected abstract void send(String flowToken, Map<String, String> flowData, O otp, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception- Throws:
Exception
-
isValidOtp
protected abstract boolean isValidOtp(String flowToken, String otp, Map<String, String> flowData) throws Exception- Throws:
Exception
-
isValid
-
fill
-
sendInternal
protected void sendInternal(String flowToken, Map<String, String> flowData, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception- Throws:
Exception
-
resend
public void resend(String flowToken, Map<String, String> flowData, Locale locale, jakarta.servlet.http.HttpServletResponse httpResponse) throws Exception- Throws:
Exception
-
toValue
- Specified by:
toValuein classInputFieldTemplateAbstract<F extends OtpField,String>
-
getOtpMaxTryToResolveCountErrorMessage
-
getMaxSendCountErrorMessage
-