Universal decode methods reference

getOperationName()

Returns the operation name of the current hit. Could be used for example in the parseResponse  method to retrieve the value set by parseRequest  method.

Syntax

 Stats:getOperationName()

Type

string

setOperationName()

Sets the operation name for the current hit to the specified value, limited to the specified number of characters.

Syntax

  Stats:setOperationName(string name, int len)

Type

void

string name

The value to which the operation name is set.

int len

The maximum number of characters for the operation name.

setAttribute()

Sets the value of the operation attribute.

Syntax

 Stats:setAttribute(int id, string value)

Type

void

int id

The number identifying one of the five available operation attributes. Integer 0 to 4.

string value

The new value of the operation attribute.

getAttribute()

Returns the value of the operation attribute.

Syntax

 string Stats:getAttribute(int id)

Type

string

int id

The number identifying one of the five available operation attributes. Integer 1 to 5.

setMetric()

Sets the custom metric for operation.

Syntax

 Stats:setMetric(int id, int value)

Type

void

int id

The number identifying one of five available custom metrics. Integer 1 to 5.

int value

The new value of Custom Metric. Integer.

getMetric()

Returns the value of custom metric for operation.

Syntax

Stats:getMetric(int id)

Type

string

int id

The number identifying on of five available Custom Metrics. Integer 1 to 5.

setParameter()

Sets the miscellaneous parameter for operation.

Syntax

 Stats:setParameter(int id, string value)

Type

void

int id

The number identifying one of seven available miscellaneous parameters. Integer 1 to 7.

string value

The new value of miscellaneous parameter. Integer.

getParameter()

Returns the value of miscellaneous parameter.

Syntax

Stats:getParameter(int id)

Type

string

int id

The number identifying one of seven available miscellaneous parameters. Integer 1 to 7.

setCorrelationId()

Sets the correlation identifier for the current hit to the specified value.

Syntax

  Stats:setCorrelationId(string id)

Type

void

string id

The value to be used as the correlation identifier.

getCorrelationId()

Returns the correlation identifier value.

Syntax

 Stats:getCorrelationId()

Type

string

getDictText()

Gets the value from the associated dictionary corresponding to the specified key.

Syntax

 Stats:getDictText(string key, int len)

Type

string

string key

The dictionary key.

int len

The maximum number of characters.

Dictionary format

The dictionary is a plain text file. Each line contains a single dictionary entry. The line must be ended with a single New Line character. The key and value are separated by a single space character. For example:

id123 Search
id567 Edit
id987 Delete

The file must have the .dict  extension and must be placed together with the script in the /usr/adlex/config  directory on the NAM Probe. You will need to point to it when configuring the Universal Decode software service on the NAM Console Scripts tab.

setBrowserOsHardware()

Sets the browser name, browser version, operating system name, and hardware name for the current hit.

Syntax

 Stats:setBrowserOsHardware(string browserName, string browserVersion, string osName, string hardwareName)

Type

void

string browserName

The string representing the browser name.

string browserVersion

The string representing the browser version.

string osName

The string representing the operating system name.

string hardwareName

The string representing the hardware name.

getBrowser()

Returns the browser name for the current hit.

Syntax

 Stats:getBrowser()

Type

string

getBrowserVersion()

Returns the browser version for the current hit.

Syntax

 Stats:getBrowserVersion()

Type

string

getOs()

Returns the operating system name for the current hit.

Syntax

 Stats:getOs()

Type

string

getHardware()

Returns the user's device name for the current hit.

Syntax

 Stats:getHardware()

Type

string

setUserName()

Sets the user name for the current hit to the specified value.

Syntax

  Stats:setUserName(string name)

Type

void

string name

The value to which the user name is set.

getUserName()

Returns the user name for the current hit. Could be used for example in the parseResponse  method to retrieve the value set by parseRequest  method.

Syntax

 Stats:getUserName()

Type

string

setTransportError()

Sets the transport error bucket number, also referred to as HTTP error bucket.

Syntax

 Stats:setTransportError (int bucket_id)

Type

void

int bucket_id

Identifier of the error category (bucket). Integer 1 to 7.

The following values are available:

  • 1 - Other HTTP client errors (4xx)
  • 2 - Other HTTP server errors (5xx)
  • 3 - HTTP unauthorized errors
  • 4 - HTTP Not Found errors
  • 5 - HTTP client errors (category 3)
  • 6 - HTTP server errors (category 1)
  • 7 - HTTP server errors (category 2)

getTransportError()

Returns the transport error bucket number, also referred to as HTTP error bucket.

Syntax

 Stats:TransportError()

Type

string