1 20 package org.enhydra.barracuda.contrib.dbroggisch.display.filters; 21 22 import java.util.*; 23 import org.enhydra.barracuda.contrib.dbroggisch.display.filters.dtd.*; 24 25 public class ConstantFilter implements Filter { 26 27 private Object constant; 28 29 public ConstantFilter(Object c) { 30 constant = c; 31 } 32 33 public ConstantFilter() { 34 this(null); 35 } 36 37 42 public Object filter(Object obj, FilterContext context) 43 throws FilterException 44 { 45 return constant; 46 } 47 48 49 public Filter configure(Object obj) 50 throws FilterException 51 { 52 Constant con = (Constant)obj; 53 constant = con.getValue(); 54 return this; 55 } 56 } 57 | Popular Tags |