1 16 19 20 package org.apache.pluto.portalImpl.om.common.impl; 21 22 import java.util.Locale ; 23 24 import org.apache.pluto.om.common.Description; 25 import org.apache.pluto.portalImpl.om.common.Support; 26 import org.apache.pluto.util.StringUtils; 27 28 public class DescriptionImpl implements Description, java.io.Serializable , Support { 29 30 private String description = null; 31 private Locale locale = null; private String castorLocale = null; 33 34 public DescriptionImpl() 35 { 36 } 37 38 public String getDescription() 40 { 41 return description; 42 } 43 44 public Locale getLocale() 45 { 46 return locale; 47 } 48 49 51 public void postBuild(Object parameter) throws Exception 52 { 53 } 54 55 public void postLoad(Object parameter) throws Exception 56 { 57 if (castorLocale == null) { 58 locale = Locale.ENGLISH; 59 } else { 60 locale = new Locale (castorLocale, ""); 61 } 62 } 63 public void postStore(Object parameter) throws Exception 64 { 65 } 66 67 public void preBuild(Object parameter) throws Exception 68 { 69 } 70 71 public void preStore(Object parameter) throws Exception 72 { 73 } 74 75 public String toString() 77 { 78 return toString(0); 79 } 80 81 public String toString(int indent) 82 { 83 StringBuffer buffer = new StringBuffer (50); 84 StringUtils.newLine(buffer,indent); 85 buffer.append(getClass().toString()); 86 buffer.append(": description='"); 87 buffer.append(description); 88 buffer.append("', locale='"); 89 buffer.append(locale); 90 buffer.append("'"); 91 return buffer.toString(); 92 } 93 94 95 public void setDescription(String description) 96 { 97 this.description = description; 98 } 99 100 public void setLocale(Locale locale) 101 { 102 this.locale = locale; 103 } 104 105 106 108 112 public String getCastorLocale() { 113 return castorLocale; 114 } 115 116 120 public void setCastorLocale(String castorLocale) { 121 this.castorLocale = castorLocale; 122 } 123 124 } 125 | Popular Tags |