Interface ServerConfiguration


public interface ServerConfiguration
Interface providing means to operate on server configuration.
Since:
4.0
  • Field Details

  • Method Details

    • getWebmonAjaxSyncTimeout

      int getWebmonAjaxSyncTimeout()
      Returns the in the fs-server.conf specified data sync time out for ajax in webmonitor
      Returns:
      data sync time in seconds
      Since:
      4.0
    • getWebmonAjaxImageTimeout

      int getWebmonAjaxImageTimeout()
      Returns the in the fs-server.conf specified image reload time out in webmonitor
      Returns:
      image reload time in seconds
      Since:
      4.0
    • getAdminMail

      String getAdminMail()
      Returns the administrators email address used to send notification mails to.
      Returns:
      The administrators email address used to send notification mails to.
      Since:
      4.0
    • setAdminMail

      void setAdminMail(String mail)
      Sets the administrators email address used to send notification mails to.
      Parameters:
      mail - The email address.
      Since:
      4.0
    • getHddWarnLimit

      @Deprecated int getHddWarnLimit()
      Deprecated.
      since 5.2.230209 - replaced by getFreeSpaceWarnLimit().
      Returns percental limit of hard disk drive space left, a warning mail is issued if this limit is exceeded.
      Returns:
      The limit in percent or -1 if the limit is in another format (see deprecation).
      Since:
      4.2.436
      See Also:
    • getFreeSpaceWarnLimit

      String getFreeSpaceWarnLimit()
      Get server minimum free space warning limit. If the free space left on the server falls below the limit, a warning mail is issued.
      The value is returned in one of the supported limit formats:
      • Relative percent values. A warning mail is sent if the used space exceeds the configured value: 90%
      • Absolute size values. A warning mail is sent if the free space falls below the configured value: 75000k, 1500m, 3g
      Returns:
      The free space shutdown limit.
      Since:
      5.2.230209
      See Also:
    • setFreeSpaceWarnLimit

      void setFreeSpaceWarnLimit(@NotNull @NotNull String limit) throws IllegalArgumentException
      Set server minimum free space warning limit in one of the supported formats. If the free space left on the server falls below the limit, a warning mail is issued.
      Supported limit value formats:
      • Relative percent values. A warning mail is sent if the used space exceeds the configured value: 90%
      • Absolute size values. A warning mail is sent if the free space falls below the configured value: 75000k, 1500m, 3g
      Parameters:
      limit - The free space warning mail limit.
      Throws:
      IllegalArgumentException - If the limit is not in a supported format.
      Since:
      5.2.230209
    • isHddWarnLimitActive

      boolean isHddWarnLimitActive()
      Returns whether or not a warning mail will be issues if space left limit is exceeded.
      Returns:
      whether or not a warning mail will be issues if space left limit is exceeded.
      Since:
      4.2.436
    • getHddShutdownLimit

      @Deprecated int getHddShutdownLimit()
      Deprecated.
      since 5.2.230209 - replaced by getFreeSpaceShutdownLimit().
      Limit in percent of hard disk drive space left, the server will be shut down if this limit is exceeded.
      Returns:
      The limit in percent or -1 if the limit is in another format (see deprecation).
      Since:
      4.2.427
      See Also:
    • getFreeSpaceShutdownLimit

      String getFreeSpaceShutdownLimit()
      Get server minimum free space shutdown limit. If the free space left on the server falls below the limit, the server will shut down.
      The value is returned in one of the supported limit formats:
      • Relative percent values. The server will shutdown if the used space exceeds the configured value: 90%
      • Absolute size values. The server will shutdown if the free space falls below the configured value: 75000k, 1500m, 3g
      Returns:
      The free space shutdown limit.
      Since:
      5.2.230209
      See Also:
    • setFreeSpaceShutdownLimit

      void setFreeSpaceShutdownLimit(@NotNull @NotNull String limit) throws IllegalArgumentException
      Set server minimum free space shutdown limit in one of the supported formats. If the free space left on the server falls below the limit, the server will shut down.
      Supported limit value formats:
      • Relative percent values. The server will shutdown if the used space exceeds the configured value: 90%
      • Absolute size values. The server will shutdown if the free space falls below the configured value: 75000k, 1500m, 3g
      Parameters:
      limit - The free space shutdown limit.
      Throws:
      IllegalArgumentException - If the limit is not in a supported format.
      Since:
      5.2.230209
    • isHddShutdownLimitActive

      boolean isHddShutdownLimitActive()
      Returns whether or not the server will be shut down if space left limit is exceeded.
      Returns:
      wether or not the server will be shut down if space left limit is exceeded.
      Since:
      4.2.436
      See Also:
    • getHddDirectories

      String getHddDirectories()
      Returns directories used for disk space check (comma separated)
      Returns:
      Directories used for disk space check (comma separated)
      Since:
      4.2.427
    • getMemoryMax

      long getMemoryMax()
      Returns the maximum amount of memory that the Java virtual machine of the server will attempt to use
      Returns:
      the maximum amount of memory in MB
      Since:
      4.0
    • getMemoryLimit

      String getMemoryLimit()
      Returns the maximum percentage of memory to be used.
      Returns:
      The maximum percentage of memory to be used.
      Since:
      4.0
    • getMotD

      String getMotD(String language, boolean checkActive)
      Returns the Message of the Day of the specified language if it exists and checkActive is set to false, otherwise returns null.
      Parameters:
      language - language.
      checkActive - check active
      Returns:
      specific Message of the Day or null if it shouldn't be visible or doesn't exist.
      Since:
      4.0
    • getMotD

      String getMotD(String language)
      Returns the Message of the Day of the specified language if it exists and should be visible, otherwise returns null.
      Parameters:
      language - language.
      Returns:
      specific Message of the Day or null if it shouldn't be visible or doesn't exist.
      Since:
      4.0
    • getQuickstart

      List<Quickstart> getQuickstart()
      Returns the list of quickstart items configured.
      Returns:
      The list of quickstart items.
      Since:
      4.0
    • getWebstartConfiguration

      @NotNull @NotNull WebstartConfiguration getWebstartConfiguration(@NotNull @NotNull String name)
      Returns the webstart configuration specified by the given name.
      Parameters:
      name - one of WEBSTART_CONFIG_ADMIN or WEBSTART_CONFIG_CLIENT
      Returns:
      The webstart configuration specified by the given name.
      Since:
      4.0
    • getStatisticStart

      long getStatisticStart()
      Convenient accessor for reading the statistic start time (hour of day).
      Returns:
      The statistic start time.
      Since:
      4.0
    • isMemoryWarnActive

      boolean isMemoryWarnActive()
      Returns true if the memory warning is enabled.
      If enabled a notification email will be send to the configured email address.
      Returns:
      true if the memory warning is enabled.
      Since:
      4.0
    • isOutOfMemoryWarnActive

      boolean isOutOfMemoryWarnActive()
      Returns true if the out of memory warning for the FirstSpirit server is enabled, false otherwise.
      Returns:
      true if the out of memory warning for the FirstSpirit server is enabled, false otherwise.
      Since:
      4.0
    • isMotDVisible

      boolean isMotDVisible()
      Returns true if the Message of the Day is to be shown, false otherwise.
      Returns:
      true if the Message of the Day is to be shown, false otherwise.
      Since:
      4.0
    • isInternalDatabaseHidden

      boolean isInternalDatabaseHidden()
      Returns if the internal database layer (Derby) should be hidden in the ServerManager
      Returns:
      true if the layer should be hidden, false otherwise.
      Since:
      5.2.230101
    • setHddWarnLimit

      @Deprecated void setHddWarnLimit(int limit)
      Deprecated.
      since 5.2.230209 - replaced by setFreeSpaceWarnLimit(String).
      Set limit in percent of hard disk drive space left, a warning mail is issued if this limit is exceeded.
      Parameters:
      limit - limit in percent
      Since:
      4.2.436
      See Also:
    • setHddWarnLimitActive

      void setHddWarnLimitActive(boolean active)
      Sets wether or not a warning mail should be issued if limit is exceeded.
      Parameters:
      active - warning mail enabled or not
      Since:
      4.2.436
      See Also:
    • setHddShutdownLimit

      @Deprecated void setHddShutdownLimit(int limit)
      Deprecated.
      since 5.2.230209 - replaced by setFreeSpaceShutdownLimit(String).
      Set limit in percent of hard disk drive space left, the server will be shut down if this limit is exceeded.
      Parameters:
      limit - limit in percent
      Since:
      4.2.427
      See Also:
    • setHddShutdownLimitActive

      void setHddShutdownLimitActive(boolean active)
      Sets wether or not the server will be shut down if limit is exceeded.
      Parameters:
      active - server shut down enabled or not
      Since:
      4.2.436
      See Also:
    • setHddDirectories

      void setHddDirectories(String directories)
      Set directories to check the hdd free space left (comma separated).
      Parameters:
      directories - comma separated list of directories
      Since:
      4.2.427
    • setMemoryLimit

      void setMemoryLimit(String limit)
      Sets the maximum percentage of memory to be used.
      Parameters:
      limit - The maximum percentage of memory to be used.
      Since:
      4.0
    • setMemoryWarnActive

      void setMemoryWarnActive(boolean active)
      Provide true to enable the memory warning, false otherwise.
      If enabled a notification email will be send to the configured email address.
      Parameters:
      active - true to enable the memory warning, false otherwise.
      Since:
      4.0
    • setOutOfMemoryWarnActive

      void setOutOfMemoryWarnActive(boolean active)
      Activates / deactivates the out of memory warning for the FirstSpirit server.
      Call save() to make this change persistent on the FirstSpirit server.
      Since:
      4.0
    • setStatisticStart

      void setStatisticStart(long hour)
      Sets the start time for statistics.
      Parameters:
      hour - The hour of day.
      Since:
      4.0
    • setMotD

      void setMotD(String language, String text)
      Sets or deletes the Message of the Day of the specified language.
      Parameters:
      language - language, for which the MotD should be set.
      text - Message of the Day (null to delete MotD).
      Since:
      4.0
    • setMotDVisible

      void setMotDVisible(boolean show)
      Sets whether to show the Message of the Day or not.
      Since:
      4.0
    • setQuickstart

      void setQuickstart(List<Quickstart> quickstartList)
      Sets the list of quickstart items.
      Parameters:
      quickstartList - The list of quickstart items.
      Since:
      4.0
    • setWebstartConfiguration

      void setWebstartConfiguration(@NotNull @NotNull String name, @NotNull @NotNull WebstartConfiguration config)
      Sets the configuration of webstart for the given application.
      Parameters:
      name - Either WEBSTART_CONFIG_CLIENT or WEBSTART_CONFIG_ADMIN.
      config - The configuration to set.
      Since:
      4.0
    • setActiveWebserverConfiguration

      void setActiveWebserverConfiguration(@NotNull @NotNull String webAppName, @NotNull @NotNull String selectedWebserver)
      Sets the configuration of the given webserver as active for the named web application.
      Parameters:
      webAppName - The web application name.
      selectedWebserver - The name of the webserver to be set active.
      Since:
      4.0
    • getActiveWebserverConfiguration

      String getActiveWebserverConfiguration(@NotNull @NotNull String webAppName)
      Gets the active webserver for the named web application.
      Parameters:
      webAppName - The web application name.
      Returns:
      The active webserver.
      Since:
      4.0
    • setSelectedWebserverConfiguration

      @Deprecated void setSelectedWebserverConfiguration(@NotNull @NotNull String webAppName, @NotNull @NotNull String selectedWebserver)
      Deprecated.
      since 5.2.180906 - no replacement
      Sets the configuration of the given webserver as selected for the named web application.
      Parameters:
      webAppName - The web application name.
      selectedWebserver - The name of the webserver to be set selected.
      Since:
      4.0
    • getSelectedWebserverConfiguration

      @Deprecated String getSelectedWebserverConfiguration(@NotNull @NotNull String webAppName)
      Deprecated.
      since 5.2.180906 - no replacement
      Gets the selected webserver for the named web application.
      Parameters:
      webAppName - The web application name.
      Returns:
      The selected webserver.
      Since:
      4.0
    • setPluggabilityFeaturesConfiguration

      void setPluggabilityFeaturesConfiguration(@NotNull @NotNull ServerConfiguration.PluggabilityFeaturesConfiguration pluggabilityFeaturesConfiguration)
      Sets the configuration of pluggability features for web applications.
      Parameters:
      pluggabilityFeaturesConfiguration - The configuration value, must not be null.
      Since:
      5.2.707
    • getPluggabilityFeaturesConfiguration

      @NotNull @NotNull ServerConfiguration.PluggabilityFeaturesConfiguration getPluggabilityFeaturesConfiguration()
      Retrieves the configuration of pluggability features for web applications.
      Returns:
      The configuration value, never null.
      Since:
      5.2.707
    • getLDAPSections

      Map<String,String> getLDAPSections()
      Provides a map of LDAP sections.
      Returns:
      A map of LDAP sections.
      Since:
      4.0
    • refresh

      void refresh()
      Discard all local changes made to this configuration file.
      Since:
      4.0
      See Also:
    • save

      void save()
      Writes all changes made to this server configuration to the FirstSpirit server and saves the belonging configuration file.
      Since:
      4.0
      See Also:
    • getSocketPort

      String getSocketPort()
      Returns the socket port configured.
      Returns:
      The socket port configured.
      Since:
      4.0
    • getWebappRoot

      String getWebappRoot()
      Return the path of the root web application, for an internal servlet engine this is typically "/" and "/fs5root" for external servlet engines (e.g. Tomcat).
      Returns:
      the path of the root web application
      Since:
      4.0.41
    • getUrl

      String getUrl()
      Provides the server's URL.
      Returns:
      A URL.
      Since:
      4.0.41
    • setClusterSlaveName

      void setClusterSlaveName(String slaveName)
      Sets the name of the slave cluster server.
      Since:
      4.0.43
      See Also:
    • setClusterFirstSpiritPath

      void setClusterFirstSpiritPath(String firstSpiritPath)
      Defines the path for the first spirit cluster server.
      Parameters:
      firstSpiritPath - The path.
      Since:
      4.0.43
      See Also:
    • setClusterMasterPort

      void setClusterMasterPort(int port)
      Sets the port for the master cluster server.
      Since:
      4.0.43
      See Also:
    • setClusterMasterHost

      void setClusterMasterHost(String host)
      Sets the host for the master cluster server.
      Since:
      4.0.43
      See Also:
    • getClusterSlaveName

      String getClusterSlaveName()
      Returns the name of the slave cluster server.
      Since:
      4.0.43
      See Also:
    • getClusterFirstSpiritPath

      String getClusterFirstSpiritPath()
      Gets the path of the cluster server.
      Returns:
      The path of the cluster server.
      Since:
      4.0.43
      See Also:
    • getClusterMasterPort

      int getClusterMasterPort()
      Returns the port of the master cluster server.
      Since:
      4.0.43
      See Also:
    • getClusterMasterHost

      String getClusterMasterHost()
      Returns the host of the master cluster server.
      Since:
      4.0.43
      See Also:
    • getBackupEmail

      String getBackupEmail()
      Get email address for backup information
      Since:
      4.1.3
    • getUidConversionTable

      @NotNull @NotNull ConversionTable getUidConversionTable()
      Get conversion table used for creating UIDs suggestions from display names.
      Returns:
      The conversion table
      Since:
      4.2.400
      See Also:
    • setUidConversionTable

      void setUidConversionTable(@NotNull @NotNull ConversionTable table)
      Set conversion table used for creating UIDs suggestions from display names.
      Parameters:
      table - The conversion table
      Since:
      4.2.400
      See Also: