1 16 19 20 package org.apache.pluto.portalImpl.om.common.impl; 21 22 import java.util.Collection ; 23 import java.util.Locale ; 24 25 import org.apache.pluto.om.common.Description; 26 import org.apache.pluto.om.common.DescriptionSet; 27 import org.apache.pluto.om.common.Parameter; 28 import org.apache.pluto.om.common.ParameterCtrl; 29 import org.apache.pluto.util.StringUtils; 30 31 public class ParameterImpl implements Parameter, ParameterCtrl, java.io.Serializable 32 { 33 34 private String name; 35 private String value; 36 private DescriptionSet descriptions; 37 38 public ParameterImpl() 39 { 40 descriptions = new org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl(); 41 } 42 43 45 public String getName() 46 { 47 return name; 48 } 49 50 public String getValue() 51 { 52 return value; 53 } 54 55 58 public Description getDescription(Locale locale) 59 { 60 return descriptions.get(locale); 61 } 62 63 65 public void setName(String name) 66 { 67 this.name = name; 68 } 69 70 public void setValue(String value) 71 { 72 this.value = value; 73 } 74 75 78 public void setDescriptionSet(DescriptionSet descriptions) 79 { 80 this.descriptions = descriptions; 81 } 82 83 85 public String toString() 86 { 87 return toString(0); 88 } 89 90 public String toString(int indent) 91 { 92 StringBuffer buffer = new StringBuffer (50); 93 StringUtils.newLine(buffer,indent); 94 buffer.append(getClass().toString()); 95 buffer.append(": name='"); 96 buffer.append(name); 97 buffer.append("', value='"); 98 buffer.append(value); 99 buffer.append("', descriptions='"); 100 buffer.append(((DescriptionSetImpl) descriptions).toString()); 101 buffer.append("'"); 102 return buffer.toString(); 103 } 104 105 public Collection getCastorDescriptions() 106 { 107 return(DescriptionSetImpl)descriptions; 108 } 109 110 public void setCastorDescriptions(DescriptionSet castorDescriptions) 111 { 112 this.descriptions = castorDescriptions; 113 } 114 } 115 | Popular Tags |