Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getConnectedClients |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns an array of JSClientInformation elements describing the clients connected to the server. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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() + "'."); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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. |
|
|
|
| {sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_prs|trigger=none}serverName
\[mustBeEnabled\]
\[mustBeValid\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_ret|text=|trigger=button}{sub-section}{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_ret|trigger=none|class=sIndent}[JSServer]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_see|text=|trigger=button}{sub-section}{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_see|text=|trigger=button}{sub-section}{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_sam|text=|trigger=button}{sub-section}{sub-section:E9195A36-53DD-4CE2-AD4F-FECDE010C48E_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=460893A1-B0C3-472D-91F2-C930572E7F23}{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:460893A1-B0C3-472D-91F2-C930572E7F23_des|text=|trigger=button}{sub-section}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_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:460893A1-B0C3-472D-91F2-C930572E7F23_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_prs|trigger=none}\[mustBeEnabled\]
\[mustBeValid\]
\[sort\]
\[includeDuplicates\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_ret|text=|trigger=button}{sub-section}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_see|text=|trigger=button}{sub-section}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_see|text=|trigger=button}{sub-section}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_sam|text=|trigger=button}{sub-section}{sub-section:460893A1-B0C3-472D-91F2-C930572E7F23_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=01766D73-D300-4C81-BC17-7B8F9F8E207A}{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:01766D73-D300-4C81-BC17-7B8F9F8E207A_des|text=|trigger=button}{sub-section}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_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:01766D73-D300-4C81-BC17-7B8F9F8E207A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_ret|text=|trigger=button}{sub-section}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_see|text=|trigger=button}{sub-section}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_see|text=|trigger=button}{sub-section}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_sam|text=|trigger=button}{sub-section}{sub-section:01766D73-D300-4C81-BC17-7B8F9F8E207A_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=01EDBA2C-90F6-4728-BD5E-B11BA9B33D18}{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:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_des|text=|trigger=button}{sub-section}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_des|trigger=none|class=sIndent}Sends a message to all connected clients.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_prs|trigger=none}message
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_ret|text=|trigger=button}{sub-section}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_see|text=|trigger=button}{sub-section}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_see|text=|trigger=button}{sub-section}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_sam|text=|trigger=button}{sub-section}{sub-section:01EDBA2C-90F6-4728-BD5E-B11BA9B33D18_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=2C24ED90-197C-45D4-8438-92D83EDB798C}{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:2C24ED90-197C-45D4-8438-92D83EDB798C_des|text=|trigger=button}{sub-section}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_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:2C24ED90-197C-45D4-8438-92D83EDB798C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_prs|trigger=none}clientId
message
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_ret|text=|trigger=button}{sub-section}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_see|text=|trigger=button}{sub-section}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_see|text=|trigger=button}{sub-section}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_sam|text=|trigger=button}{sub-section}{sub-section:2C24ED90-197C-45D4-8438-92D83EDB798C_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=632AE000-C22D-435E-A824-CB7E70A54026}{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:632AE000-C22D-435E-A824-CB7E70A54026_des|text=|trigger=button}{sub-section}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_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:632AE000-C22D-435E-A824-CB7E70A54026_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_prs|trigger=none}maintenanceMode
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_ret|text=|trigger=button}{sub-section}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_see|text=|trigger=button}{sub-section}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_see|text=|trigger=button}{sub-section}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_sam|text=|trigger=button}{sub-section}{sub-section:632AE000-C22D-435E-A824-CB7E70A54026_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=BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B}{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:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_des|text=|trigger=button}{sub-section}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_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:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_ret|text=|trigger=button}{sub-section}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_see|text=|trigger=button}{sub-section}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_see|text=|trigger=button}{sub-section}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_sam|text=|trigger=button}{sub-section}{sub-section:BDFCC7A4-6DCF-42BF-B6E8-8C319EEE661B_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=E7C48176-8FB1-4F58-A596-D91428B0B2C1}{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:E7C48176-8FB1-4F58-A596-D91428B0B2C1_des|text=|trigger=button}{sub-section}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_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:E7C48176-8FB1-4F58-A596-D91428B0B2C1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_prs|trigger=none}clientId
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_ret|text=|trigger=button}{sub-section}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_see|text=|trigger=button}{sub-section}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_see|text=|trigger=button}{sub-section}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_sam|text=|trigger=button}{sub-section}{sub-section:E7C48176-8FB1-4F58-A596-D91428B0B2C1_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");
} |
|
|
|
|
Table Body (tbody) |
---|
id | getServer-String_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(serverName, mustBeEnabled) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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");
} |
|
|
|
|
Table Body (tbody) |
---|
id | getServer-String_Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(serverName, mustBeEnabled, mustBeValid) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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");
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerNames |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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]); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerNames |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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]); |
|
|
|
|
Table Body (tbody) |
---|
id | getServerNames-Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerNames |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(mustBeEnabled, mustBeValid) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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]); |
|
|
|
|
Table Body (tbody) |
---|
id | getServerNames-Boolean_Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerNames |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(mustBeEnabled, mustBeValid, sort) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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]); |
|
|
|
|
Table Body (tbody) |
---|
id | getServerNames-Boolean_Boolean_Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerNames |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(mustBeEnabled, mustBeValid, sort, includeDuplicates) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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]); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
isInMaintenanceMode |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns true if the server is in maintenance mode, false otherwise. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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."); |
|
|
|
|
Table Body (tbody) |
---|
id | sendMessageToAllClients-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
sendMessageToAllClients |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| sendMessageToAllClients |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sends a message to all connected clients. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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!"); |
|
|
|
|
Table Body (tbody) |
---|
id | sendMessageToClient-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
sendMessageToClient |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sends a message to a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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() + "!"); |
|
|
|
|
Table Body (tbody) |
---|
id | setMaintenanceMode-Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setMaintenanceMode |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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()); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
shutDownAllClients |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Shuts down all connected clients. This method returns immediately, it does not wait until the client shuts down. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
shutDownClient |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |