##### Coverage Report - org.webmacro.resource.TrivialCacheManager

Classes in this File | Line Coverage | Branch Coverage | Complexity
TrivialCacheManager |
0% | 0/10
N/A | N/A
| 1.0;1

1 |  |
     /*
2 |  |
      * Copyright (C) 1998-2001 Semiotek Inc.  All Rights Reserved.
3 |  |
      *
4 |  |
      * Redistribution and use in source and binary forms, with or without
5 |  |
      * modification, are permitted under the terms of either of the following
6 |  |
      * Open Source licenses:
7 |  |
      *
8 |  |
      * The GNU General Public License, version 2, or any later version, as
9 |  |
      * published by the Free Software Foundation
10 |  |
      * (http://www.fsf.org/copyleft/gpl.html);
11 |  |
      *
12 |  |
      *  or
13 |  |
      *
14 |  |
      * The Semiotek Public License (http://webmacro.org/LICENSE.)
15 |  |
      *
16 |  |
      * This software is provided "as is", with NO WARRANTY, not even the
17 |  |
      * implied warranties of fitness to purpose, or merchantability. You
18 |  |
      * assume all risks and liabilities associated with its use.
19 |  |
      *
20 |  |
      * See www.webmacro.org for more information on the WebMacro project.
21 |  |
      */
22 |  |
     package org.webmacro.resource;
23 |  |
24 |  |
     import org.webmacro.Broker;
25 |  |
     import org.webmacro.InitException;
26 |  |
     import org.webmacro.ResourceException;
27 |  |
     import org.webmacro.util.Settings;
28 |  |
29 |  |
     /**
30 |  |
      * A trivial implementation of CacheManager which does no caching at
31 |  |
      * all.
32 |  |
      * @since 0.96
33 |  |
      */
34 |  |
     public class TrivialCacheManager implements CacheManager
35 |  |
     {
36 |  |
37 |  |
         public TrivialCacheManager ()
38 | 0 |
         {
39 | 0 |
         }
40 |  |
41 |  |
         public void init (Broker b, Settings config, String resourceType)
42 |  |
                 throws InitException
43 |  |
         {
44 | 0 |
         }
45 |  |
46 |  |
         public void flush ()
47 |  |
         {
48 | 0 |
         }
49 |  |
50 |  |
         public void destroy ()
51 |  |
         {
52 | 0 |
         }
53 |  |
54 |  |
         public Object get (final Object query, ResourceLoader helper)
55 |  |
                 throws ResourceException
56 |  |
         {
57 | 0 |
             return helper.load(query, null);
58 |  |
         }
59 |  |
60 |  |
         public Object get (final Object query)
61 |  |
         {
62 | 0 |
             return null;
63 |  |
         }
64 |  |
65 |  |
         public void put (final Object query, Object resource)
66 |  |
         {
67 | 0 |
         }
68 |  |
69 |  |
         public boolean supportsReload ()
70 |  |
         {
71 | 0 |
             return false;
72 |  |
         }
73 |  |
74 |  |
         public void invalidate (final Object query)
75 |  |
         {
76 | 0 |
         }
77 |  |
78 |  |
     }