Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/opencms/launcher/I_CmsTemplateCache.java


1   /*
2   * File   : $Source: /usr/local/cvs/opencms/src/com/opencms/launcher/Attic/I_CmsTemplateCache.java,v $
3   * Date   : $Date: 2002/12/06 23:16:54 $
4   * Version: $Revision: 1.6 $
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.launcher;
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.6 $ $Date: 2002/12/06 23:16:54 $
38   */
39  public interface I_CmsTemplateCache {
40      
41      /** Deletes all documents from the template cache. */
42      public void clearCache();
43      
44      /**
45       * Deletes the document with the given key from the
46       * template cache.
47       * @param key Key of the template that should be deleted.
48       */
49      public void clearCache(Object key);
50      
51      /**
52       * Gets a previously cached template with the given key.
53       * @param key Key of the requested template.
54       * @return byte array with the cached template content or null if no cached value was found.
55       */
56      public byte[] get(Object key);
57      
58      /**
59       * Checks if there exists a cached template content for
60       * a given key.
61       * @param key Key that should be checked.
62       * @return <EM>true</EM> if a cached content was found, <EM>false</EM> otherwise.
63       */
64      public boolean has(Object key);
65      
66      /**
67       * Stores a template content in the cache using the given key.
68       * @param key Key that should be used to store the template
69       * @param content Template content to store.
70       */
71      public void put(Object key, byte[] content);
72  }