Class ElFinderUploadMime
java.lang.Object
de.xima.fc.gui.elfinder.ElFinderUploadMime
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumFirst order to check for mime types, corresponding to thefirstOrderproperty of the ElFinder upload mime configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 ElFinderUploadMimeCreates 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.booleangetAllow()Get the mime types that are allowed.getDeny()Get the mime types that are denied.Get the first order to check for mime types.inthashCode()
-
Method Details
-
allowsMimeType
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.
-
equals
-
getAllow
-
getDeny
-
getFirstOrder
Get the first order to check for mime types.- Returns:
- The first order.
-
hashCode
-
allowAll
Allows all mime types.- Returns:
- An upload mime configuration that allows all mime types.
-
allowAllExcept
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
Denies all mime types.- Returns:
- An upload mime configuration that denies all mime types.
-
denyAllExcept
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.
-