1 6 7 28 package javax.xml.soap; 29 30 import java.util.Iterator ; 31 32 import javax.xml.transform.Source ; 33 34 70 public abstract class SOAPPart implements org.w3c.dom.Document , Node { 71 72 81 public abstract SOAPEnvelope getEnvelope() throws SOAPException ; 82 83 90 public String getContentId() { 91 String [] values = getMimeHeader("Content-Id"); 92 if (values != null && values.length > 0) 93 return values[0]; 94 return null; 95 } 96 97 104 public String getContentLocation() { 105 String [] values = getMimeHeader("Content-Location"); 106 if (values != null && values.length > 0) 107 return values[0]; 108 return null; 109 } 110 111 122 public void setContentId(String contentId) 123 { 124 setMimeHeader("Content-Id", contentId); 125 } 126 137 public void setContentLocation(String contentLocation) 138 { 139 setMimeHeader("Content-Location", contentLocation); 140 } 141 147 public abstract void removeMimeHeader(String header); 148 149 153 public abstract void removeAllMimeHeaders(); 154 155 165 public abstract String [] getMimeHeader(String name); 166 167 191 public abstract void setMimeHeader(String name, String value); 192 193 208 public abstract void addMimeHeader(String name, String value); 209 210 217 public abstract Iterator getAllMimeHeaders(); 218 219 228 public abstract Iterator getMatchingMimeHeaders(String [] names); 229 230 241 public abstract Iterator getNonMatchingMimeHeaders(String [] names); 242 243 254 public abstract void setContent(Source source) throws SOAPException ; 255 256 266 public abstract Source getContent() throws SOAPException ; 267 } 268 | Popular Tags |