1 package com.instantbank.lettertemplate.control.web; 2 3 import java.util.HashMap; 4 import java.io.Serializable; 5 6 /** 7 * Structure of a screen parameter 8 * 9 * @author Instant-bank (Consuelo Franky) 10 * @created August 2002 11 */ 12 public class Parameter 13 implements Serializable { 14 15 /** 16 * name of parameter: for example HtmlTitle, HtmlBody 17 */ 18 private String key; 19 20 /** 21 * value of parameter 22 */ 23 private String value; 24 25 /** 26 * signals if the string value must be included directly 27 * or if it is name of a JSP to include 28 */ 29 private boolean direct; 30 31 32 /** 33 * Constructor for the Parameter object 34 * 35 * @param key name of Parameter 36 * @param value value of Parameter 37 * @param direct value for direct attribute 38 */ 39 public Parameter(String key, String value, boolean direct) { 40 this.key = key; 41 this.value = value; 42 this.direct = direct; 43 } 44 45 46 /** 47 * Gets the direct attribute of the Parameter object 48 * 49 * @return The direct value 50 */ 51 public boolean isDirect() { 52 return direct; 53 } 54 55 56 /** 57 * Gets the key attribute of the Parameter object 58 * 59 * @return The key value 60 */ 61 public String getKey() { 62 return key; 63 } 64 65 66 /** 67 * Gets the value attribute of the Parameter object 68 * 69 * @return The value value 70 */ 71 public String getValue() { 72 return value; 73 } 74 75 76 /** 77 * textual representation of Parameter 78 * 79 * @return text of Parameter 80 */ 81 public String toString() { 82 return "[Parameter: key=" + key + ", value=" + value 83 + ", direct=" + direct + "]"; 84 } 85 } 86 87