1 /*
2 * Copyright 2008 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
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.kuali.ole.sys.document.validation;
17
18 import org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent;
19
20 /**
21 * An interface for a simple validation
22 */
23 public interface Validation {
24 /**
25 * This method validates that certain parameters
26 * @param parameters a list of parameters to validate
27 * @return true if validation should continue, false otherwise
28 */
29 public abstract boolean validate(AttributedDocumentEvent event);
30
31 /**
32 * Returns whether the validation process should quit on the failure of this validation
33 * @return true if the validation process should quit, false otherwise
34 */
35 public abstract boolean shouldQuitOnFail();
36
37 /**
38 * Stages the execution of a Validation
39 * @param event the event the validate
40 * @return the boolean result of the staged Validation
41 */
42 public abstract boolean stageValidation(AttributedDocumentEvent event);
43 }