1 17 package jsftest; 18 19 import java.util.Properties; 20 21 import org.apache.commons.logging.Log; 22 import org.apache.commons.logging.LogFactory; 23 24 29 public class DummyBean 30 { 31 private static Log logger = LogFactory.getLog(DummyBean.class); 32 33 private String name; 34 private Properties properties; 35 36 public DummyBean() 37 { 38 this.properties = new Properties(); 39 this.properties.put("one", "This is 1"); 40 this.properties.put("two", "This is 2"); 41 this.properties.put("three", "This is 3"); 42 this.properties.put("four", "This is 4"); 43 } 44 45 public Properties getProperties() 46 { 47 return this.properties; 48 } 49 50 53 public String getName() 54 { 55 return name; 56 } 57 58 61 public void setName(String name) 62 { 63 this.name = name; 64 } 65 66 69 public String toString() 70 { 71 StringBuilder builder = new StringBuilder(super.toString()); 72 builder.append(" (name=").append(this.name); 73 builder.append(" properties=").append(this.properties).append(")"); 74 return builder.toString(); 75 } 76 77 80 public void submit() 81 { 82 if (logger.isDebugEnabled()) 83 logger.debug("Submit called on DummyBean, state = " + toString()); 84 } 85 } 86 | Popular Tags |