Interface IValidator


public interface IValidator
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
     
    default List<String>
    This validator is only used if the path {weapon title}.{getAllowedPaths()} matches fully.
     
    default boolean
    shouldValidate(me.deecaad.core.file.SerializeData data)
    After the getKeyword() check, this check can be customized by the validator in order to "fine tune" when a validator should be automatically used.
    void
    validate(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

      default List<String> 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 the getKeyword() 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, see SerializeData.
      Throws:
      me.deecaad.core.file.SerializerException