001 /*
002 * JBoss DNA (http://www.jboss.org/dna)
003 * See the COPYRIGHT.txt file distributed with this work for information
004 * regarding copyright ownership. Some portions may be licensed
005 * to Red Hat, Inc. under one or more contributor license agreements.
006 * See the AUTHORS.txt file in the distribution for a full listing of
007 * individual contributors.
008 *
009 * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
010 * is licensed to you under the terms of the GNU Lesser General Public License as
011 * published by the Free Software Foundation; either version 2.1 of
012 * the License, or (at your option) any later version.
013 *
014 * JBoss DNA is distributed in the hope that it will be useful,
015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017 * Lesser General Public License for more details.
018 *
019 * You should have received a copy of the GNU Lesser General Public
020 * License along with this software; if not, write to the Free
021 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
022 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
023 */
024 package org.jboss.dna.common.collection;
025
026 import java.util.Iterator;
027 import org.jboss.dna.common.i18n.I18n;
028
029 /**
030 * @author John Verhaeg
031 */
032 public interface Problems extends Iterable<Problem> {
033
034 void addError( I18n message,
035 Object... params );
036
037 void addError( Throwable throwable,
038 I18n message,
039 Object... params );
040
041 void addError( I18n message,
042 String resource,
043 String location,
044 Object... params );
045
046 void addError( Throwable throwable,
047 I18n message,
048 String resource,
049 String location,
050 Object... params );
051
052 void addError( int code,
053 I18n message,
054 Object... params );
055
056 void addError( Throwable throwable,
057 int code,
058 I18n message,
059 Object... params );
060
061 void addError( int code,
062 I18n message,
063 String resource,
064 String location,
065 Object... params );
066
067 void addError( Throwable throwable,
068 int code,
069 I18n message,
070 String resource,
071 String location,
072 Object... params );
073
074 void addWarning( I18n message,
075 Object... params );
076
077 void addWarning( Throwable throwable,
078 I18n message,
079 Object... params );
080
081 void addWarning( I18n message,
082 String resource,
083 String location,
084 Object... params );
085
086 void addWarning( Throwable throwable,
087 I18n message,
088 String resource,
089 String location,
090 Object... params );
091
092 void addWarning( int code,
093 I18n message,
094 Object... params );
095
096 void addWarning( Throwable throwable,
097 int code,
098 I18n message,
099 Object... params );
100
101 void addWarning( int code,
102 I18n message,
103 String resource,
104 String location,
105 Object... params );
106
107 void addWarning( Throwable throwable,
108 int code,
109 I18n message,
110 String resource,
111 String location,
112 Object... params );
113
114 void addInfo( I18n message,
115 Object... params );
116
117 void addInfo( Throwable throwable,
118 I18n message,
119 Object... params );
120
121 void addInfo( I18n message,
122 String resource,
123 String location,
124 Object... params );
125
126 void addInfo( Throwable throwable,
127 I18n message,
128 String resource,
129 String location,
130 Object... params );
131
132 void addInfo( int code,
133 I18n message,
134 Object... params );
135
136 void addInfo( Throwable throwable,
137 int code,
138 I18n message,
139 Object... params );
140
141 void addInfo( int code,
142 I18n message,
143 String resource,
144 String location,
145 Object... params );
146
147 void addInfo( Throwable throwable,
148 int code,
149 I18n message,
150 String resource,
151 String location,
152 Object... params );
153
154 boolean hasProblems();
155
156 boolean hasErrors();
157
158 boolean hasWarnings();
159
160 boolean hasInfo();
161
162 boolean isEmpty();
163
164 int size();
165
166 /**
167 * <p>
168 * {@inheritDoc}
169 * </p>
170 *
171 * @see java.lang.Iterable#iterator()
172 */
173 Iterator<Problem> iterator();
174 }