Package de.xima.fc.gui.elfinder
Class ElFinderUploadMime
- java.lang.Object
 - 
- de.xima.fc.gui.elfinder.ElFinderUploadMime
 
 
- 
- All Implemented Interfaces:
 Serializable
public final class ElFinderUploadMime extends Object implements Serializable
Model and utility class for the upload mime configuration of the ElFinder file manager.- Since:
 - 8.3.0
 - Author:
 - XIMA MEDIA GmbH
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElFinderUploadMime.EElFinderFirstOrderFirst order to check for mime types, corresponding to thefirstOrderproperty of the ElFinder upload mime configuration. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ElFinderUploadMimeallowAll()Allows all mime types.static ElFinderUploadMimeallowAllExcept(Set<String> deniedMimeTypes)Allows all mime types except for the given ones.booleanallowsMimeType(String mimeType)Checks whether this filter matches the given mime type.static ElFinderUploadMimecustom(ElFinderUploadMime.EElFinderFirstOrder firstOrder, Set<String> allow, Set<String> deny)Creates a new upload mime configuration with the given parameters.static ElFinderUploadMimedenyAll()Denies all mime types.static ElFinderUploadMimedenyAllExcept(Set<String> allowedMimeTypes)Denies all mime types except for the given ones.booleanequals(Object o)Set<String>getAllow()Get the mime types that are allowed.Set<String>getDeny()Get the mime types that are denied.ElFinderUploadMime.EElFinderFirstOrdergetFirstOrder()Get the first order to check for mime types.inthashCode() 
 - 
 
- 
- 
Method Detail
- 
allowsMimeType
public boolean allowsMimeType(String mimeType)
Checks whether this filter matches the given mime type.- Parameters:
 mimeType- The mime type to check.- Returns:
 - True if the mime type is allowed, false if it is denied.
 
 
- 
getAllow
public Set<String> getAllow()
Get the mime types that are allowed.- Returns:
 - The allowed mime types.
 
 
- 
getDeny
public Set<String> getDeny()
Get the mime types that are denied.- Returns:
 - The denied mime types.
 
 
- 
getFirstOrder
public ElFinderUploadMime.EElFinderFirstOrder getFirstOrder()
Get the first order to check for mime types.- Returns:
 - The first order.
 
 
- 
allowAll
public static ElFinderUploadMime allowAll()
Allows all mime types.- Returns:
 - An upload mime configuration that allows all mime types.
 
 
- 
allowAllExcept
public static ElFinderUploadMime allowAllExcept(Set<String> deniedMimeTypes)
Allows all mime types except for the given ones. This is effectively a blacklist of mime types.- Parameters:
 deniedMimeTypes- The mime types to deny.- Returns:
 - The upload mime configuration.
 
 
- 
custom
public static ElFinderUploadMime custom(ElFinderUploadMime.EElFinderFirstOrder firstOrder, Set<String> allow, Set<String> deny)
Creates a new upload mime configuration with the given parameters. Usually one of the static factory methods should suffice.- Parameters:
 firstOrder- The first order to check for mime types.allow- The mime types to allow.deny- The mime types to deny.- Returns:
 - The upload mime configuration.
 
 
- 
denyAll
public static ElFinderUploadMime denyAll()
Denies all mime types.- Returns:
 - An upload mime configuration that denies all mime types.
 
 
- 
denyAllExcept
public static ElFinderUploadMime denyAllExcept(Set<String> allowedMimeTypes)
Denies all mime types except for the given ones. This is effectively a whitelist of mime types.- Parameters:
 allowedMimeTypes- The mime types to allow.- Returns:
 - The upload mime configuration.
 
 
 - 
 
 -