001    /*
002     *
003     */
004    package org.jboss.dna.common.collection;
005    
006    import java.util.Iterator;
007    import org.jboss.dna.common.i18n.I18n;
008    
009    /**
010     * @author John Verhaeg
011     */
012    public interface Problems extends Iterable<Problem> {
013    
014        void addError( I18n message,
015                       Object... params );
016    
017        void addError( Throwable throwable,
018                       I18n message,
019                       Object... params );
020    
021        void addError( I18n message,
022                       String resource,
023                       String location,
024                       Object... params );
025    
026        void addError( Throwable throwable,
027                       I18n message,
028                       String resource,
029                       String location,
030                       Object... params );
031    
032        void addError( int code,
033                       I18n message,
034                       Object... params );
035    
036        void addError( Throwable throwable,
037                       int code,
038                       I18n message,
039                       Object... params );
040    
041        void addError( int code,
042                       I18n message,
043                       String resource,
044                       String location,
045                       Object... params );
046    
047        void addError( Throwable throwable,
048                       int code,
049                       I18n message,
050                       String resource,
051                       String location,
052                       Object... params );
053    
054        void addWarning( I18n message,
055                         Object... params );
056    
057        void addWarning( Throwable throwable,
058                         I18n message,
059                         Object... params );
060    
061        void addWarning( I18n message,
062                         String resource,
063                         String location,
064                         Object... params );
065    
066        void addWarning( Throwable throwable,
067                         I18n message,
068                         String resource,
069                         String location,
070                         Object... params );
071    
072        void addWarning( int code,
073                         I18n message,
074                         Object... params );
075    
076        void addWarning( Throwable throwable,
077                         int code,
078                         I18n message,
079                         Object... params );
080    
081        void addWarning( int code,
082                         I18n message,
083                         String resource,
084                         String location,
085                         Object... params );
086    
087        void addWarning( Throwable throwable,
088                         int code,
089                         I18n message,
090                         String resource,
091                         String location,
092                         Object... params );
093    
094        void addInfo( I18n message,
095                      Object... params );
096    
097        void addInfo( Throwable throwable,
098                      I18n message,
099                      Object... params );
100    
101        void addInfo( I18n message,
102                      String resource,
103                      String location,
104                      Object... params );
105    
106        void addInfo( Throwable throwable,
107                      I18n message,
108                      String resource,
109                      String location,
110                      Object... params );
111    
112        void addInfo( int code,
113                      I18n message,
114                      Object... params );
115    
116        void addInfo( Throwable throwable,
117                      int code,
118                      I18n message,
119                      Object... params );
120    
121        void addInfo( int code,
122                      I18n message,
123                      String resource,
124                      String location,
125                      Object... params );
126    
127        void addInfo( Throwable throwable,
128                      int code,
129                      I18n message,
130                      String resource,
131                      String location,
132                      Object... params );
133    
134        boolean hasProblems();
135    
136        boolean hasErrors();
137    
138        boolean hasWarnings();
139    
140        boolean hasInfo();
141    
142        boolean isEmpty();
143    
144        int size();
145    
146        /**
147         * <p>
148         * {@inheritDoc}
149         * </p>
150         * 
151         * @see java.lang.Iterable#iterator()
152         */
153        Iterator<Problem> iterator();
154    }