KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opencms > template > I_CmsTemplateCache


1 /*
2 * File : $Source: /usr/local/cvs/opencms/src-modules/com/opencms/template/I_CmsTemplateCache.java,v $
3 * Date : $Date: 2005/05/17 13:47:32 $
4 * Version: $Revision: 1.1 $
5 *
6 * This library is part of OpenCms -
7 * the Open Source Content Mananagement System
8 *
9 * Copyright (C) 2001 The OpenCms Group
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * For further information about OpenCms, please see the
22 * OpenCms Website: http://www.opencms.org
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 */

28
29 package com.opencms.template;
30
31
32 /**
33  * Common interface for the OpenCms template cache.
34  * Classes and for a customized template cache have to be implemtented.
35  *
36  * @author Alexander Lucas
37  * @version $Revision: 1.1 $ $Date: 2005/05/17 13:47:32 $
38  *
39  * @deprecated Will not be supported past the OpenCms 6 release.
40  */

41 public interface I_CmsTemplateCache {
42     
43     /** Deletes all documents from the template cache. */
44     public void clearCache();
45     
46     /**
47      * Deletes the document with the given key from the
48      * template cache.
49      * @param key Key of the template that should be deleted.
50      */

51     public void clearCache(Object JavaDoc key);
52     
53     /**
54      * Gets a previously cached template with the given key.
55      * @param key Key of the requested template.
56      * @return byte array with the cached template content or null if no cached value was found.
57      */

58     public byte[] get(Object JavaDoc key);
59     
60     /**
61      * Checks if there exists a cached template content for
62      * a given key.
63      * @param key Key that should be checked.
64      * @return <EM>true</EM> if a cached content was found, <EM>false</EM> otherwise.
65      */

66     public boolean has(Object JavaDoc key);
67     
68     /**
69      * Stores a template content in the cache using the given key.
70      * @param key Key that should be used to store the template
71      * @param content Template content to store.
72      */

73     public void put(Object JavaDoc key, byte[] content);
74 }
75
Popular Tags