Class OtpFieldTemplate<F extends OtpField,O>
java.lang.Object
org.bardframework.form.field.FieldTemplate<F>
org.bardframework.form.field.input.InputFieldTemplate<F,T>
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.InputFieldTemplate
descriptionShowType, persistentValue, valueProviderFields inherited from class org.bardframework.form.field.FieldTemplate
defaultValues, fieldClazz, log, name, showExpression -
Constructor Summary
ConstructorsConstructorDescriptionOtpFieldTemplate(String name, OtpGenerator<O> otpGenerator, int maxTryToResolveCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidintintprotected 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) voidsetCanEditIdentifier(Boolean canEditIdentifier) voidsetMaxSendCount(int maxSendCount) voidsetResendIntervalSeconds(Integer resendIntervalSeconds) Methods inherited from class org.bardframework.flow.form.field.input.FlowInputFieldTemplate
getActionProcessors, preProcess, setActionProcessorsMethods inherited from class org.bardframework.form.field.input.InputFieldTemplate
getDescriptionShowType, getValidationOrder, getValueProvider, isPersistentValue, setDescriptionShowType, setPersistentValue, setValueProvider, validate, validateMethods inherited from class org.bardframework.form.field.FieldTemplate
getDefaultValues, getEmptyField, getFieldClazz, getLog, getName, getShowExpression, mustShow, setDefaultValues, 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 classInputFieldTemplate<F extends OtpField,String>
-
getOtpGenerator
-
getMaxTryToResolveCount
public int getMaxTryToResolveCount() -
getMaxSendCount
public int getMaxSendCount() -
setMaxSendCount
public void setMaxSendCount(int maxSendCount) -
getResendIntervalSeconds
-
setResendIntervalSeconds
-
getCanEditIdentifier
-
setCanEditIdentifier
-