KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > registry > MimetypeMap


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.om.registry;
18
19 import java.util.Iterator JavaDoc;
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 JavaDoc 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 JavaDoc name);
57
58     /**
59      * Removes the given mimetype
60      *
61      * @param name the mimetype to be removed
62      */

63     public void removeMimetype(String JavaDoc name);
64
65 }
66
Popular Tags