01: /*
02: * Copyright 2007 Dan Shellman
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 org.iscreen.impl;
17:
18: import java.util.List;
19:
20: import org.iscreen.ValidatorContext;
21:
22: /**
23: * This extension of the ValidatorContext provides the internal engine
24: * the ability to set and retrieve additional information on the context.
25: *
26: * @author Shellman, Dan
27: */
28: public interface InternalValidatorContext extends ValidatorContext {
29: /**
30: * Adds "raw" failures (which is a List of ValidationFailure objects)
31: * to the existing set of failures.
32: *
33: *
34: * @param failureList The List of ValidationFailures to add to this context.
35: */
36: void addRawFailures(List failureList);
37:
38: /**
39: * Adds "raw" warnings (which is a List of ValidationFailure objects)
40: * to the existing set of warnings.
41: *
42: *
43: * @param warningList The List of ValidationFailures to add to this context.
44: */
45: void addRawWarnings(List warningList);
46:
47: /**
48: * Calculates the total failure and warning counts. Basically, returns
49: * the addition of getFailureCount() and getWarningCount() calls.
50: *
51: *
52: * @return Returns the total failure and warning counts.
53: */
54: int getCount();
55:
56: /**
57: * Retrieves the number of current failures in this context.
58: *
59: *
60: * @return Returns the number of failures.
61: */
62: int getFailureCount();
63:
64: /**
65: * Retrieves a List of the current failures within this context. This
66: * List contains ValidationFailure objects.
67: *
68: *
69: * @return Returns a List of current failures.
70: */
71: List getFailures();
72:
73: /**
74: * Retrieves the number of current warnings in this context.
75: *
76: *
77: * @return Returns the number of warnings.
78: */
79: int getWarningCount();
80:
81: /**
82: * Retrieves a List of the current warnings within this context. This
83: * List contains ValidationFailure objects.
84: *
85: *
86: * @return Returns a List of current warnings.
87: */
88: List getWarnings();
89:
90: /**
91: * Sets the ValidatorWrapper that the context needs to use.
92: *
93: *
94: * @param wrapper The ValidatorWrapper to use.
95: */
96: void setValidator(ValidatorWrapper wrapper);
97:
98: }
|