KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > action > evaluator > compare > PropertyValueComparator


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.action.evaluator.compare;
18
19 import java.io.Serializable JavaDoc;
20
21 import org.alfresco.repo.action.evaluator.ComparePropertyValueEvaluator;
22
23 /**
24  * Property value comparator interface
25  *
26  * @author Roy Wetherall
27  */

28 public interface PropertyValueComparator
29 {
30     /**
31      * Callback method to register this comparator with the evaluator.
32      *
33      * @param evaluator the compare property value evaluator
34      */

35     void registerComparator(ComparePropertyValueEvaluator evaluator);
36     
37     /**
38      * Compares the value of a property with the compare value, using the operator passed.
39      *
40      * @param propertyValue the property value
41      * @param compareValue the compare value
42      * @param operation the operation used to compare the two values
43      * @return the result of the comparision, true if successful false otherwise
44      */

45     boolean compare(
46             Serializable JavaDoc propertyValue,
47             Serializable JavaDoc compareValue,
48             ComparePropertyValueOperation operation);
49 }
50
Popular Tags