Class SetupService

java.lang.Object
org.openremote.manager.setup.SetupService
All Implemented Interfaces:
org.openremote.model.ContainerService

public class SetupService extends Object implements org.openremote.model.ContainerService
Executes setup tasks for a clean installation when the application starts.

This service is disabled when PersistenceService.isCleanInstall() is false.

First, this service will load an implementation of SetupTasks from the classpath using ServiceLoader. If multiple providers are found, an error is raised. If a provider is found, its tasks will be used on top of KeycloakCleanSetup and KeycloakInitSetup which are auto-loaded if keycloak is enabled.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final List<org.openremote.model.setup.Setup>
     

    Fields inherited from interface org.openremote.model.ContainerService

    DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    <S extends org.openremote.model.setup.Setup>
    S
    getTaskOfType(Class<S> setupType)
     
    void
    init(org.openremote.model.Container container)
     
    void
    start(org.openremote.model.Container container)
     
    void
    stop(org.openremote.model.Container container)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • tasks

      protected final List<org.openremote.model.setup.Setup> tasks
  • Constructor Details

    • SetupService

      public SetupService()
  • Method Details

    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface org.openremote.model.ContainerService
    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container)
      Specified by:
      start in interface org.openremote.model.ContainerService
    • stop

      public void stop(org.openremote.model.Container container)
      Specified by:
      stop in interface org.openremote.model.ContainerService
    • getTaskOfType

      public <S extends org.openremote.model.setup.Setup> S getTaskOfType(Class<S> setupType)
    • toString

      public String toString()
      Overrides:
      toString in class Object