1 package org.apache.turbine.modules; 2 3 56 57 import java.util.Set ; 58 59 import org.apache.fulcrum.template.TemplateContext; 60 61 65 public class ContextAdapter 66 implements TemplateContext 67 { 68 private org.apache.turbine.TemplateContext context; 69 70 public ContextAdapter(org.apache.turbine.TemplateContext context) 71 { 72 this.context = context; 73 } 74 75 public void put(String key, Object value) 76 { 77 context.put(key, value); 78 } 79 80 public Object get(String key) 81 { 82 return context.get(key); 83 } 84 85 public Object remove(Object key) 86 { 87 return context.remove(key); 88 } 89 90 public Object [] getKeys() 91 { 92 Set keys = context.keySet(); 93 return (keys == null ? null : keys.toArray()); 94 } 95 96 public boolean containsKey(Object key) 97 { 98 return context.containsKey(key); 99 } 100 } 101 | Popular Tags |