Package com.vaadin.v7.util
Class FileTypeResolver
- java.lang.Object
-
- com.vaadin.util.FileTypeResolver
-
- com.vaadin.v7.util.FileTypeResolver
-
- All Implemented Interfaces:
Serializable
@Deprecated public class FileTypeResolver extends FileTypeResolver implements Serializable
Deprecated.Only used for compatibility-serverUtility class that can figure out mime-types and icons related to files.Note : The icons are associated purely to mime-types, so a file may not have a custom icon accessible with this class.
- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceDEFAULT_ICONDeprecated.Default icon given if no icon is specified for a mime-type.-
Fields inherited from class com.vaadin.util.FileTypeResolver
DEFAULT_MIME_TYPE
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddIcon(String mimeType, Resource icon)Deprecated.Adds a icon for the given mime-type.static ResourcegetIcon(File file)Deprecated.Gets the descriptive icon representing a file.static ResourcegetIcon(String fileName)Deprecated.Gets the descriptive icon representing file, based on the filename.static Map<String,Resource>getMIMETypeToIconMapping()Deprecated.Gets the internal mime-type to icon mapping.-
Methods inherited from class com.vaadin.util.FileTypeResolver
addExtension, getExtensionToMIMETypeMapping, getMIMEType, getMIMEType
-
-
-
-
Field Detail
-
DEFAULT_ICON
public static Resource DEFAULT_ICON
Deprecated.Default icon given if no icon is specified for a mime-type.
-
-
Method Detail
-
getIcon
public static Resource getIcon(String fileName)
Deprecated.Gets the descriptive icon representing file, based on the filename. First the mime-type for the given filename is resolved, and then the corresponding icon is fetched from the internal icon storage. If it is not found the default icon is returned.- Parameters:
fileName- the name of the file whose icon is requested.- Returns:
- the icon corresponding to the given file
-
getIcon
public static Resource getIcon(File file)
Deprecated.Gets the descriptive icon representing a file. First the mime-type for the given file name is resolved, and then the corresponding icon is fetched from the internal icon storage. If it is not found the default icon is returned.- Parameters:
file- the file whose icon is requested.- Returns:
- the icon corresponding to the given file
-
addIcon
public static void addIcon(String mimeType, Resource icon)
Deprecated.Adds a icon for the given mime-type. If the mime-type also has a corresponding icon, it is replaced with the new icon.- Parameters:
mimeType- the mime-type whose icon is to be changed.icon- the new icon to be associated withMIMEType.
-
-