blob: 1bf96350404e539eb56c34cb2dcd525345f9787e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
package org.eclipse.team.core;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
/**
* Provides a generic registry for keys and values based on file extensions.
*
* File extensions should be considered without the usual "*." prefix.
*/
public interface IFileTypeRegistry {
/**
* Return the value of the given key for the given file extension.
* <p>
* Example:
* <p>
* String value = getValue("txt", "isAscii");
*
* @param extension the extension
* @param key the key
* @return the value for the given extension and key
*/
public String getValue(String extension, String key);
/**
* Return all extensions for which the given key is defined.
* <p>
* Example:
* <p>
* String[] extensions = getValue("isAscii");
*
* @param key the key
* @return the extensions for which the given key is defined
*/
public String[] getExtensions(String key);
/**
* Set the value of the given key, for files of type extension.
* <p>
* Example:
* <p>
* setValue("txt", "isAscii", "true");
*
* @param extension the file extension
* @param key the key
* @param value the value
*/
public void setValue(String extension, String key, String value);
/**
* Return whether the registry contains a value for the specified
* extension and key.
*
* @param extension the file extension
* @param key the key
* @return the value for the extension and key, if applicable
*/
public boolean containsKey(String extension, String key);
}
|