1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.registry;
18
19 import java.util.Iterator;
20 import org.apache.jetspeed.util.MimeType;
21
22 /***
23 * <P>
24 * The <CODE>MimeTypeMap</CODE> interface represents a list that
25 * stores all mimetypes a client supports. The mimetypes are stored
26 * in decreasing order of importance. The very first mimetype is the
27 * preferred mimetype of the client.
28 * </P>
29 *
30 * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
31 * @author <a href="raphael@apache.org">Raphaël Luta</a>
32 * @version $Id: MimetypeMap.java,v 1.3 2004/02/23 03:11:39 jford Exp $
33 */
34 public interface MimetypeMap
35 {
36
37 /***
38 * Returns an enumeration of all mimetypes the client supports.
39 *
40 * @return an enumeration of all mimetypes
41 */
42 public Iterator getMimetypes();
43
44 /***
45 * Returns the preferred mimetype of the client.
46 *
47 * @return the preferred mimetype
48 */
49 public MimeType getPreferredMimetype();
50
51 /***
52 * Adds the given mimetype
53 *
54 * @param name the name of the mimetype
55 */
56 public void addMimetype(String name);
57
58 /***
59 * Removes the given mimetype
60 *
61 * @param name the mimetype to be removed
62 */
63 public void removeMimetype(String name);
64
65 }