Package de.espirit.firstspirit.access
Interface ServerConfiguration
public interface ServerConfiguration
Interface providing means to operate on server configuration.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe Java Servlet Specification 3.0 introduced "pluggability" features which require the server to scan web applications for annotations. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetActiveWebserverConfiguration(@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.intReturns 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)intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, 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.Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementlongReturns 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.longConvenient accessor for reading the statistic start time (hour of day).@NotNull ConversionTableGet 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.intReturns the in the fs-server.conf specified image reload time out in webmonitorintReturns the in the fs-server.conf specified data sync time out for ajax in webmonitor@NotNull WebstartConfigurationgetWebstartConfiguration(@NotNull String name) Returns the webstart configuration specified by the given name.booleanReturns whether or not the server will be shut down if space left limit is exceeded.booleanReturns whether or not a warning mail will be issues if space left limit is exceeded.booleanReturns if the internal database layer (Derby) should be hidden in the ServerManagerbooleanDeprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementbooleanReturnstrueif the Message of the Day is to be shown,falseotherwise.booleanDeprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementvoidrefresh()Discard all local changes made to this configuration file.voidsave()Writes all changes made to this server configuration to the FirstSpirit server and saves the belonging configuration file.voidsetActiveWebserverConfiguration(@NotNull String webAppName, @NotNull String selectedWebserver) Sets the configuration of the given webserver as active for the named web application.voidsetAdminMail(String mail) Sets the administrators email address used to send notification mails to.voidsetClusterFirstSpiritPath(String firstSpiritPath) Defines the path for the first spirit cluster server.voidsetClusterMasterHost(String host) Sets the host for the master cluster server.voidsetClusterMasterPort(int port) Sets the port for the master cluster server.voidsetClusterSlaveName(String slaveName) Sets the name of the slave cluster server.voidsetFreeSpaceShutdownLimit(@NotNull String limit) Set server minimum free space shutdown limit in one of the supported formats.voidsetFreeSpaceWarnLimit(@NotNull String limit) Set server minimum free space warning limit in one of the supported formats.voidsetHddDirectories(String directories) Set directories to check the hdd free space left (comma separated).voidsetHddShutdownLimit(int limit) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceShutdownLimit(String).voidsetHddShutdownLimitActive(boolean active) Sets wether or not the server will be shut down if limit is exceeded.voidsetHddWarnLimit(int limit) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.230209 - replaced bysetFreeSpaceWarnLimit(String).voidsetHddWarnLimitActive(boolean active) Sets wether or not a warning mail should be issued if limit is exceeded.voidsetMemoryLimit(String limit) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementvoidsetMemoryWarnActive(boolean active) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementvoidSets or deletes the Message of the Day of the specified language.voidsetMotDVisible(boolean show) Sets whether to show the Message of the Day or not.voidsetOutOfMemoryWarnActive(boolean active) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementvoidsetPluggabilityFeaturesConfiguration(@NotNull ServerConfiguration.PluggabilityFeaturesConfiguration pluggabilityFeaturesConfiguration) Sets the configuration of pluggability features for web applications.voidsetQuickstart(List<Quickstart> quickstartList) Sets the list of quickstart items.voidsetSelectedWebserverConfiguration(@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 replacementvoidsetStatisticStart(long hour) Sets the start time for statistics.voidsetUidConversionTable(@NotNull ConversionTable table) Set conversion table used for creating UIDs suggestions from display names.voidsetWebstartConfiguration(@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
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementReturns 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
nullif 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
nullif 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_ADMINorWEBSTART_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
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementReturnstrueif the memory warning is enabled.
If enabled a notification email will be sent to the configuredemail address.- Returns:
trueif the memory warning is enabled.- Since:
- 4.0
-
isOutOfMemoryWarnActive
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementReturnstrueif the out of memory warning for the FirstSpirit server is enabled,false otherwise.- Returns:
trueif the out of memory warning for the FirstSpirit server is enabled,false otherwise.- Since:
- 4.0
-
isMotDVisible
boolean isMotDVisible()Returnstrueif the Message of the Day is to be shown,falseotherwise.- Returns:
trueif the Message of the Day is to be shown,falseotherwise.- Since:
- 4.0
-
isInternalDatabaseHidden
boolean isInternalDatabaseHidden()Returns if the internal database layer (Derby) should be hidden in the ServerManager- Returns:
trueif the layer should be hidden,falseotherwise.- 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
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementSets the maximum percentage of memory to be used.- Parameters:
limit- The maximum percentage of memory to be used.- Since:
- 4.0
-
setMemoryWarnActive
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementProvidetrueto enable the memory warning,falseotherwise.
If enabled a notification email will be sent to the configuredemail address.- Parameters:
active-trueto enable the memory warning,falseotherwise.- Since:
- 4.0
-
setOutOfMemoryWarnActive
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250308 - no replacementActivates / 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 (nullto 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_CLIENTorWEBSTART_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().