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