KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdic > filetypes > internal > AppAssociationReader


1 /*
2  * Copyright (C) 2004 Sun Microsystems, Inc. All rights reserved. Use is
3  * subject to license terms.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the Lesser GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  */

20
21 package org.jdesktop.jdic.filetypes.internal;
22
23
24 import java.net.URL JavaDoc;
25 import java.util.List JavaDoc;
26
27
28 /**
29  * Containing funtions to retrieve association information
30  */

31 public interface AppAssociationReader {
32
33     /**
34      * Returns the description associated with the given mime type.
35      *
36      * @param mimeType Given mime type
37      * @return String
38      */

39     public abstract String JavaDoc getDescriptionByMimeType(String JavaDoc mimeType);
40   
41     /**
42      * Returns the description associated with the given file extension.
43      *
44      * @param fileExt Given file extension
45      * @return String
46     */

47     public abstract String JavaDoc getDescriptionByFileExt(String JavaDoc fileExt);
48
49     /**
50      * Returns the mime type associated with the given URL, by checking the content of
51      * the URL.
52      *
53      * @param url The specified URL
54      * @return String
55      */

56     public abstract String JavaDoc getMimeTypeByURL(URL JavaDoc url);
57
58     /**
59      * Returns the file extensione list associated with the given mime type.
60      *
61      * @param mimeType Given mime type
62      * @return String
63      */

64     public abstract List JavaDoc getFileExtListByMimeType(String JavaDoc mimeType);
65   
66     /**
67      * Returns the mime type associated with the given file extension.
68      *
69      * @param fileExt Given file extension
70      * @return String
71      */

72     public abstract String JavaDoc getMimeTypeByFileExt(String JavaDoc fileExt);
73   
74     /**
75      * Returns the icon file name associated with the given mime type.
76      *
77      * @param mimeType Given mime type.
78      * @return icon file name
79      */

80     public abstract String JavaDoc getIconFileNameByMimeType(String JavaDoc mimeType);
81   
82     /**
83      * Returns the icon file name associated with the given file extension.
84      *
85      * @param fileExt Given file extension.
86      * @return icon file name
87      */

88     public abstract String JavaDoc getIconFileNameByFileExt(String JavaDoc fileExt);
89  
90     /**
91      * Returns the action list associated with the given file extension.
92      *
93      * @param fileExt Given file extension
94      * @return the action list
95      */

96     public abstract List JavaDoc getActionListByFileExt(String JavaDoc fileExt);
97
98     /**
99      * Returns the action list associated with the given mime type.
100      *
101      * @param mimeType Given mime type
102      * @return the action list
103      */

104     public abstract List JavaDoc getActionListByMimeType(String JavaDoc mimeType);
105     
106     /**
107      * Returns true if the mime type exists in the system.
108      *
109      * @param mimeType given mimeType
110      * @return true if the mime type exists in the system
111      */

112     public boolean isMimeTypeExist(String JavaDoc mimeType);
113
114     /**
115      * Returns true if the file extension exists in the system.
116      *
117      * @param fileExt given file extension
118      * @return true if the file extension exists in the system
119      */

120     public boolean isFileExtExist(String JavaDoc fileExt);
121 }
122
Popular Tags