1 package org.ocltf.common; 2 3 import org.apache.commons.lang.StringUtils; 4 import org.apache.commons.lang.builder.ToStringBuilder; 5 6 /*** 7 * This class represents properties which are used to 8 * configure Context objects which are made available 9 * to configure Plugin instances. 10 * 11 * @see org.ocltf.common.Context 12 * @see org.ocltf.common.Contexts 13 * 14 * @author Chad Brandon 15 */ 16 public class Property { 17 18 private String name; 19 private String value; 20 21 /*** 22 * Returns the name. 23 * @return String 24 */ 25 public String getName() { 26 return name; 27 } 28 29 /*** 30 * Returns the value. 31 * @return String 32 */ 33 public String getValue() { 34 return value; 35 } 36 37 /*** 38 * Sets the name. 39 * @param name The name to set 40 */ 41 public void setName(String name) { 42 this.name = StringUtils.trimToEmpty(name); 43 } 44 45 /*** 46 * Sets the value. 47 * @param value The value to set 48 */ 49 public void setValue(String value) { 50 this.value = StringUtils.trimToEmpty(value); 51 } 52 53 /*** 54 * @see java.lang.Object#toString() 55 */ 56 public String toString() { 57 return ToStringBuilder.reflectionToString(this); 58 } 59 }