Class ValidatingFileSetMember

java.lang.Object
net.sf.basedb.util.fileset.ValidatingFileSetMember

public class ValidatingFileSetMember extends Object
This class is a proxy used for holding information about a file set member that is currently undergoing validation.
Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-05-06 14:09:13 +0200 (fr, 06 maj 2011) $
  • Field Details

    • member

      private final FileSetMember member
    • hasBeenAccepted

      private boolean hasBeenAccepted
    • isValidSoFar

      private boolean isValidSoFar
    • message

      private String message
  • Constructor Details

    • ValidatingFileSetMember

      public ValidatingFileSetMember(FileSetMember member)
      Create a new instance for the given real member file.
  • Method Details

    • getMember

      public FileSetMember getMember()
      Get the file set member that this proxy represents.
    • hasBeenAccepted

      public boolean hasBeenAccepted()
      Has this member been accepted for validation by at least one validator? When the validation has ended, the core will update the validation status only for members that was accepted at least once.
    • isValidSoFar

      public boolean isValidSoFar()
      Is the member considered valid so far in the validation process? Members that has been marked as invalid by a validator will not be processed by other validators.
    • getMessage

      public String getMessage()
      Get the error message if the file failed validation.
    • isAcceptedByValidator

      public Accept isAcceptedByValidator(ValidationAction action)
      Check if the member is accepted by the given validator. Members that have already been validated and marked as invalid will never be accepted by other actions.
      Parameters:
      action - The next validation action
      Returns:
      An Accept value or null if the file wasn't accepted
    • setResult

      public void setResult(boolean isValid, String message)
      Set the result of the validation for this file.
      Parameters:
      isValid - TRUE if the file passed validation
      message - A message about the validation