1 40 41 package org.jahia.engines.validation; 42 43 44 53 public class ValidationError { 54 55 private final Object source; 56 private final String msgError; 57 private final String ressourceBundleProp; 60 private final String [] values; 61 62 private ValidationError() { 64 this.source = null; 65 this.msgError = null; 66 this.ressourceBundleProp = null; 67 this.values = null; 68 } 69 70 public ValidationError(Object newSource, String newMsgError) { 71 this.source = newSource; 72 this.msgError = newMsgError; 73 this.ressourceBundleProp = null; 74 this.values = null; 75 } 76 77 public ValidationError(Object newSource, String newMsgError, 78 String ressourceBundleProp, String [] values) { 79 this.source = newSource; 80 this.msgError = newMsgError; 81 this.ressourceBundleProp = ressourceBundleProp; 82 this.values = values; 83 } 84 85 public Object getSource() { 86 return this.source; 87 } 88 89 public String getMsgError() { 90 return this.msgError; 91 } 92 93 public String getRessourceBundleProp() { 94 return ressourceBundleProp; 95 } 96 97 public String [] getValues() { 98 return values; 99 } 100 101 public String toString() { 102 final StringBuffer buff = new StringBuffer (); 103 buff.append(ValidationError.class.getName()). 104 append(": Source: " + source). 105 append(", Message: " + msgError). 106 append(", RessourceBundleProp: " + ressourceBundleProp); 107 return buff.toString(); 108 } 109 } 110 | Popular Tags |