Package org.cyclos.model.utils
Enum FileMimeType
- java.lang.Object
-
- java.lang.Enum<FileMimeType>
-
- org.cyclos.model.utils.FileMimeType
-
- All Implemented Interfaces:
Serializable,Comparable<FileMimeType>,HasMessageKey
public enum FileMimeType extends Enum<FileMimeType> implements HasMessageKey
Possible mime types for uploading files
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUDIOAudioHTMLHTML documentIMAGEImageMS_EXCELMicrosoft Excel spreadsheetMS_POWERPOINTMicrosoft PowerPoint presentationMS_WORDMicrosoft Word documentOD_PRESENTATIONOpenDocument presentationOD_SPREADSHEETOpenDocument spreadsheetOD_TEXTOpenDocument textOTHERSOthersPDFPDF documentRTFRTF documentTEXTPlain textVIDEOVideo
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageKeygetMessageKey()List<String>getMimeTypes()static FileMimeTypeof(String mimeType)Returns theFileMimeTypecorresponding to the given mime type, or null if none matchstatic FileMimeTypevalueOf(String name)Returns the enum constant of this type with the specified name.static FileMimeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TEXT
public static final FileMimeType TEXT
Plain text
-
HTML
public static final FileMimeType HTML
HTML document
-
PDF
public static final FileMimeType PDF
PDF document
-
RTF
public static final FileMimeType RTF
RTF document
-
MS_WORD
public static final FileMimeType MS_WORD
Microsoft Word document
-
MS_EXCEL
public static final FileMimeType MS_EXCEL
Microsoft Excel spreadsheet
-
MS_POWERPOINT
public static final FileMimeType MS_POWERPOINT
Microsoft PowerPoint presentation
-
OD_TEXT
public static final FileMimeType OD_TEXT
OpenDocument text
-
OD_SPREADSHEET
public static final FileMimeType OD_SPREADSHEET
OpenDocument spreadsheet
-
OD_PRESENTATION
public static final FileMimeType OD_PRESENTATION
OpenDocument presentation
-
IMAGE
public static final FileMimeType IMAGE
Image
-
AUDIO
public static final FileMimeType AUDIO
Audio
-
VIDEO
public static final FileMimeType VIDEO
Video
-
OTHERS
public static final FileMimeType OTHERS
Others
-
-
Method Detail
-
values
public static FileMimeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FileMimeType c : FileMimeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileMimeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
of
public static FileMimeType of(String mimeType)
Returns theFileMimeTypecorresponding to the given mime type, or null if none match
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
-