1 56 package org.objectstyle.cayenne.project.validator; 57 58 import org.objectstyle.cayenne.project.ProjectPath; 59 60 66 public class ValidationInfo { 67 public static final int VALID = 0; 68 public static final int WARNING = 1; 69 public static final int ERROR = 2; 70 71 protected ProjectPath path; 72 protected String message; 73 protected int severity; 74 75 78 public ValidationInfo(int severity, String message, ProjectPath path) { 79 this.severity = severity; 80 this.message = message; 81 this.path = path; 82 } 83 84 public Object getValidatedObject() { 85 return path.getObject(); 86 } 87 88 public Object getValidatedObjectParent() { 89 return path.getObjectParent(); 90 } 91 92 public String toString() { 93 return getMessage(); 94 } 95 96 100 public String getMessage() { 101 return message; 102 } 103 104 108 public int getSeverity() { 109 return severity; 110 } 111 112 116 public ProjectPath getPath() { 117 return path; 118 } 119 } 120 | Popular Tags |