Class FixedFileFieldBasicValidator
- java.lang.Object
-
- org.fugerit.java.core.cfg.helpers.AbstractConfigurableObject
-
- org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
-
- org.fugerit.java.core.fixed.parser.FixedFileFieldBasicValidator
-
- All Implemented Interfaces:
Serializable
,ConfigurableObject
,FixedFileFieldValidator
,LogObject
- Direct Known Subclasses:
FixedFileFieldDateValidator
,FixedFileFieldRegexValidator
public abstract class FixedFileFieldBasicValidator extends XMLConfigurableObject implements FixedFileFieldValidator
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATT_NAME_ID
static String
ATT_NAME_LOCALE
static String
ATT_NAME_REGEX
static String
ATT_NAME_REQUIRED
static String
DEFAULT_BUNDLE_PATH
protected static org.slf4j.Logger
logger
-
Fields inherited from class org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
DO_NOTHING
-
-
Constructor Summary
Constructors Constructor Description FixedFileFieldBasicValidator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract FixedFileFieldValidationResult
checkField(String fieldLabel, String fieldValue, int rowNumber, int colNumber)
protected FixedFileFieldValidationResult
checkRequired(String fieldLabel, String fieldValue, int rowNumber, int colNumber)
abstract void
configure(Element tag)
Configure the object.protected void
configure(Element tag, String bundlePath)
protected String
defaultFormatMessage(String errorKey, String fieldLabel, String fieldValue, int rowNumber, int colNumber, String addInfo)
ResourceBundle
getBundle()
String
getId()
boolean
isRequired()
static String
messageFormatWorker(ResourceBundle bundle, String errorKey, String fieldLabel, String fieldValue, int rowNumber, int colNumber, String addInfo)
static ResourceBundle
newBundle(String locale)
static ResourceBundle
newBundle(String bundlePath, String locale)
-
Methods inherited from class org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
configure, newXMLConfigurableObject
-
Methods inherited from class org.fugerit.java.core.cfg.helpers.AbstractConfigurableObject
configureProperties, configureXML, getLogger, setConfigProvider
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fugerit.java.core.cfg.ConfigurableObject
configure, configureProperties, configureXML
-
-
-
-
Field Detail
-
DEFAULT_BUNDLE_PATH
public static final String DEFAULT_BUNDLE_PATH
- See Also:
- Constant Field Values
-
logger
protected static final org.slf4j.Logger logger
-
ATT_NAME_ID
public static final String ATT_NAME_ID
- See Also:
- Constant Field Values
-
ATT_NAME_REGEX
public static final String ATT_NAME_REGEX
- See Also:
- Constant Field Values
-
ATT_NAME_LOCALE
public static final String ATT_NAME_LOCALE
- See Also:
- Constant Field Values
-
ATT_NAME_REQUIRED
public static final String ATT_NAME_REQUIRED
- See Also:
- Constant Field Values
-
-
Method Detail
-
newBundle
public static ResourceBundle newBundle(String locale)
-
messageFormatWorker
public static String messageFormatWorker(ResourceBundle bundle, String errorKey, String fieldLabel, String fieldValue, int rowNumber, int colNumber, String addInfo)
-
newBundle
public static ResourceBundle newBundle(String bundlePath, String locale)
-
isRequired
public boolean isRequired()
-
getId
public String getId()
-
getBundle
public ResourceBundle getBundle()
-
defaultFormatMessage
protected String defaultFormatMessage(String errorKey, String fieldLabel, String fieldValue, int rowNumber, int colNumber, String addInfo)
-
checkRequired
protected FixedFileFieldValidationResult checkRequired(String fieldLabel, String fieldValue, int rowNumber, int colNumber)
-
checkField
public abstract FixedFileFieldValidationResult checkField(String fieldLabel, String fieldValue, int rowNumber, int colNumber)
- Specified by:
checkField
in interfaceFixedFileFieldValidator
-
configure
protected void configure(Element tag, String bundlePath) throws ConfigException
- Throws:
ConfigException
-
configure
public abstract void configure(Element tag) throws ConfigException
Description copied from interface:ConfigurableObject
Configure the object.
- Specified by:
configure
in interfaceConfigurableObject
- Specified by:
configure
in classAbstractConfigurableObject
- Parameters:
tag
- The tag object to use for configuration.- Throws:
ConfigException
- If troubles arise during object configuration.
-
-