01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.caching;
18:
19: import java.io.Serializable;
20:
21: /**
22: * A CacheValidity object contains all information for one pipeline component
23: * to check if it is still valid.<br>
24: * For example, the FileGenerator stores only the timestamp for the read
25: * xml file in this container.
26: * Although this interface is deprecated it is still used for compatibility!
27: *
28: * @deprecated Use the Avalon Excalibur SourceValidity implementations instead
29: * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
30: * @version CVS $Id: CacheValidity.java 433543 2006-08-22 06:22:54Z crossley $
31: */
32: public interface CacheValidity extends Serializable {
33:
34: /**
35: * Check if the component is still valid.
36: * This is only true, if the incoming CacheValidity is of the same
37: * type and has the same values.
38: */
39: boolean isValid(CacheValidity validity);
40:
41: /**
42: * Creates text represenation of the validity object.
43: * This is used to create fake 'lastModificationDate' for cocoon: sources.
44: * <p>Due to changes in source API, this method is no longer needed,
45: * starting with Cocoon 2.1.
46: */
47: String toString();
48: }
|