Package org.silverpeas.core.util
Class MimeTypes.MimeTypeRegistry
- java.lang.Object
-
- org.silverpeas.core.util.MimeTypes.MimeTypeRegistry
-
- Enclosing class:
- MimeTypes
public static class MimeTypes.MimeTypeRegistry extends Object
Handles registry of mime type which is provided by different kind of sources.To initialize the registry, a supplier of document extensions and default mime types are required.
- If the supplier provides the value
deactivated
, then the registry is purged and contains no mime-type, - If the supplier provides an empty value (or a not defined value), then the registry is loaded with the default given mime types,
- If the supplier provides a list of document extensions, then the registry is loaded with them and default given mime types are ignored,
- If the supplier provides a list with the prefix
(+)
, then the registry is loaded with them and also with the given default mime types.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
currentMimeTypes
-
Constructor Summary
Constructors Constructor Description MimeTypeRegistry(Supplier<String> extensionProvider, Set<String> defaultMimeTypes)
-