Class PlatformValidator
java.lang.Object
net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
net.sf.basedb.util.overview.validator.NameableNodeValidator<Platform>
net.sf.basedb.util.overview.validator.PlatformValidator
- All Implemented Interfaces:
NodeValidator<Platform>
Validator implementation for platforms/variants. Validation rules:
- Access denied:
Validator.DENIED_PLATFORM
- Non-default platform:
Validator.NONDEFAULT_PLATFORM
- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date: 2011-10-18 13:46:59 +0200 (ti, 18 okt 2011) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) Checks if the platform is the same as the default for the project.Methods inherited from class net.sf.basedb.util.overview.validator.BasicNodeValidator
getDeniedItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preMissingItem, preValidate
-
Constructor Details
-
PlatformValidator
public PlatformValidator()
-
-
Method Details
-
postValidate
Checks if the platform is the same as the default for the project.- Specified by:
postValidate
in interfaceNodeValidator<Platform>
- Overrides:
postValidate
in classNameableNodeValidator<Platform>
- Parameters:
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 item
-
getMissingItemFix
Description copied from class:BasicNodeValidator
Subclasses should override this method if they have a suggessted fix for a missing item problem. The default implementation does nothing, but the following template may be usable by most subclasses:new Fix("Add item to parent", parentNode.getItem())
- Specified by:
getMissingItemFix
in classBasicNodeValidator<Platform>
- Returns:
- Always null
-