{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\{table:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSServer]{span}{span:class=sWordList}[JSTableObject]{span}{span:class=sWordList}[JSClientInformation]{span}{td}{tr}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSClientInformation]\[]{td}{td}[#getConnectedClients]\()
Returns an array of JSClientInformation elements describing the clients connected to the server.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getDataModelClonesFrom]\(serverName)
Retrieves a list with names of all database servers that have property DataModelCloneFrom equal to the parameter.{td}{tr}{tbody}{tbody}{tr}{td}[JSServer]{td}{td}[#getServer]\(serverName, mustBeEnabled, mustBeValid)
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getServerNames]\(mustBeEnabled, mustBeValid, sort, includeDuplicates)
Retrieves a list with the names of all available database servers.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isInMaintenanceMode]\()
Returns true if the server is in maintenance mode, false otherwise.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sendMessageToAllClients]\(message)
Sends a message to all connected clients.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sendMessageToClient]\(clientId, message)
Sends a message to a specific client, identified by its clientId.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setMaintenanceMode]\(maintenanceMode)
Puts the server into/out of maintenance mode, depending on the boolean parameter that is specified (if the parameter is true, then the server will be put into maintenance mode; if the parameter is false, then the server will be put out of maintenance mode).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#shutDownAllClients]\()
Shuts down all connected clients.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#shutDownClient]\(clientId)
Shuts down a specific client, identified by its clientId.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=2764F443-B735-4BF4-82D9-F9A375142168}{tr:id=name}{td}h6.getConnectedClients{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSClientInformation]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getConnectedClients{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_des|text=|trigger=button}{sub-section}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_des|trigger=none|class=sIndent}Returns an array of JSClientInformation elements describing the clients connected to the server.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_ret|text=|trigger=button}{sub-section}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_ret|trigger=none|class=sIndent}[JSClientInformation]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_see|text=|trigger=button}{sub-section}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_see|text=|trigger=button}{sub-section}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_sam|text=|trigger=button}{sub-section}{sub-section:2764F443-B735-4BF4-82D9-F9A375142168_sam|class=sIndent|trigger=none}{code:language=javascript}
var clients = plugins.maintenance.getConnectedClients();
application.output("There are " + clients.length + " connected clients.");
for (var i = 0; i < clients.length; i++)
application.output("Client has clientId '" + clients[i].getClientId() + "' and has connected from host '" + clients[i].getHostAddress() + "'.");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F}{tr:id=name}{td}h6.getDataModelClonesFrom{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataModelClonesFrom{span}{span:id=iets|style=float: left;}\(serverName){span}{td}{tr}{tr:id=des}{td}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_des|text=|trigger=button}{sub-section}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_des|trigger=none|class=sIndent}Retrieves a list with names of all database servers that have property DataModelCloneFrom equal to the parameter.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_prs|trigger=none}serverName
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_ret|text=|trigger=button}{sub-section}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_see|text=|trigger=button}{sub-section}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_see|text=|trigger=button}{sub-section}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_sam|text=|trigger=button}{sub-section}{sub-section:7FC290B4-CDD8-43D2-95B3-EB7E5F105E4F_sam|class=sIndent|trigger=none}{code:language=javascript}
var serverNames = plugins.maintenance.getDataModelClonesFrom('my_server');
for (var i=0; i<serverNames.length; i++)
application.output("Process server " + i + ": " + serverNames[i]);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AD61AE0F-A860-47AA-BE2E-E35832FE1DA0}{tr:id=name}{td}h6.getServer{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSServer]{span}{span:id=iets|style=float: left; font-weight: bold;}getServer{span}{span:id=iets|style=float: left;}\(serverName, mustBeEnabled, mustBeValid){span}{td}{tr}{tr:id=des}{td}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_des|text=|trigger=button}{sub-section}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_des|trigger=none|class=sIndent}Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
If the optional argument "mustBeEnabled" is set to true, then the JSServer instance is returned only if the server is active.
Similarly, if the "mustBeValid
Cache
index
true
refresh
100d
id
doc
showRefresh
true
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes
2100%
height: 30px;
2Supported Clients
sWordListINLINESmartClient
sWordListINLINEWebClient
sWordListINLINENGClient
servoy sSummary
12%30%58%
height: 30px;
3Methods Summary
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
Retrieves a list with the names of all available database servers.
Retrieves a list with the names of all available database servers.
Retrieves a list with the names of all available database servers.
Retrieves a list with the names of all available database servers.
Retrieves a list with the names of all available database servers.
Returns true if the server is in maintenance mode, false otherwise.
void
Puts the server into/out of maintenance mode, depending on the boolean parameter that is specified (if the parameter is true, then the server will be put into maintenance mode; if the parameter is false, then the server will be put out of maintenance mode).
functionservoy sDetail
2100%
height:30px
2Methods Details
getServer
name
getServer(serverName)
des
sIndent
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
If the optional argument "mustBeEnabled" is set to true, then the JSServer instance is returned only if the server is active.
Similarly, if the "mustBeValid" optional argument is set to true, then the JSServer instance is returned only if the server is valid.
If the specified server is not found, or if it does not meet the requirements imposed by the optional arguments, then null is returned.
By default both optional arguments have the value false.
prs
Parameters
sIndent
serverName
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServer
name
getServer(serverName, mustBeEnabled)
des
sIndent
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
If the optional argument "mustBeEnabled" is set to true, then the JSServer instance is returned only if the server is active.
Similarly, if the "mustBeValid" optional argument is set to true, then the JSServer instance is returned only if the server is valid.
If the specified server is not found, or if it does not meet the requirements imposed by the optional arguments, then null is returned.
By default both optional arguments have the value false.
prs
Parameters
sIndent
serverName
;
mustBeEnabled
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServer
name
getServer(serverName, mustBeEnabled, mustBeValid)
des
sIndent
Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.
If the optional argument "mustBeEnabled" is set to true, then the JSServer instance is returned only if the server is active.
Similarly, if the "mustBeValid" optional argument is set to true, then the JSServer instance is returned only if the server is valid.
If the specified server is not found, or if it does not meet the requirements imposed by the optional arguments, then null is returned.
By default both optional arguments have the value false.
prs
Parameters
sIndent
serverName
;
mustBeEnabled
;
mustBeValid
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServerNames
name
getServerNames()
des
sIndent
Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate
servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value true.
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServerNames
name
getServerNames(mustBeEnabled)
des
sIndent
Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate
servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value true.
prs
Parameters
sIndent
mustBeEnabled
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServerNames
name
getServerNames(mustBeEnabled, mustBeValid)
des
sIndent
Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate
servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value true.
prs
Parameters
sIndent
mustBeEnabled
;
mustBeValid
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
getServerNames
name
getServerNames(mustBeEnabled, mustBeValid, sort)
des
sIndent
Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the
JSServer
list
instance
will
is
be
returned only if the server is valid
sorted alphabetically. If the "includeDuplicates"
specified
optional
server
argument is
not
set to
found
false,
or
then
if
duplicate
it
servers
does
will
not
appear
meet
only
the
once
requirements
in
imposed
the
by the optional arguments, then null is returned.
By default both optional
list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value
false.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_prs|trigger=none}serverName
\[mustBeEnabled\]
\[mustBeValid\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_ret|text=|trigger=button}{sub-section}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_ret|trigger=none|class=sIndent}[JSServer]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_see|text=|trigger=button}{sub-section}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_see|text=|trigger=button}{sub-section}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_sam|text=|trigger=button}{sub-section}{sub-section:AD61AE0F-A860-47AA-BE2E-E35832FE1DA0_sam|class=sIndent|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server) {
var tableNames = server.getTableNames();
application.output("There are " + tableNames.length + " tables.");
for (var i=0; i<tableNames.length; i++)
application.output("Table " + i + ": " + tableNames[i]);
}
else {
plugins.dialogs.showInfoDialog("Attention","Server 'example_data' cannot be found.","OK");
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BD8DAD47-765F-4285-B4E6-701821288675}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getServerNames{span}{span:id=iets|style=float: left;}\(mustBeEnabled, mustBeValid, sort, includeDuplicates){span}{td}{tr}{tr:id=des}{td}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_des|text=|trigger=button}{sub-section}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_des|trigger=none|class=sIndent}Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate
servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value true.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_prs|trigger=none}\[mustBeEnabled\]
\[mustBeValid\]
\[sort\]
\[includeDuplicates\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_ret|text=|trigger=button}{sub-section}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_see|text=|trigger=button}{sub-section}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_see|text=|trigger=button}{sub-section}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_sam|text=|trigger=button}{sub-section}{sub-section:BD8DAD47-765F-4285-B4E6-701821288675_sam|class=sIndent|trigger=none}{code:language=javascript}
var serverNames = plugins.maintenance.getServerNames();
application.output("There are " + serverNames.length + " servers.");
for (var i=0; i<serverNames.length; i++)
application.output("Server " + i + ": " + serverNames[i]);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=603B1B58-7534-480E-80A0-6995BC183E9A}{tr:id=name}{td}h6.isInMaintenanceMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isInMaintenanceMode{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_des|text=|trigger=button}{sub-section}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_des|trigger=none|class=sIndent}Returns true if the server is in maintenance mode, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_ret|text=|trigger=button}{sub-section}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_see|text=|trigger=button}{sub-section}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_see|text=|trigger=button}{sub-section}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_sam|text=|trigger=button}{sub-section}{sub-section:603B1B58-7534-480E-80A0-6995BC183E9A_sam|class=sIndent|trigger=none}{code:language=javascript}
if (plugins.maintenance.isInMaintenanceMode())
application.output("Server is in maintenance mode.");
else
application.output("Server is not in maintenance mode.");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EC09C7B6-4A2A-48B2-8B1A-657E8621473B}{tr:id=name}{td}h6.sendMessageToAllClients{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sendMessageToAllClients{span}{span:id=iets|style=float: left;}\(message){span}{td}{tr}{tr:id=des}{td}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_des|text=|trigger=button}{sub-section}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_des|trigger=none|class=sIndent}Sends a message to all connected clients.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_prs|trigger=none}message
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_ret|text=|trigger=button}{sub-section}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_see|text=|trigger=button}{sub-section}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_see|text=|trigger=button}{sub-section}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_sam|text=|trigger=button}{sub-section}{sub-section:EC09C7B6-4A2A-48B2-8B1A-657E8621473B_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.maintenance.sendMessageToAllClients("Hello, all clients!");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0BB21886-0C60-4590-B9D9-9BCB5F112197}{tr:id=name}{td}h6.sendMessageToClient{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sendMessageToClient{span}{span:id=iets|style=float: left;}\(clientId, message){span}{td}{tr}{tr:id=des}{td}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_des|text=|trigger=button}{sub-section}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_des|trigger=none|class=sIndent}Sends a message to a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_prs|trigger=none}clientId
message
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_ret|text=|trigger=button}{sub-section}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_see|text=|trigger=button}{sub-section}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_see|text=|trigger=button}{sub-section}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_sam|text=|trigger=button}{sub-section}{sub-section:0BB21886-0C60-4590-B9D9-9BCB5F112197_sam|class=sIndent|trigger=none}{code:language=javascript}
var clients = plugins.maintenance.getConnectedClients();
for (var i=0; i<clients.length; i++)
plugins.maintenance.sendMessageToClient(clients[i].getClientId(), "Hello, client " + clients[i].getClientId() + "!");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AD0C2684-094E-4DE5-AD96-0FFB8E9A5412}{tr:id=name}{td}h6.setMaintenanceMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setMaintenanceMode{span}{span:id=iets|style=float: left;}\(maintenanceMode){span}{td}{tr}{tr:id=des}{td}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_des|text=|trigger=button}{sub-section}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_des|trigger=none|class=sIndent}Puts the server into/out of maintenance mode, depending on the boolean parameter that is specified (if the parameter is true, then the server will be put into maintenance mode; if the parameter is false, then the server will be put out of maintenance mode).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_prs|trigger=none}maintenanceMode
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_ret|text=|trigger=button}{sub-section}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_see|text=|trigger=button}{sub-section}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_see|text=|trigger=button}{sub-section}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_sam|text=|trigger=button}{sub-section}{sub-section:AD0C2684-094E-4DE5-AD96-0FFB8E9A5412_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.maintenance.setMaintenanceMode(!plugins.maintenance.isInMaintenanceMode());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=17410A71-EEDA-465A-A2B0-CA2CFD8DCE48}{tr:id=name}{td}h6.shutDownAllClients{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}shutDownAllClients{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_des|text=|trigger=button}{sub-section}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_des|trigger=none|class=sIndent}Shuts down all connected clients.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_ret|text=|trigger=button}{sub-section}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_see|text=|trigger=button}{sub-section}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_see|text=|trigger=button}{sub-section}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_sam|text=|trigger=button}{sub-section}{sub-section:17410A71-EEDA-465A-A2B0-CA2CFD8DCE48_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.maintenance.shutDownAllClients();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AB29226D-7682-4F63-ADA1-E3406537060E}{tr:id=name}{td}h6.shutDownClient{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}shutDownClient{span}{span:id=iets|style=float: left;}\(clientId){span}{td}{tr}{tr:id=des}{td}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_des|text=|trigger=button}{sub-section}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_des|trigger=none|class=sIndent}Shuts down a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_prs|trigger=none}clientId
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_ret|text=|trigger=button}{sub-section}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_see|text=|trigger=button}{sub-section}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_see|text=|trigger=button}{sub-section}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_sam|text=|trigger=button}{sub-section}{sub-section:AB29226D-7682-4F63-ADA1-E3406537060E_sam|class=sIndent|trigger=none}{code:language=javascript}
var clients = plugins.maintenance.getConnectedClients();
for (var i=0; i<clients.length; i++)
plugins.maintenance.shutDownClient(clients[i].getClientId());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Retrieves a list with the names of all available database servers. The returned list will contain only enabled servers if the "mustBeEnabled"
optional argument is set to true. The list will contain only valid servers if the "mustBeValid" argument is set to true. If the "sort" optional
argument is set to true, then the list will be sorted alphabetically. If the "includeDuplicates" optional argument is set to false, then duplicate
servers will appear only once in the list. By default, the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort"
and "includeDuplicates" arguments have the value true.
prs
Parameters
sIndent
mustBeEnabled
;
mustBeValid
;
sort
;
includeDuplicates
;
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
isInMaintenanceMode
name
isInMaintenanceMode()
des
sIndent
Returns true if the server is in maintenance mode, false otherwise.
ret
Returns
sIndent
clients
Supported Clients
sIndentSmartClient,WebClient,NGClient
sam
Sample
sIdent
javascript
lastDetailRow
setMaintenanceMode
name
setMaintenanceMode(maintenanceMode)
des
sIndent
Puts the server into/out of maintenance mode, depending on the boolean parameter that is specified (if the parameter is true, then the server will be put into maintenance mode; if the parameter is false, then the server will be put out of maintenance mode).