Package me.deecaad.core.file
Interface IValidator
public interface IValidator
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandenyKeys()This validator is only used if the path {weapon title}.{getAllowedPaths()} matches fully.default booleanshouldValidate(me.deecaad.core.file.SerializeData data) After thegetKeyword()check, this check can be customized by the validator in order to "fine tune" when a validator should be automatically used.voidvalidate(me.deecaad.core.file.Configuration configuration, me.deecaad.core.file.SerializeData data) This is used to validate configurations which can't be used as serializers.
-
Method Details
-
denyKeys
default boolean denyKeys() -
getKeyword
String getKeyword()- Returns:
- keyword of this validator used in configurations
-
getAllowedPaths
This validator is only used if the path {weapon title}.{getAllowedPaths()} matches fully.- Returns:
- The nullable allowed paths
-
shouldValidate
default boolean shouldValidate(me.deecaad.core.file.SerializeData data) After thegetKeyword()check, this check can be customized by the validator in order to "fine tune" when a validator should be automatically used.- Parameters:
data- The config information.- Returns:
- true if the validator should be used.
-
validate
void validate(me.deecaad.core.file.Configuration configuration, me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException This is used to validate configurations which can't be used as serializers. This validation process should be done after the serialization.- Parameters:
configuration- the global configuration object.data- Config wrapper, seeSerializeData.- Throws:
me.deecaad.core.file.SerializerException
-