1 19 20 26 package org.netbeans.modules.xml.wsdl.ui.commands; 27 28 import javax.xml.namespace.QName ; 29 30 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 31 import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent; 32 33 34 35 41 public class OtherAttributePropertyAdapter extends CommonAttributePropertyAdapter { 42 43 private QName mAttrQName; 44 45 46 public OtherAttributePropertyAdapter(QName attrQName, 47 WSDLComponent element) { 48 super(element); 49 this.mAttrQName = attrQName; 50 } 51 52 53 @Override 54 public void setValue(String value) { 55 this.getDelegate().getModel().startTransaction(); 56 ((AbstractDocumentComponent) this.getDelegate()).setAnyAttribute(this.mAttrQName, value); 57 this.getDelegate().getModel().endTransaction(); 58 59 } 60 61 @Override 62 public String getValue() { 63 String value = ((AbstractDocumentComponent) getDelegate()).getAnyAttribute(this.mAttrQName); 64 65 if(value == null) { 66 return ""; 67 } 68 69 return value; 70 } 71 } 72 | Popular Tags |