1 19 24 25 package org.netbeans.modules.j2ee.sun.share.configbean.customizers.webservice; 26 27 import java.util.ResourceBundle ; 28 29 import org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean; 30 import org.netbeans.modules.j2ee.sun.dd.api.common.Message; 31 import org.netbeans.modules.j2ee.sun.dd.api.common.MessageSecurity; 32 33 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.GenericTableModel; 34 35 36 40 public class AuthorizationEntry extends GenericTableModel.TableEntry { 41 42 private static final ResourceBundle webserviceBundle = ResourceBundle.getBundle( 43 "org.netbeans.modules.j2ee.sun.share.configbean.customizers.webservice.Bundle"); 45 private String childAttributeName; 46 47 public AuthorizationEntry(String propName, String attrName, String resBase) { 48 super(null, propName, webserviceBundle, resBase, false, false); 49 50 childAttributeName = attrName; 51 } 52 53 public Object getEntry(CommonDDBean parent) { 54 Object result = null; 55 56 if(parent.size(propertyName) > 0) { 57 result = parent.getAttributeValue(propertyName, childAttributeName); 58 } 59 60 return result; 61 } 62 63 public void setEntry(CommonDDBean parent, Object value) { 64 if(value instanceof String && ((String ) value).length() == 0) { 67 value = null; 68 } 69 70 if(parent.size(propertyName) == 0) { 71 parent.setValue(propertyName, Boolean.TRUE); 72 } 73 74 parent.setAttributeValue(propertyName, childAttributeName, (String ) value); 75 } 76 77 public Object getEntry(CommonDDBean parent, int row) { 78 throw new UnsupportedOperationException (); 79 } 80 81 public void setEntry(CommonDDBean parent, int row, Object value) { 82 throw new UnsupportedOperationException (); 83 } 84 } 85 | Popular Tags |