1 19 20 25 26 package org.netbeans.modules.j2ee.dd.impl.common; 27 28 import org.netbeans.modules.schema2beans.BaseBean; 29 import org.netbeans.modules.schema2beans.Version; 30 import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException; 31 import org.netbeans.modules.j2ee.dd.api.common.DescriptionInterface; 32 33 public abstract class DescriptionBeanSingle extends EnclosingBean implements DescriptionInterface { 34 35 public DescriptionBeanSingle(java.util.Vector comps, Version version) { 36 super(comps, version); 37 } 38 public String getDescription() {return null;} 40 public void setDescription(String description){} 41 42 public void setDescription(String locale, String description) throws VersionNotSupportedException { 43 if (locale==null) setDescription(description); 44 else throw new VersionNotSupportedException("2.0"); } 46 47 public void setAllDescriptions(java.util.Map descriptions) throws VersionNotSupportedException { 48 throw new VersionNotSupportedException("2.0"); } 50 51 public String getDescription(String locale) throws VersionNotSupportedException { 52 if (locale==null) return getDescription(); 53 else throw new VersionNotSupportedException("2.0"); } 55 public String getDefaultDescription() { 56 return getDescription(); 57 } 58 public java.util.Map getAllDescriptions() { 59 java.util.Map map = new java.util.HashMap (); 60 map.put(null, getDescription()); 61 return map; 62 } 63 64 public void removeDescriptionForLocale(String locale) throws VersionNotSupportedException { 65 if (locale==null) setDescription(null); 66 else throw new VersionNotSupportedException("2.0"); } 68 public void removeDescription() { 69 setDescription(null); 70 } 71 public void removeAllDescriptions() { 72 setDescription(null); 73 } 74 } 75 | Popular Tags |