Class PendingExportService

java.lang.Object
com.axelor.rpc.PendingExportService

@Singleton public class PendingExportService extends Object
Manages pending export files.

Pending export files expire after some period of time and are automatically deleted if not consumed.

  • Constructor Details

    • PendingExportService

      public PendingExportService()
  • Method Details

    • add

      public String add(InputStream stream)
      Adds a pending export file.

      Creates a temporary file from the given stream and returns the token associated with it.

      Parameters:
      stream - the stream to the export file
      Returns:
      the token associated with the pending export file
    • get

      @Nullable public Path get(String token)
      Returns the pending export file by its token.
      Parameters:
      token - the token associated with the pending export file
      Returns:
      the pending export file or null
    • remove

      @Nullable public Path remove(String token)
      Removes and returns the pending export file by its token.

      It is your responsibility to delete the export file after you're done with it.

      Parameters:
      token - the token associated with the pending export file
      Returns:
      the pending export file or null