Package io.wcm.handler.media
Enum MediaFileType
- java.lang.Object
-
- java.lang.Enum<MediaFileType>
-
- io.wcm.handler.media.MediaFileType
-
- All Implemented Interfaces:
Serializable,Comparable<MediaFileType>
@ProviderType public enum MediaFileType extends Enum<MediaFileType>
File types supported by Media Handler.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @NotNull Set<String>getBrowserImageContentTypes()static @NotNull Set<String>getBrowserImageFileExtensions()Set<String>getContentTypes()Set<String>getExtensions()static @NotNull Set<String>getFlashContentTypes()Deprecated.Flash support is deprecatedstatic @NotNull Set<String>getFlashFileExtensions()Deprecated.Flash support is deprecatedstatic @NotNull Set<String>getImageContentTypes()static @NotNull Set<String>getImageFileExtensions()static @NotNull Set<String>getVectorImageContentTypes()static @NotNull Set<String>getVectorImageFileExtensions()static booleanisBrowserImage(@Nullable String fileExtension)Check if the given file extension is supported for direct display in a browser.static booleanisFlash(@Nullable String fileExtension)Deprecated.Flash support is deprecatedstatic booleanisImage(@Nullable String fileExtension)Check if the given file extension is supported by the Media Handler for rendering as image.static booleanisVectorImage(@Nullable String fileExtension)Check if the given file extension is a vector image file extension.static MediaFileTypevalueOf(String name)Returns the enum constant of this type with the specified name.static MediaFileType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JPEG
public static final MediaFileType JPEG
JPEG
-
PNG
public static final MediaFileType PNG
PNG
-
GIF
public static final MediaFileType GIF
GIF
-
TIFF
public static final MediaFileType TIFF
TIFF
-
SVG
public static final MediaFileType SVG
SVG
-
SWF
@Deprecated public static final MediaFileType SWF
Deprecated.Flash support is deprecatedFlash
-
-
Method Detail
-
values
public static MediaFileType[] 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 (MediaFileType c : MediaFileType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MediaFileType 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
-
isImage
public static boolean isImage(@Nullable @Nullable String fileExtension)Check if the given file extension is supported by the Media Handler for rendering as image.- Parameters:
fileExtension- File extension- Returns:
- true if image
-
getImageFileExtensions
@NotNull public static @NotNull Set<String> getImageFileExtensions()
- Returns:
- Image file extensions supported by the Media Handler for rendering as image.
-
getImageContentTypes
@NotNull public static @NotNull Set<String> getImageContentTypes()
- Returns:
- Image content types supported by the Media Handler for rendering as image.
-
isBrowserImage
public static boolean isBrowserImage(@Nullable @Nullable String fileExtension)Check if the given file extension is supported for direct display in a browser.- Parameters:
fileExtension- File extension- Returns:
- true if image is supported in browsers
-
getBrowserImageFileExtensions
@NotNull public static @NotNull Set<String> getBrowserImageFileExtensions()
- Returns:
- Image file extensions supported for direct display in a browser.
-
getBrowserImageContentTypes
@NotNull public static @NotNull Set<String> getBrowserImageContentTypes()
- Returns:
- Image content types supported for direct display in a browser.
-
isVectorImage
public static boolean isVectorImage(@Nullable @Nullable String fileExtension)Check if the given file extension is a vector image file extension.- Parameters:
fileExtension- File extension- Returns:
- true if image is a vector image.
-
getVectorImageFileExtensions
@NotNull public static @NotNull Set<String> getVectorImageFileExtensions()
- Returns:
- Image file extensions that are vector images.
-
getVectorImageContentTypes
@NotNull public static @NotNull Set<String> getVectorImageContentTypes()
- Returns:
- Image content types that are vector images.
-
isFlash
@Deprecated public static boolean isFlash(@Nullable @Nullable String fileExtension)
Deprecated.Flash support is deprecatedCheck if the given file extension is an flash.- Parameters:
fileExtension- File extension- Returns:
- true if flash
-
getFlashFileExtensions
@Deprecated @NotNull public static @NotNull Set<String> getFlashFileExtensions()
Deprecated.Flash support is deprecated- Returns:
- Flash file extensions
-
getFlashContentTypes
@Deprecated @NotNull public static @NotNull Set<String> getFlashContentTypes()
Deprecated.Flash support is deprecated- Returns:
- Flash content types
-
-