View Javadoc

1   /*
2    * TapestryCacheManager.java
3    *
4    * Created on 16 Декабрь 2005 г., 13:38
5    *
6    * To change this template, choose Tools | Options and locate the template under
7    * the Source Creation and Management node. Right-click the template and choose
8    * Open. You can then make changes to the template in the Source Editor.
9    */
10  
11  package org.weda.tapestry;
12  
13  import org.apache.tapestry.engine.state.StateObjectManagerRegistry;
14  import org.weda.cache.CacheManager;
15  import org.weda.cache.CacheService;
16  import org.weda.cache.impl.SimpleCache;
17  
18  /**
19   *
20   * @author tim
21   */
22  public class TapestryCacheManager implements CacheManager {
23      private StateObjectManagerRegistry stateRegistry;
24      
25      public CacheService getCacheService() {        
26          return (SimpleCache)stateRegistry.get(SimpleCache.class.getName()).get();
27      }    
28  
29      public StateObjectManagerRegistry getStateRegistry() {
30          return stateRegistry;
31      }
32  
33      public void setStateRegistry(StateObjectManagerRegistry stateManager) {
34          this.stateRegistry = stateManager;
35      }
36      
37  }