JSClientInformation (cm)

Overview

The JSClientInformation object provides details about client-specific attributes in a headless or NGClient environment. It includes properties such as the application type, client ID, host details (address, name, and identifier), and user-specific information like username, user ID, and login time. It also tracks client activity, including idle time, last accessed time, and the currently open solution. For NGClient, it provides additional details like a status line.

This object enables monitoring and interaction with connected clients in applications by managing user sessions and client-specific data.

Methods Summarized

Type
Name
Summary

The type of the application started by this client.

The ID of this client.

Gets the array of client information strings as seen on the admin page.

The host address of this client.

The host identifier of this client.

The host name of this client.

The time and date since the user has been idle.

Gets the last date and time when a user has physically accessed the application.

The time and date the user logged into the system.

The name of the solution that is currently open by the client.

This returns the status line of a NGClient (other clients don't have a value for this)

The name of the user who is logged in at this client.

The ID of the user who is logged in at this client.

Methods Detailed

getApplicationType()

The type of the application started by this client.

Returns: Number

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getClientID()

The ID of this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getClientInfos()

Gets the array of client information strings as seen on the admin page.

Returns: Array a String array with the client information

getHostAddress()

The host address of this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getHostIdentifier()

The host identifier of this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getHostName()

The host name of this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getIdleTime()

The time and date since the user has been idle.

Returns: Date

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getLastAccessedTime()

Gets the last date and time when a user has physically accessed the application. NGClient only!

Returns: Date a date object or null if the client doesn't support this

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getLoginTime()

The time and date the user logged into the system.

Returns: Date

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getOpenSolutionName()

The name of the solution that is currently open by the client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getStatusLine()

This returns the status line of a NGClient (other clients don't have a value for this)

Returns: String a string that is the status line as reported on the admin page.

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getUserName()

The name of the user who is logged in at this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

getUserUID()

The ID of the user who is logged in at this client.

Returns: String

Sample

var clients = plugins.clientmanager.getConnectedClients();
application.output('There are ' + clients.length + ' connected clients.');
for (var i = 0; i < clients.length; i++)
{
	var client = clients[i];
	application.output('Client details:');
	application.output('	ID: ' + client.getClientID());
	application.output('	Application type: ' + client.getApplicationType());
	application.output('	Host address: ' + client.getHostAddress());
	application.output('	Host identifier: ' + client.getHostIdentifier());
	application.output('	Host name: ' + client.getHostName());
	application.output('	User name: ' + client.getUserName());
	application.output('	Used UID: ' + client.getUserUID());
	application.output('	Open solution: ' + client.getOpenSolutionName());
	application.output('	User login time and date: ' + client.getLoginTime());
	application.output('	User idle since: ' + client.getIdleTime());
application.output('	Status line: ' + client.getStatusLine());
}

Last updated