public class DataFileValidator extends BasicNodeValidator<FileSetMember>
FileStoreEnabled
item as it's parent (if there
are more than one file) or as an immediate child node to
it's parent item (if there is only one file).
Validation rules:
Validator.DENIED_FILE
Validator.DENIED_DATAFILETYPE
Validator.DATAFILE_INVALID
Validator.DATAFILE_NOTVALIDATED
Validator.DATAFILE_INVALID_ITEM
Validator.DATAFILE_NOTPLATFORM
Validator.DATAFILE_TOOMANYFILES
Validator.MISSING_DATAFILE
Constructor and Description |
---|
DataFileValidator() |
Modifier and Type | Method and Description |
---|---|
protected Fix |
getMissingItemFix(DbControl dc,
Node parentNode)
Subclasses should override this method if they have a suggessted fix
for a missing item problem.
|
void |
postValidate(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Do nothing.
|
void |
postValidateFolder(DbControl dc,
OverviewContext context,
Node folderNode,
Node parentNode)
Do nothing.
|
getDeniedItemFix, postDeniedItem, postMissingItem, preDeniedItem, preMissingItem, preValidate
public void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
BasicNodeValidator
postValidate
in interface NodeValidator<FileSetMember>
postValidate
in class BasicNodeValidator<FileSetMember>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents itemparentNode
- The parent node that is linked with the itemprotected Fix getMissingItemFix(DbControl dc, Node parentNode)
BasicNodeValidator
new Fix("Add item to parent", parentNode.getItem())
getMissingItemFix
in class BasicNodeValidator<FileSetMember>
public void postValidateFolder(DbControl dc, OverviewContext context, Node folderNode, Node parentNode)
BasicNodeValidator
postValidateFolder
in interface NodeValidator<FileSetMember>
postValidateFolder
in class BasicNodeValidator<FileSetMember>
dc
- A DbControl to use for database accesscontext
- The current overview contextfolderNode
- The folder node, or null if no folder has been createdparentNode
- The parent node (never null)