Class PluginResponse


  • public final class PluginResponse
    extends Object
    Get the response from a configuration step or execution of a plugin. Use getStatus() to find out the status of the last invokation. See PluginRequest for more information.
    Version:
    2.0
    Author:
    Nicklas
    Last modified
    $Date$
    • Field Detail

      • response

        private final Response response
      • allowImmediateExecution

        private final boolean allowImmediateExecution
      • allowImmediateDownload

        private final boolean allowImmediateDownload
      • message

        private String message
      • dryRun

        private boolean dryRun
      • suggestedJobName

        private String suggestedJobName
      • clearState

        private boolean clearState
      • nextCommand

        private String nextCommand
    • Constructor Detail

      • PluginResponse

        PluginResponse​(PluginConfigurationRequest request,
                       boolean allowImmediateExection,
                       boolean allowImmediateDownload,
                       boolean dryRun)
    • Method Detail

      • getStatus

        public Response.Status getStatus()
        Get the status of the response.
      • isDryRun

        public boolean isDryRun()
        Check if the job should be executed or was executed in dry-run mode.
        Since:
        2.8
      • getSuggestedJobName

        public String getSuggestedJobName()
        Get the job name that was suggested by the job.
        Returns:
        A job name or null if no name has been suggested
        Since:
        2.17
      • getMessage

        public String getMessage()
        Get the return message from the plugin.
      • getEstimatedExecutionTime

        public Job.ExecutionTime getEstimatedExecutionTime()
        Get the estimated execution time of the job. This value is only meaningful after a successful configuration sequence for a job.
      • getNextCommand

        public String getNextCommand()
        Get the next command sent via Response.Status.CONTINUE.
        Returns:
        The next command or null
        Since:
        2.16
      • getState

        public Serializable getState()
        Get the state information that the plug-in wants to save until it is restarted again.
        Since:
        3.11
      • getClearState

        public boolean getClearState()
        If set after a job configuration sequence, the saved state should be cleared before starting the job.
        Since:
        3.11
      • saveParameters

        public void saveParameters​(DbControl dc)
        Save all parameters that has been configured during the configuration sequence to the database.
        Parameters:
        dc - An open DbControl to use when accessing the database.
      • setError

        void setError​(String message,
                      Throwable t)
        Set a singe error message.