1 9 package org.jboss.portal.server.metadata; 10 11 import java.util.HashMap ; 12 import java.util.Map ; 13 14 import org.jboss.portal.common.metadata.MetaData; 15 16 22 public class InterceptorMetaData implements MetaData 23 { 24 25 private String className; 26 private Map params; 27 28 public InterceptorMetaData(String className) 29 { 30 if (className == null) 31 { 32 throw new IllegalArgumentException ("Interceptor class name must not be null"); 33 } 34 this.className = className; 35 this.params = new HashMap (); 36 } 37 38 public String getClassName() 39 { 40 return className; 41 } 42 43 public void setClassName(String className) 44 { 45 this.className = className; 46 } 47 48 public void setParamValue(String name, String value) 49 { 50 if (name == null) 51 { 52 throw new IllegalArgumentException ("Param name cannot be null"); 53 } 54 if (value == null) 55 { 56 throw new IllegalArgumentException ("Param value cannot be null"); 57 } 58 params.put(name, value); 59 } 60 61 public String getParamValue(String name) 62 { 63 return (String )params.get(name); 64 } 65 } 66 | Popular Tags |