1 17 package com.sun.org.apache.xml.internal.security.signature; 18 19 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; 20 import com.sun.org.apache.xml.internal.security.utils.Constants; 21 import com.sun.org.apache.xml.internal.security.utils.IdResolver; 22 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy; 23 import org.w3c.dom.Document ; 24 import org.w3c.dom.Element ; 25 import org.w3c.dom.Node ; 26 27 34 public class SignatureProperty extends SignatureElementProxy { 35 36 37 static java.util.logging.Logger log = 38 java.util.logging.Logger.getLogger( 39 SignatureProperty.class.getName()); 40 41 47 public SignatureProperty(Document doc, String Target) { 48 this(doc, Target, null); 49 } 50 51 58 public SignatureProperty(Document doc, String Target, String Id) { 59 60 super(doc); 61 62 this.setTarget(Target); 63 this.setId(Id); 64 } 65 66 72 public SignatureProperty(Element element, String BaseURI) 73 throws XMLSecurityException { 74 super(element, BaseURI); 75 } 76 77 82 public void setId(String Id) { 83 84 if ((this._state == MODE_SIGN) && (Id != null)) { 85 this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id); 86 IdResolver.registerElementById(this._constructionElement, Id); 87 } 88 } 89 90 95 public String getId() { 96 return this._constructionElement.getAttributeNS(null, Constants._ATT_ID); 97 } 98 99 104 public void setTarget(String Target) { 105 106 if ((this._state == MODE_SIGN) && (Target != null)) { 107 this._constructionElement.setAttributeNS(null, Constants._ATT_TARGET, Target); 108 } 109 } 110 111 116 public String getTarget() { 117 return this._constructionElement.getAttributeNS(null, Constants._ATT_TARGET); 118 } 119 120 126 public Node appendChild(Node node) { 127 return this._constructionElement.appendChild(node); 128 } 129 130 131 public String getBaseLocalName() { 132 return Constants._TAG_SIGNATUREPROPERTY; 133 } 134 } 135 | Popular Tags |