Interface VolatileResourceCleaner

  • All Known Implementing Classes:
    SimpleDocumentService

    public interface VolatileResourceCleaner

    Some treatments needs sometimes to attach resources to a Contribution by using its identifier (WYSIWYG and images on a contribution creation for example). But the Contribution is not always yet registered into the repository when the attachments are realized. It is at this moment that VolatileResourceCacheService is used.
    When a such service is used, some resources have to be cleared in case where creation of a Contribution that has been aborted before its validation.

    So all the services which potentially are used by volatile services should implements this interface.
    At the end of the user session, cleanVolatileResources(String, String) of all implementations is called in order to clean the volatile context.

    Author:
    silveryocha
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cleanVolatileResources​(String volatileResourceId, String componentInstanceIdentifier)
      Cleans the resources referenced with the given resource identifier and linked to the component instance represented by the given identifier.
    • Method Detail

      • cleanVolatileResources

        void cleanVolatileResources​(String volatileResourceId,
                                    String componentInstanceIdentifier)
        Cleans the resources referenced with the given resource identifier and linked to the component instance represented by the given identifier.
        Parameters:
        volatileResourceId - a resource identifier.
        componentInstanceIdentifier - a component instance identifier.