1 45 package org.openejb.alt.config; 46 47 import java.util.Vector ; 48 49 import org.openejb.alt.config.ejb11.EjbJar; 50 import org.openejb.OpenEJBException; 51 52 55 public class EjbSet { 56 57 private final Vector failures = new Vector (); 58 private final Vector warnings = new Vector (); 59 private final Vector errors = new Vector (); 60 61 private final String jarPath; 62 private final EjbJar jar; 63 private final Bean[] beans; 64 65 private final ClassLoader classLoader; 66 67 public EjbSet(String jarPath, EjbJar jar, Bean[] beans, ClassLoader classLoader) { 68 this.jarPath = jarPath; 69 this.jar = jar; 70 this.beans = beans; 71 this.classLoader = classLoader; 72 } 73 74 public ClassLoader getClassLoader() { 75 return classLoader; 76 } 77 78 public EjbJar getJar() { 79 return jar; 80 } 81 82 83 public void addWarning(ValidationWarning warning) { 84 warnings.addElement(warning); 85 } 86 87 public void addFailure(ValidationFailure failure) { 88 failures.addElement(failure); 89 } 90 91 public void addError(ValidationError error) { 92 errors.addElement(error); 93 } 94 95 public ValidationFailure[] getFailures() { 96 ValidationFailure[] tmp = new ValidationFailure[failures.size()]; 97 failures.copyInto(tmp); 98 return tmp; 99 } 100 101 public ValidationWarning[] getWarnings() { 102 ValidationWarning[] tmp = new ValidationWarning[warnings.size()]; 103 warnings.copyInto(tmp); 104 return tmp; 105 } 106 107 public ValidationError[] getErrors() { 108 ValidationError[] tmp = new ValidationError[errors.size()]; 109 errors.copyInto(tmp); 110 return tmp; 111 } 112 113 public boolean hasWarnings() { 114 return warnings.size() > 0; 115 } 116 117 public boolean hasFailures() { 118 return failures.size() > 0; 119 } 120 121 public boolean hasErrors() { 122 return errors.size() > 0; 123 } 124 125 126 public Bean[] getBeans() { 127 return beans; 128 } 129 130 public EjbJar getEjbJar() { 131 return jar; 132 } 133 134 public String getJarPath() { 135 return jarPath; 136 } 137 } 138 | Popular Tags |