1 package org.apache.fulcrum.velocity; 2 3 56 57 import org.apache.fulcrum.template.TemplateContext; 58 import org.apache.velocity.context.AbstractContext; 59 60 70 public class ContextAdapter extends AbstractContext 71 { 72 private TemplateContext context; 73 74 public ContextAdapter(TemplateContext context) 75 { 76 this.context = context; 77 } 78 79 82 public Object internalGet( String key ) 83 { 84 return context.get( key ); 85 } 86 87 90 public Object internalPut( String key, Object value ) 91 { 92 context.put( key, value ); 93 94 return null; 95 } 96 97 100 public boolean internalContainsKey(Object key) 101 { 102 return context.containsKey( key ); 103 } 104 105 108 public Object [] internalGetKeys() 109 { 110 return context.getKeys(); 111 } 112 113 116 public Object internalRemove(Object key) 117 { 118 return context.remove( key ); 119 } 120 } 121 | Popular Tags |