Package de.espirit.firstspirit.access
Interface ServerConfiguration
public interface ServerConfiguration
Interface providing means to operate on server configuration.
- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The Java Servlet Specification 3.0 introduced "pluggability" features which require the server to scan web applications for annotations. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
getActiveWebserverConfiguration
(@NotNull String webAppName) Gets the active webserver for the named web application.Returns the administrators email address used to send notification mails to.Get email address for backup informationGets the path of the cluster server.Returns the host of the master cluster server.int
Returns the port of the master cluster server.Returns the name of the slave cluster server.Get server minimum free space shutdown limit.Get server minimum free space warning limit.Returns directories used for disk space check (comma separated)int
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bygetFreeSpaceWarnLimit()
.Provides a map of LDAP sections.Returns the maximum percentage of memory to be used.long
Returns the maximum amount of memory that the Java virtual machine of the server will attempt to useReturns the Message of the Day of the specified language if it exists and should bevisible
, otherwise returnsnull
.Returns the Message of the Day of the specified language if it exists and checkActive is set tofalse
, otherwise returnsnull
.Retrieves the configuration of pluggability features for web applications.Returns the list of quickstart items configured.getSelectedWebserverConfiguration
(@NotNull String webAppName) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.180906 - no replacementReturns the socket port configured.long
Convenient accessor for reading the statistic start time (hour of day).@NotNull ConversionTable
Get conversion table used for creating UIDs suggestions from display names.getUrl()
Provides the server's URL.Return the path of the root web application, for an internal servlet engine this is typically "/" and "/fs5root" for external servlet engines (e.g.int
Returns the in the fs-server.conf specified image reload time out in webmonitorint
Returns the in the fs-server.conf specified data sync time out for ajax in webmonitor@NotNull WebstartConfiguration
getWebstartConfiguration
(@NotNull String name) Returns the webstart configuration specified by the given name.boolean
Returns whether or not the server will be shut down if space left limit is exceeded.boolean
Returns whether or not a warning mail will be issues if space left limit is exceeded.boolean
Returns if the internal database layer (Derby) should be hidden in the ServerManagerboolean
Returnstrue
if the memory warning is enabled.
If enabled a notification email will be send to the configuredemail address
.boolean
Returnstrue
if the Message of the Day is to be shown,false
otherwise.boolean
Returnstrue
if the out of memory warning for the FirstSpirit server is enabled,false otherwise
.void
refresh()
Discard all local changes made to this configuration file.void
save()
Writes all changes made to this server configuration to the FirstSpirit server and saves the belonging configuration file.void
setActiveWebserverConfiguration
(@NotNull String webAppName, @NotNull String selectedWebserver) Sets the configuration of the given webserver as active for the named web application.void
setAdminMail
(String mail) Sets the administrators email address used to send notification mails to.void
setClusterFirstSpiritPath
(String firstSpiritPath) Defines the path for the first spirit cluster server.void
setClusterMasterHost
(String host) Sets the host for the master cluster server.void
setClusterMasterPort
(int port) Sets the port for the master cluster server.void
setClusterSlaveName
(String slaveName) Sets the name of the slave cluster server.void
setFreeSpaceShutdownLimit
(@NotNull String limit) Set server minimum free space shutdown limit in one of the supported formats.void
setFreeSpaceWarnLimit
(@NotNull String limit) Set server minimum free space warning limit in one of the supported formats.void
setHddDirectories
(String directories) Set directories to check the hdd free space left (comma separated).void
setHddShutdownLimit
(int limit) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceShutdownLimit(String)
.void
setHddShutdownLimitActive
(boolean active) Sets wether or not the server will be shut down if limit is exceeded.void
setHddWarnLimit
(int limit) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceWarnLimit(String)
.void
setHddWarnLimitActive
(boolean active) Sets wether or not a warning mail should be issued if limit is exceeded.void
setMemoryLimit
(String limit) Sets the maximum percentage of memory to be used.void
setMemoryWarnActive
(boolean active) Providetrue
to enable the memory warning,false
otherwise.
If enabled a notification email will be send to the configuredemail address
.void
Sets or deletes the Message of the Day of the specified language.void
setMotDVisible
(boolean show) Sets whether to show the Message of the Day or not.void
setOutOfMemoryWarnActive
(boolean active) Activates / deactivates the out of memory warning for the FirstSpirit server.void
setPluggabilityFeaturesConfiguration
(@NotNull ServerConfiguration.PluggabilityFeaturesConfiguration pluggabilityFeaturesConfiguration) Sets the configuration of pluggability features for web applications.void
setQuickstart
(List<Quickstart> quickstartList) Sets the list of quickstart items.void
setSelectedWebserverConfiguration
(@NotNull String webAppName, @NotNull String selectedWebserver) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.180906 - no replacementvoid
setStatisticStart
(long hour) Sets the start time for statistics.void
setUidConversionTable
(@NotNull ConversionTable table) Set conversion table used for creating UIDs suggestions from display names.void
setWebstartConfiguration
(@NotNull String name, @NotNull WebstartConfiguration config) Sets the configuration of webstart for the given application.
-
Field Details
-
WEBSTART_CONFIG_CLIENT
Identifier for client configuration for webstart use.- Since:
- 4.0
- See Also:
-
WEBSTART_CONFIG_ADMIN
Identifier for admin configuration for webstart use.- Since:
- 4.0
- See Also:
-
-
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
Sets the administrators email address used to send notification mails to.- Parameters:
mail
- The email address.- Since:
- 4.0
-
getHddWarnLimit
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bygetFreeSpaceWarnLimit()
.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
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, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bygetFreeSpaceShutdownLimit()
.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
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
Returns the Message of the Day of the specified language if it exists and checkActive is set tofalse
, otherwise returnsnull
.- 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
Returns the Message of the Day of the specified language if it exists and should bevisible
, otherwise returnsnull
.- 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
Returns the webstart configuration specified by the given name.- Parameters:
name
- one ofWEBSTART_CONFIG_ADMIN
orWEBSTART_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()Returnstrue
if the memory warning is enabled.
If enabled a notification email will be send to the configuredemail address
.- Returns:
true
if the memory warning is enabled.- Since:
- 4.0
-
isOutOfMemoryWarnActive
boolean isOutOfMemoryWarnActive()Returnstrue
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()Returnstrue
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, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceWarnLimit(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, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceShutdownLimit(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
Set directories to check the hdd free space left (comma separated).- Parameters:
directories
- comma separated list of directories- Since:
- 4.2.427
-
setMemoryLimit
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) Providetrue
to enable the memory warning,false
otherwise.
If enabled a notification email will be send to the configuredemail 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.
Callsave()
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
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
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
- EitherWEBSTART_CONFIG_CLIENT
orWEBSTART_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
Gets the active webserver for the named web application.- Parameters:
webAppName
- The web application name.- Returns:
- The active webserver or an empty string if no active webserver is defined.
- Since:
- 4.0
-
setSelectedWebserverConfiguration
@Deprecated(forRemoval=true) void setSelectedWebserverConfiguration(@NotNull @NotNull String webAppName, @NotNull @NotNull String selectedWebserver) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.180906 - no replacementSets 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(forRemoval=true) String getSelectedWebserverConfiguration(@NotNull @NotNull String webAppName) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.180906 - no replacementGets 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 benull
.- 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
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
Sets the name of the slave cluster server.- Since:
- 4.0.43
- See Also:
-
setClusterFirstSpiritPath
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
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
Get conversion table used for creating UIDs suggestions from display names.- Returns:
- The conversion table
- Since:
- 4.2.400
- See Also:
-
setUidConversionTable
Set conversion table used for creating UIDs suggestions from display names.- Parameters:
table
- The conversion table- Since:
- 4.2.400
- See Also:
-
getFreeSpaceShutdownLimit()
.