01: /*
02: * Copyright 2004, 2005, 2006 Odysseus Software GmbH
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package de.odysseus.calyxo.forms;
17:
18: import java.util.Iterator;
19:
20: import de.odysseus.calyxo.base.Messages;
21: import de.odysseus.calyxo.forms.conf.FormConfig;
22:
23: /**
24: * Form validation result.
25: * A form input result collects all the input results for a form.
26: *
27: * @author Christoph Beck
28: */
29: public interface FormResult {
30:
31: /**
32: * Get {@link de.odysseus.calyxo.base.Message} error messages.
33: */
34: public Messages getMessages();
35:
36: /**
37: * true iff all inputs are valid
38: */
39: public boolean isValid();
40:
41: /**
42: * Get the form configuration
43: */
44: public FormConfig getFormConfig();
45:
46: /**
47: * Get the contained {@link FormInputResult}
48: */
49: public Iterator getFormInputResults();
50:
51: /**
52: * Get input result by name
53: */
54: public FormInputResult getFormInputResult(String name);
55:
56: /**
57: * Answer true iff the specified input is involved in
58: * a failed assertion.
59: */
60: public boolean isAssertionFailed(String name);
61: }
|