Interface MediaStorageInitializer

  • All Known Implementing Classes:
    GridFSMediaStorageCleaner, LocalFileMediaStorageCleaner, S3MediaStorageCleaner, WindowsAzureBlobStorageStrategy

    public interface MediaStorageInitializer
    Allows to prepare storage during initialization and update of the hybris system. Initialization process removes whole data, thus any binary data from the media storage cannot be managed by platform anymore. The best approach is to clear media storage on initialization completely. Please keep in mind that during initialization process hybris platform is not fully started and using any Models, Items or other services related to persistence may not be possible.
    • Method Detail

      • onInitialize

        void onInitialize()
        Prepares media storage on initialization.
      • onUpdate

        void onUpdate()
        Prepares media storage on update.
      • failOnInitUpdateError

        default boolean failOnInitUpdateError()
        defines if the init or update process should stop on errors (e.g. during communication with external media storage). Default is taken from the configuration - media.storage.strategy.failoninitupdaterror.
        Returns:
        true if init or update proccess should stop, otherwise false
      • checkStorageConnection

        default void checkStorageConnection()
        checks if communication with external media storage is possible.
        Throws:
        ExternalStorageServiceException - when communication with storage doesn't work