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 Details

    • getByName

      <T extends FileStorage> T getByName(String storageName)
      Returns the file storage with the given name determined by FileStorage.getStorageName().
      Parameters:
      storageName - file storage name
      Returns:
      file storage
      Throws:
      IllegalArgumentException - if no file storage with the given name found
    • getDefault

      <T extends FileStorage> T 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 the jmix.core.defaultFileStorage application property.