1 19 20 28 29 package org.netbeans.modules.xml.wsdl.ui.commands; 30 31 import java.io.IOException ; 32 33 import javax.xml.namespace.QName ; 34 35 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 36 import org.netbeans.modules.xml.wsdl.ui.api.property.PropertyAdapter; 37 import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent; 38 import org.openide.ErrorManager; 39 40 44 public class AnyAttributePropertyAdapter extends PropertyAdapter { 45 46 private QName mAttrQName; 47 48 public AnyAttributePropertyAdapter(QName attrQName, WSDLComponent mWSDLConstruct) { 49 super(mWSDLConstruct); 50 this.mAttrQName = attrQName; 51 } 52 53 public void setValue(String value) { 54 getDelegate().getModel().startTransaction(); 55 ((AbstractDocumentComponent)getDelegate()).setAnyAttribute(mAttrQName, value); 56 getDelegate().getModel().endTransaction(); 57 } 58 59 public String getValue() { 60 String value = ((AbstractDocumentComponent)getDelegate()).getAnyAttribute(this.mAttrQName); 61 if(value == null) { 62 value = ""; 63 } 64 65 return value; 66 } 67 } 68 | Popular Tags |