Package io.jmix.core
Interface FileStorageLocator
- All Known Implementing Classes:
FileStorageLocatorImpl
public interface FileStorageLocator
Provides access to all registered file storage beans of the application.
If exactly one file storage registered in the application, this file storage is considered as the default
file storage of the application. If more than one file storage registered, the default file storage
should be specified in the jmix.core.defaultFileStorage
application property.
-
Method Summary
Modifier and TypeMethodDescription<T extends FileStorage>
TReturns the file storage with the given name determined byFileStorage.getStorageName()
.<T extends FileStorage>
TReturns the default file storage of the application.
-
Method Details
-
getByName
Returns the file storage with the given name determined byFileStorage.getStorageName()
.- Parameters:
storageName
- file storage name- Returns:
- file storage
- Throws:
IllegalArgumentException
- if no file storage with the given name found
-
getDefault
Returns the default file storage of the application.- Returns:
- file storage
- Throws:
IllegalStateException
- if no file storage registered in the application or there are more than one file storage registered and the default file storage is not specified in thejmix.core.defaultFileStorage
application property.
-