package com.sun.xml.internal.messaging.saaj.soap.impl;
import javax.xml.namespace.QName;
import javax.xml.soap.*;
import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
import org.w3c.dom.Element;
public abstract class
extends ElementImpl
implements SOAPHeaderElement {
protected static Name =
NameImpl.createFromTagName("relay");
protected static Name MUST_UNDERSTAND_ATTRIBUTE_LOCAL_NAME =
NameImpl.createFromTagName("mustUnderstand");
public (SOAPDocumentImpl ownerDoc, Name qname) {
super(ownerDoc, qname);
}
public (SOAPDocumentImpl ownerDoc, QName qname) {
super(ownerDoc, qname);
}
public (SOAPDocumentImpl ownerDoc, Element domElement) {
super(ownerDoc, domElement);
}
protected abstract NameImpl ();
protected abstract NameImpl ();
protected abstract NameImpl getMustunderstandAttributeName();
protected abstract boolean getMustunderstandAttributeValue(String str);
protected abstract String getMustunderstandLiteralValue(boolean mu);
protected abstract NameImpl ();
protected abstract boolean (String str);
protected abstract String (boolean mu);
protected abstract String ();
@Override
public void (SOAPElement element) throws SOAPException {
if (!(element instanceof SOAPHeader)) {
log.severe("SAAJ0130.impl.header.elem.parent.mustbe.header");
throw new SOAPException("Parent of a SOAPHeaderElement has to be a SOAPHeader");
}
super.setParentElement(element);
}
@Override
public void (String actorUri) {
try {
removeAttribute(getActorAttributeName());
addAttribute((Name) getActorAttributeName(), actorUri);
} catch (SOAPException ex) {
}
}
@Override
public void (String roleUri) throws SOAPException {
removeAttribute(getRoleAttributeName());
addAttribute((Name) getRoleAttributeName(), roleUri);
}
Name = NameImpl.createFromTagName("actor");
@Override
public String () {
String actor = getAttributeValue(getActorAttributeName());
return actor;
}
Name = NameImpl.createFromTagName("role");
@Override
public String () {
String role = getAttributeValue(getRoleAttributeName());
return role;
}
@Override
public void setMustUnderstand(boolean mustUnderstand) {
try {
removeAttribute(getMustunderstandAttributeName());
addAttribute(
(Name) getMustunderstandAttributeName(),
getMustunderstandLiteralValue(mustUnderstand));
} catch (SOAPException ex) {
}
}
@Override
public boolean getMustUnderstand() {
String mu = getAttributeValue(getMustunderstandAttributeName());
if (mu != null)
return getMustunderstandAttributeValue(mu);
return false;
}
@Override
public void (boolean relay) throws SOAPException {
removeAttribute(getRelayAttributeName());
addAttribute(
(Name) getRelayAttributeName(),
getRelayLiteralValue(relay));
}
@Override
public boolean () {
String mu = getAttributeValue(getRelayAttributeName());
if (mu != null)
return getRelayAttributeValue(mu);
return false;
}
}