Package net.sf.basedb.util.fileset
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 Summary
Fields Modifier and Type Field Description private boolean
hasBeenAccepted
private boolean
isValidSoFar
private FileSetMember
member
private String
message
-
Constructor Summary
Constructors Constructor Description ValidatingFileSetMember(FileSetMember member)
Create a new instance for the given real member file. -
Method Summary
Modifier and Type Method Description FileSetMember
getMember()
Get the file set member that this proxy represents.String
getMessage()
Get the error message if the file failed validation.boolean
hasBeenAccepted()
Has this member been accepted for validation by at least one validator?Accept
isAcceptedByValidator(ValidationAction action)
Check if the member is accepted by the given validator.boolean
isValidSoFar()
Is the member considered valid so far in the validation process?void
setResult(boolean isValid, String message)
Set the result of the validation for this file.
-
Field Details
-
member
-
hasBeenAccepted
private boolean hasBeenAccepted -
isValidSoFar
private boolean isValidSoFar -
message
-
-
Constructor Details
-
ValidatingFileSetMember
Create a new instance for the given real member file.
-
-
Method Details
-
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
Get the error message if the file failed validation. -
isAcceptedByValidator
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
Set the result of the validation for this file.- Parameters:
isValid
- TRUE if the file passed validationmessage
- A message about the validation
-