|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.project.validator.Validator
public class Validator
Validator is used to validate Cayenne projects.
Field Summary | |
---|---|
protected int |
maxSeverity
|
protected Project |
project
|
protected List<ValidationInfo> |
validationResults
|
Constructor Summary | |
---|---|
Validator(Project project)
Creates a new validator initialized with the project. |
|
Validator(Project project,
ConfigStatus status)
Initializes validator with the project loading config status. |
Method Summary | |
---|---|
int |
getMaxSeverity()
Returns maximum severity level encountered during the last validation run. |
Project |
getProject()
Returns the project. |
void |
registerError(String message,
ProjectPath treeNodePath)
|
void |
registerValidated(int severity,
String message,
ProjectPath treeNodePath)
Registers validation result. |
void |
registerWarning(String message,
ProjectPath treeNodePath)
|
protected void |
reset()
Resets internal state. |
int |
validate()
Validates all project elements. |
int |
validate(Iterator treeNodes)
Validates a set of tree nodes passed as an iterator. |
List<ValidationInfo> |
validationResults()
Return collection of ValidationInfo objects from last validation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Project project
protected List<ValidationInfo> validationResults
protected int maxSeverity
Constructor Detail |
---|
public Validator(Project project)
project
- public Validator(Project project, ConfigStatus status)
project
- status
- Method Detail |
---|
public Project getProject()
protected void reset()
public int getMaxSeverity()
public void registerValidated(int severity, String message, ProjectPath treeNodePath)
result
parameter has a higher severity then the current value.
Leaves current value unchanged otherwise.
public void registerError(String message, ProjectPath treeNodePath)
public void registerWarning(String message, ProjectPath treeNodePath)
public List<ValidationInfo> validationResults()
public int validate()
public int validate(Iterator treeNodes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |