|
|||||||||
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 java.util.List |
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(java.lang.String message,
ProjectPath treeNodePath)
|
void |
registerValidated(int severity,
java.lang.String message,
ProjectPath treeNodePath)
Registers validation result. |
void |
registerWarning(java.lang.String message,
ProjectPath treeNodePath)
|
protected void |
reset()
Resets internal state. |
int |
validate()
Validates all project elements. |
int |
validate(java.util.Iterator treeNodes)
Validates a set of tree nodes passed as an iterator. |
java.util.List |
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 java.util.List 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, java.lang.String message, ProjectPath treeNodePath)
result
parameter has a higher severity then the current value.
Leaves current value unchanged otherwise.
public void registerError(java.lang.String message, ProjectPath treeNodePath)
public void registerWarning(java.lang.String message, ProjectPath treeNodePath)
public java.util.List validationResults()
public int validate()
public int validate(java.util.Iterator treeNodes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |