Class ProcessService

java.lang.Object
de.bytestore.hostinger.process.service.ProcessService

@Service @Component public class ProcessService extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessService(WebhookService webhookService, io.jmix.core.UnconstrainedDataManager unconstrainedDataManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attach(Process processIO, ProcessConsole listenerIO)
    Attaches a Process Console to a process by invoking the attach method for all Process Listeners.
    int
    Retrieves the count of Process objects in the database.
    void
    create(Process processIO)
    Creates a new process by executing the create method for all Process Listeners.
    void
    execute(Process processIO, String commandIO)
    Executes a command for a process by invoking the execute method for all Process Listeners.
    boolean
    exitsInDb(io.jmix.core.DataManager manager, Process entity)
    This method checks if the given entity exists in the database.
    getConfig(String providerIO)
    Retrieves the configuration for the specified provider.
    Return all ExtensionPoints for Process API.
    logback(Process processIO)
    Retrieves the logback configuration for a process by invoking the logback method for all Process Listeners.
    void
    remove(Process processIO)
    Removes the given process by executing the remove method for all Process Listeners.
    void
    start(Process processIO)
    Starts the given process by executing the start method for all Process Listeners.
    stats(Process processIO)
    Returns the statistics of a process by invoking the stats method for all Process Listeners.
    status(Process processIO)
    Retrieves the status of the given process by executing the status method for all Process Listeners.
    void
    stop(Process processIO)
    Stops the given process by executing the stop method for all Process Listeners.
    volume(Volume volumeIO)
    Retrieves the volume for the specified Volumes object.
    void
    Registers event types with the WebhookHandler class.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProcessService

      public ProcessService(WebhookService webhookService, io.jmix.core.UnconstrainedDataManager unconstrainedDataManager)
  • Method Details

    • webhooks

      public void webhooks()
      Registers event types with the WebhookHandler class. The event types are registered for the specified class and listener.
    • list

      public List<ProcessExtensionPoint> list()
      Return all ExtensionPoints for Process API.
      Returns:
    • start

      public void start(Process processIO) throws Exception
      Starts the given process by executing the start method for all Process Listeners.
      Parameters:
      processIO - the process to start
      Throws:
      Exception
    • stop

      public void stop(Process processIO) throws Exception
      Stops the given process by executing the stop method for all Process Listeners.
      Parameters:
      processIO - the process to stop
      Throws:
      Exception
    • status

      public ProcessStatus status(Process processIO) throws Exception
      Retrieves the status of the given process by executing the status method for all Process Listeners.
      Parameters:
      processIO - the process for which to retrieve the status
      Returns:
      the status of the process
      Throws:
      Exception
    • create

      public void create(Process processIO)
      Creates a new process by executing the create method for all Process Listeners.
      Parameters:
      processIO - the process to be created
    • execute

      public void execute(Process processIO, String commandIO)
      Executes a command for a process by invoking the execute method for all Process Listeners.
      Parameters:
      processIO - the process for which the command is to be executed
      commandIO - the command to be executed for the process
    • attach

      public void attach(Process processIO, ProcessConsole listenerIO)
      Attaches a Process Console to a process by invoking the attach method for all Process Listeners.
      Parameters:
      processIO - the process to which the console is to be attached
      listenerIO - the ProcessConsole to be attached to the process
    • stats

      public ProcessStats stats(Process processIO)
      Returns the statistics of a process by invoking the stats method for all Process Listeners.
      Parameters:
      processIO - the process for which the statistics are to be retrieved
      Returns:
      the ProcessStats object containing the statistics of the process
    • logback

      public String logback(Process processIO)
      Retrieves the logback configuration for a process by invoking the logback method for all Process Listeners.
      Parameters:
      processIO - the process for which the logback configuration is to be retrieved
      Returns:
      the logback configuration as a string
    • exitsInDb

      public boolean exitsInDb(io.jmix.core.DataManager manager, Process entity)
      This method checks if the given entity exists in the database.
      Parameters:
      manager - The data manager for accessing the database.
      entity - The entity to check for existence in the database.
      Returns:
      true if the entity exists in the database, false otherwise.
    • volume

      public File volume(Volume volumeIO)
      Retrieves the volume for the specified Volumes object.
      Parameters:
      volumeIO - the Volumes object for which to retrieve the volume
      Returns:
      the File representing the volume
    • remove

      public void remove(Process processIO)
      Removes the given process by executing the remove method for all Process Listeners.
      Parameters:
      processIO - the process to remove
    • getConfig

      public ProcessExtensionConfig getConfig(String providerIO)
      Retrieves the configuration for the specified provider.
      Parameters:
      providerIO - the provider for which to retrieve the configuration
      Returns:
      the configuration for the specified provider
    • count

      public int count()
      Retrieves the count of Process objects in the database.
      Returns:
      the count of Process objects