1 /*======================================================================*
2 * Copyright (c) 2010, Frank Maritato All rights reserved. *
4 * Licensed under the New BSD License (the "License"); you may not use *
5 * this file except in compliance with the License. Unless required *
6 * by applicable law or agreed to in writing, software distributed *
7 * under the License is distributed on an "AS IS" BASIS, WITHOUT *
8 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
9 * See the License for the specific language governing permissions and *
10 * limitations under the License. See accompanying LICENSE file. *
11 *======================================================================*/
18 import java
.util
.ArrayList
;
19 import java
.util
.LinkedList
;
20 import java
.util
.List
;
22 public class ValidationExceptions
extends EventSystemException
{
24 List
<EventSystemException
> allExceptions
= new LinkedList
<EventSystemException
>();
26 public ValidationExceptions(Throwable e
) {
30 public ValidationExceptions(String s
) {
34 public ValidationExceptions(String s
, Throwable e
) {
38 public void addException(EventSystemException e
) {
41 public List
<EventSystemException
> getAllExceptions() {
42 return new ArrayList(allExceptions
);
44 public boolean hasExceptions() {
45 return allExceptions
.size() > 0;
48 public String
toString() {
49 StringBuilder buf
= new StringBuilder();
50 buf
.append("ValidationExceptions {\n");
51 for (Exception e
: allExceptions
) {
52 buf
.append(e
.toString()).append("\n");
55 return buf
.toString();