001: /**
002: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
003: * Unpublished - rights reserved under the Copyright Laws of the United States.
004: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
005: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
006: *
007: * Use is subject to license terms.
008: *
009: * This distribution may include materials developed by third parties.
010: *
011: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
012: *
013: * Module Name : JSIP Specification
014: * File Name : ContentDispositionHeader.java
015: * Author : Phelim O'Doherty
016: *
017: * HISTORY
018: * Version Date Author Comments
019: * 1.1 08/10/2002 Phelim O'Doherty Initial version
020: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
021: */package javax.sip.header;
022:
023: import java.text.ParseException;
024:
025: /**
026: * The Content-Disposition header field describes how the message body or,
027: * for multipart messages, a message body part is to be interpreted by the
028: * UAC or UAS. This SIP header field extends the MIME Content-Type. Several
029: * new "disposition-types" of the Content-Disposition header are defined by
030: * SIP, namely:-
031: * <ul>
032: * <li>session - indicates that the body part describes a session, for either
033: * calls or early (pre-call) media.
034: * <li>render - indicates that the body part should be displayed or otherwise
035: * rendered to the user.
036: * <li>icon - indicates that the body part contains an image suitable as an
037: * iconic representation of the caller or callee that could be rendered
038: * informationally by a user agent when a message has been received, or
039: * persistently while a dialog takes place.
040: * <li>alert - indicates that the body part contains information, such as an
041: * audio clip, that should be rendered by the user agent in an attempt to alert
042: * the user to the receipt of a request, generally a request that initiates a
043: * dialog.
044: * </ul>
045: * For backward-compatibility, if the Content-Disposition header field is
046: * missing, the server SHOULD assume bodies of Content-Type application/sdp are
047: * the disposition "session", while other content types are "render".
048: * <p>
049: * If this header field is missing, the MIME type determines the default
050: * content disposition. If there is none, "render" is assumed.
051: * <p>
052: * For Example:<br>
053: * <code>Content-Disposition: session</code>
054: *
055: * @see ContentTypeHeader
056: * @see ContentLengthHeader
057: * @see ContentEncodingHeader
058: * @see ContentLanguageHeader
059: *
060: * @author BEA Systems, NIST
061: * @version 1.2
062: */
063: public interface ContentDispositionHeader extends Parameters, Header {
064:
065: /**
066: * Sets the interpretation value of the message body or message body part
067: * for this ContentDispositionHeader.
068: *
069: * @param dispositionType the new String value of the
070: * disposition type.
071: * @throws ParseException which signals that an error has been reached
072: * unexpectedly while parsing the dispositionType parameter.
073: */
074: public void setDispositionType(String dispositionType)
075: throws ParseException;
076:
077: /**
078: * Gets the interpretation of the message body or message body part of
079: * this ContentDispositionHeader.
080: *
081: * @return interpretation of the message body or message body part
082: */
083: public String getDispositionType();
084:
085: /**
086: * The handling parameter describes how the UAS should react if it
087: * receives a message body whose content type or disposition type it
088: * does not understand. The parameter has defined values of "optional"
089: * and "required". If the handling parameter is missing, the value
090: * "required" SHOULD be assumed.
091: *
092: * @param handling the new String value either "optional"
093: * or "required".
094: * @throws ParseException which signals that an error has been reached
095: * unexpectedly while parsing the handling parameter.
096: */
097: public void setHandling(String handling) throws ParseException;
098:
099: /**
100: * Gets the handling information of the unknown content disposition of the
101: * ContentDispositionHeader.
102: *
103: * @return handling information for unknown content dispositions.
104: */
105: public String getHandling();
106:
107: /**
108: * Name of ContentDispositionHeader
109: */
110: public final static String NAME = "Content-Disposition";
111:
112: /**
113: * Session Disposition Type Constant
114: */
115: public final static String SESSION = "Session";
116:
117: /**
118: * Render Disposition Type Constant
119: */
120: public final static String RENDER = "Render";
121:
122: /**
123: * Icon Disposition Type Constant
124: */
125: public final static String ICON = "Icon";
126:
127: /**
128: * Alert Disposition Type Constant
129: */
130: public final static String ALERT = "Alert";
131:
132: }
|