com.ibm.websphere.sca.soap.attachments
Interface AttachmentMetaData

All Superinterfaces:
java.io.Serializable

public interface AttachmentMetaData
extends java.io.Serializable

Modeled heavily after the javax.xml.soap.MimeHeaders interface. This interface provides access to MIME headers describing attachment contents.


Method Summary
 void addMimeHeader(java.lang.String name, java.lang.String value)
          Adds a SerializableMimeHeader object with the specified name and value to this AttachmentMetaData object’s list of headers.
 java.util.Iterator getAllMimeHeaders()
          Returns all the MIME headers associated with the attachment’s metadata.
 java.lang.String getAttachmentID()
          Gets the unique storage ID associated with the attachment.
 java.util.Iterator getMatchingMimeHeaders(java.lang.String[] names)
          Returns all the MIME header objects whose name matches a name in the given array of names.
 java.lang.String[] getMimeHeader(java.lang.String name)
          Returns all of the values for the specified header as an array of String objects.
 java.util.Iterator getNonMatchingMimeHeaders(java.lang.String[] names)
          Returns all of MIME header objects whose name does not match a name in the given array of names.
 void removeAllMimeHeaders()
          Removes all the header entries from this attachment metadata object.
 void removeMimeHeader(java.lang.String name)
          Remove all MIME headers whose name matches the given name.
 void setMimeHeader(java.lang.String name, java.lang.String value)
          Replaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches.
 

Method Detail

getAttachmentID

java.lang.String getAttachmentID()
Gets the unique storage ID associated with the attachment.

Returns:
The unique ID for the individual attachment described by this meta data. Will not be null

addMimeHeader

void addMimeHeader(java.lang.String name,
                   java.lang.String value)
Adds a SerializableMimeHeader object with the specified name and value to this AttachmentMetaData object’s list of headers.

Parameters:
name - The name of the MIME header. Must not be null
value - The value of the MIME header. Must not be null
Throws:
java.lang.IllegalArgumentException - Thrown if either argument is null.

getAllMimeHeaders

java.util.Iterator getAllMimeHeaders()
Returns all the MIME headers associated with the attachment’s metadata. Objects returned by this iterator may be safely cast into SerializableMimeHeader.

Returns:
An iterator instance. Will not be null

getMimeHeader

java.lang.String[] getMimeHeader(java.lang.String name)
Returns all of the values for the specified header as an array of String objects.

Parameters:
name - The MIME header name. May not be null
Returns:
A list of string values for the specified MIME header. May be null if no such header exists.
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied header name is null.

getMatchingMimeHeaders

java.util.Iterator getMatchingMimeHeaders(java.lang.String[] names)
Returns all the MIME header objects whose name matches a name in the given array of names. Objects returned by this iterator may be safely cast into SerializableMimeHeader.

Parameters:
names - An array of header names. The array may not be null or contain any null entries
Returns:
An iterator instance. Will not be null
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied names list is null or contains a null entry.

getNonMatchingMimeHeaders

java.util.Iterator getNonMatchingMimeHeaders(java.lang.String[] names)
Returns all of MIME header objects whose name does not match a name in the given array of names. Objects returned by this iterator may be safely cast into SerializableMimeHeader.

Parameters:
names - An array of header names. The array may not be null or contain any null entries
Returns:
An iterator instance. Will not be null
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied names list is null or contains a null entry.

removeAllMimeHeaders

void removeAllMimeHeaders()
Removes all the header entries from this attachment metadata object.


removeMimeHeader

void removeMimeHeader(java.lang.String name)
Remove all MIME headers whose name matches the given name.

Parameters:
name - The name of the MIME headers to remove. May not be null
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied header name is null.

setMimeHeader

void setMimeHeader(java.lang.String name,
                   java.lang.String value)
Replaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches.

Parameters:
name - The name of the MIME header. May not be null
value - The value of the MIME header. May not be null
Throws:
java.lang.IllegalArgumentException - Thrown if either arguments are null.


Copyright © 2006 IBM Corp. All Rights Reserved.