Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


{div:style=display:none} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR{div} {div:id=description}{div}\\ {table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSClientInformation]{span}{span:class=sWordList}[JSColumnObject]{span}{span:class=sWordList}[JSServer]{span}{span:class=sWordList}[JSTableObject]{span}{td}{tr}{table}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{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}[JSServer]{td}{td}[#getServer]\(serverName) Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.{td}{tr}{tbody}{tbody}{tr}{td}[JSServer]{td}{td}[#getServer]\(serverName, mustBeEnabled) Retrieves an instance of JSServer corresponding to the server with the name specified through the "serverName" argument.{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]\() Retrieves a list with the names of all available database servers.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getServerNames]\(mustBeEnabled) Retrieves a list with the names of all available database servers.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getServerNames]\(mustBeEnabled, mustBeValid) Retrieves a list with the names of all available database servers.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getServerNames]\(mustBeEnabled, mustBeValid, sort) Retrieves a list with the names of all available database servers.{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:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getConnectedClients}{tr:id=name}{td}h6.getConnectedClients{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSClientInformation]\[]{span}{span:style=font-weight: bold;}getConnectedClients{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSClientInformation]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Returns an array of JSClientInformation elements describing the clients connected to the server. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServer-String}{tr:id=name}{td}h6.getServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSServer]{span}{span:style=font-weight: bold;}getServer{span}{span}\(serverName){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} serverName {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSServer]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServer-String_Boolean}{tr:id=name}{td}h6.getServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSServer]{span}{span:style=font-weight: bold;}getServer{span}{span}\(serverName, mustBeEnabled){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} serverName \{[Boolean]} mustBeEnabled {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSServer]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServer-String_Boolean_Boolean}{tr:id=name}{td}h6.getServer{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSServer]{span}{span:style=font-weight: bold;}getServer{span}{span}\(serverName, mustBeEnabled, mustBeValid){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} serverName \{[Boolean]} mustBeEnabled \{[Boolean]} mustBeValid {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSServer]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getServerNames{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames-Boolean}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getServerNames{span}{span}\(mustBeEnabled){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Boolean]} mustBeEnabled {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames-Boolean_Boolean}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getServerNames{span}{span}\(mustBeEnabled, mustBeValid){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Boolean]} mustBeEnabled \{[Boolean]} mustBeValid {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames-Boolean_Boolean_Boolean}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getServerNames{span}{span}\(mustBeEnabled, mustBeValid, sort){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Boolean]} mustBeEnabled \{[Boolean]} mustBeValid \{[Boolean]} sort {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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
Wiki Markup
Cache
indextrue
refresh100d
iddoc
showRefreshtrue
titleRefresh page
showDatetrue
retryEnable



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
list will be sorted alphabetically. If
 JSServer instance is returned only if the server is active.
Similarly, if the "
includeDuplicates
mustBeValid" optional argument is set to 
false
true, then 
duplicate //servers will appear
the JSServer instance is returned only 
once in
if the 
list.
server 
By
is 
default,
valid.
the "mustBeEnabled" and the "mustBeValid" arguments have the value false, while the "sort" //and "includeDuplicates" arguments have the value true. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames-Boolean_Boolean_Boolean_Boolean}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getServerNames{span}{span}\(mustBeEnabled, mustBeValid, sort, includeDuplicates){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Boolean]} mustBeEnabled \{[Boolean]} mustBeValid \{[Boolean]} sort \{[Boolean]} includeDuplicates {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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
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 
false,
true. 
then duplicate //servers
The list will 
appear
contain only valid 
once
servers 
in
if the 
list. By default, the "mustBeEnabled" and
"mustBeValid" argument is set to true. If the "
mustBeValid
sort" 
arguments
optional
argument 
have
is 
the
set 
value
to 
false
true, 
while the "sort" //and "includeDuplicates" arguments have the value true. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isInMaintenanceMode}{tr:id=name}{td}h6.isInMaintenanceMode{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}isInMaintenanceMode{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Returns true if the server is in maintenance mode, false otherwise. if (plugins.maintenance.isInMaintenanceMode()) application.output("Server is in maintenance mode."); else application.output("Server is not in maintenance mode."); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sendMessageToAllClients-String}{tr:id=name}{td}h6.sendMessageToAllClients{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}sendMessageToAllClients{span}{span}\(message){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} message {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Sends a message to all connected clients. plugins.maintenance.sendMessageToAllClients("Hello, all clients!"); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sendMessageToClient-String_String}{tr:id=name}{td}h6.sendMessageToClient{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}sendMessageToClient{span}{span}\(clientId, message){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} clientId \{[String]} message {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Sends a message to a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMaintenanceMode-Boolean}{tr:id=name}{td}h6.setMaintenanceMode{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setMaintenanceMode{span}{span}\(maintenanceMode){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Boolean]} maintenanceMode {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //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). plugins.maintenance.setMaintenanceMode(!plugins.maintenance.isInMaintenanceMode()); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=shutDownAllClients}{tr:id=name}{td}h6.shutDownAllClients{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}shutDownAllClients{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Shuts down all connected clients. This method returns immediately, it does not wait until the client shuts down. plugins.maintenance.shutDownAllClients(); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=shutDownClient-String}{tr:id=name}{td}h6.shutDownClient{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}shutDownClient{span}{span}\(clientId){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} clientId {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} // WARNING: maintenance plugin is only meant to run during solution import using before or after import hook(so not from Smart/Web client) //Shuts down a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. This method returns immediately, it does not wait until the client shuts down. var clients = plugins.maintenance.getConnectedClients(); for (var i=0; i<clients.length; i++) plugins.maintenance.shutDownClient(clients[i].getClientId()); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
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 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


;






ret


Returns

sIndent




clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow






getServerNames


name


getServerNames(mustBeEnabled, mustBeValid, sort, includeDuplicates)



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


;





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).




prs


Parameters

sIndent




maintenanceMode


;






clients


Supported Clients

sIndentSmartClient,WebClient,NGClient




sam


Sample

sIdent


javascript





lastDetailRow