Previous Topic: Logging: WgnWC_Log CollectionNext Topic: XSL Extension Functions


Utilities: WgnWC_Util Collection

Functions

Function name

Type Oracle or MSSQL

Parameter Type Oracle or MSSQL

Returns Oracle or MSSQL

Description

Action_2

Function

 

VARCHAR2/ NVARCHAR(255)

Returns the event action, based on the supplied attributes, in a string.

 

 

PLS_INTEGER

 

The event major type (0 if unknown).

 

 

VARCHAR2/ NVARCHAR(255)

 

The event attributes.

AttributeValue

Function

 

VARCHAR2/ NVARCHAR(255)

Returns the value of the named attribute from the list of attributes in a string.

VARCHAR2/ NVARCHAR(255)

 

A list of attributes in the form /A1=value1 /A2=value2 /A3=value3 etc.

VARCHAR2/ NVARCHAR(255)

 

The required attribute name e.g. A2

AuditField1List

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 1 values

AuditField1ListNoAny

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 1 values without the [Any] item

AuditField2List

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 2 values

AuditField2ListNoAny

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 2 values without the [Any] item

AuditField3List

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 3 values

AuditField3ListNoAny

Function/ Procedure

 

SYS_REFCURSOR/
Resultset

Returns the current list of Audit Status Field 3 values without the [Any] item

AuditStatus

Function

 

VARCHAR2/ NVARCHAR(255)

Gets the current audit status text for the specified event or 'Multiple Issues' if there is no unique status.

NUMBER/
INTEGER

 

The event UID

DATE/
DATETIME

 

The event timestamp

ColumnExists
[MSSQL only]

Function

 

 

Returns 1 if the specified column exists

NVARCHAR(255)

 

The name of the table

NVARCHAR(255)

 

The name of the column

CommaEncode

Function

 

VARCHAR2/ NVARCHAR(765)

Replaces commas in a string with an encoded string

VARCHAR2/ NVARCHAR(255)

 

The string to be encoded

DelimStringFromNodes
[Oracle only]

Function

 

VARCHAR2

Returns a table of class nodes as a string using the specified delimiter

WGNCLASSNODES

 

A table of class nodes

VARCHAR

 

The delimiter, defaults to ','

DisplayName

Function

 

VARCHAR2/
NVARCHAR(255)

Gets the display name for the specified user

NUMBER/
INTEGER

 

The IDM of the user

NUMBER/
INTEGER

 

The ID of the user

EscapeString

Function

 

VARCHAR2/
NVARCHAR(255)

Adds an escape clause to the specified SQL LIKE string if one is required.

VARCHAR2/
NVARCHAR(255)

 

The SQL LIKE string

EventImage2

Function

 

VARCHAR2

Gets the event icon filename and tooltip text corresponding to the specified event details

NUMBER/
BIGINT

 

The event UID (not used)

DATE/
DATETIME

 

The event timestamp (not used)

PLS_INTEGER/
INTEGER

 

The event major type

PLS_INTEGER/
INTEGER

 

The event minor type

PLS_INTEGER/
INTEGER

 

The event AES major type

PLS_INTEGER/
INTEGER

 

The event AES minor type

VARCHAR2

 

The event attributes

PLS_INTEGER/
INTEGER

 

No of attachments

NUMBER/
BIGINT

 

The quarantine UID (defaults to 0)

PLS_INTEGER/
INTEGER

 

The transaction state (defaults to NULL)

FileParticipant

Function

 

VARCHAR2/
NVARCHAR(2000)

Gets the file owner or file host for a file event

 

 

NUMBER/
BIGINT

 

The event UID

 

 

DATE/
DATETIME

 

The event timestamp

FixedWidthString

Function

 

VARCHAR2/
NVARCHAR(255)

Gets a string of the specified width, right justified if it’s a number

 

 

VARCHAR2/
NVARCHAR(255)

 

The initial string

 

 

PLS_INTEGER/
INTEGER

 

The required length (in characters)

GetUsersNameHistory

Function

 

VARCHAR2/
NVARCHAR(2000)

Gets a comma-separated string of all full names of a user (most recent first)

NUMBER/
INTEGER

 

The IDM of the user

NUMBER/
INTEGER

 

The ID of the user

GroupPath

Function

 

VARCHAR2/
NVARCHAR(4000)

The full path to the specified group

NUMBER/
INTEGER

 

The IDM of the group

NUMBER/
INTEGER

 

The ID of the group

HexDecode

Function

 

VARCHAR2/
NVARCHAR(1000)

Returns a string with hex encoded strings replaced with the decoded characters

VARCHAR2/
NVARCHAR(1000)

 

The string to be decoded

Hex2Dec
[MSSQL only]

Function

 

INTEGER

Converts a 2 character hex string to an integer

NVARCHAR(2)

 

 

IDM_From_UID

Function

 

NUMBER/
INTEGER

Gets the IDM from a UID

NUMBER/
BIGINT

 

A UID

ID_From_UID

Function

 

NUMBER/
INTEGER

Gets the ID from a UID

NUMBER/
BIGINT

 

A UID

LikeList

Function

 

VARCHAR2/
NVARCHAR(4000)

Returns a where clause fragment to compare the column with the list of values using the given separator

VARCHAR2/
NVARCHAR(255)

 

The column name

VARCHAR2/
NVARCHAR(1000)

 

The list of values to compare

VARCHAR2/
NVARCHAR(10)

 

The separator used in the list

VARCHAR2/
NVARCHAR(10)

 

The Boolean operation between list items i.e. 'AND' or 'OR'

VARCHAR2/
NVARCHAR(255)

 

The prefix to be added e.g. % to match the start of the column value

VARCHAR2/
NVARCHAR(255)

 

The suffix to be added e.g. % to match the end of the column value

LikeList2

Function

 

VARCHAR2/
NVARCHAR(4000)

Returns a where clause fragment to compare the column with the list of values using the given separators

 

 

VARCHAR2/
NVARCHAR(255)

 

The column name

 

 

VARCHAR2/
NVARCHAR(1000)

 

The expression to compare

 

 

VARCHAR2/
NVARCHAR(255)

 

The prefix to be added e.g. % to match the start of the column value ‘’

 

 

VARCHAR2/
NVARCHAR(255)

 

The suffix to be added e.g. % to match the end of the column value ‘’

 

 

VARCHAR2/
NVARCHAR(10)

 

The separator for the primary list ‘|’

 

 

VARCHAR2/
NVARCHAR(10)

 

The primary comparison operator ‘OR’

 

 

VARCHAR2/
NVARCHAR(10)

 

The separator for the secondary list ‘&’

 

 

VARCHAR2/
NVARCHAR(10)

 

The secondary comparison operator ‘AND’

 

 

VARCHAR2/
NVARCHAR(10)

 

The separator for unary operations ‘!’

 

 

VARCHAR2/
NVARCHAR(10)

 

The unary operator ‘NOT’

LikeString_3

Function

 

VARCHAR2/
NVARCHAR(512)

Gets a string for use with LIKE with special characters replaced and escaped as required

VARCHAR2/
NVARCHAR(255)

 

The prefix to be added e.g. % to match the end of the column value

VARCHAR2/
NVARCHAR(255)

 

The string to match

VARCHAR2/
NVARCHAR(255)

 

The suffix to be added e.g. % to match the start of the column value

 

 

PLS_INTEGER/
BIT

 

Trim blanks when = 1

LikeString_2

Function

 

VARCHAR2/
NVARCHAR(512)

Gets a string for use with LIKE with special characters replaced and escaped as required

PLS_INTEGER/
INTEGER

 

Comparator value

See Constants.

VARCHAR2/
NVARCHAR(255)

 

The string to match

ParticipantClassNode

Function

 

NUMBER

Gets the participant class node for different types of event and participant type

NUMBER

 

The event major type

NUMBER

 

The sender=1, or recipient=2

ParticipantIndex

Function

 

NUMBER

Gets a Participant Index for the given participant class for the event

NUMBER

 

The event UID

DATE

 

The event timestamp

NUMBER

 

The participant class

Participants

Function

 

VARCHAR2

Gets a class of participants for the specified event

NUMBER

 

The event UID

DATE

 

The event timestamp

NUMBER

 

The participant class

Participants_2

Function

 

VARCHAR2

Gets a class of participants for the specified event, using eventtext1 if available

NUMBER

 

The event UID

DATE

 

The event timestamp

NUMBER

 

The major type of the event

NUMBER

 

The sender=1, or recipient=2

VARCHAR2

 

The EventText1 field for the event

Percentage

Function

 

NUMBER

Gets a percentage value

NUMBER

 

The numerator

NUMBER

 

The denominator

PolicyListAll

Function/

Procedure

 

SYS_REFCURSOR/

Resultset

Returns the list of policy values

PolicySeverityFilter_2

Procedure

 

VARCHAR2/

NVARCHAR(MAX)

Builds clauses to select events by policy/severity

VARCHAR2/

NVARCHAR(32)

 

The event view alias

VARCHAR2/

NVARCHAR(MAX)

 

The required policy class

VARCHAR2/

NVARCHAR(MAX)

 

The required severity ranges (e.g.1-100)

VARCHAR2/

NVARCHAR(MAX)

 

The WITH clause (output)

VARCHAR2/

NVARCHAR(MAX)

 

The FROM clause (output)

VARCHAR2/

NVARCHAR(MAX)

 

The WHERE clause (output)

RootGroupPath

Function

 

VARCHAR2

Returns the full path of the group that is the root (i.e. management group) of the given group

NUMBER

 

The IDM of the group

NUMBER

 

The ID of the group

SetAddressTable

Function

 

VARCHAR2

Inserts a list of addresses matching a given string into the specified table.

VARCHAR2

 

The name of the table to contain the addresses

VARCHAR2

 

The string to match the addresses

SeverityClass

Function

PLS_INTEGER/

INTEGER

VARCHAR2/

NVARCHAR(263)

Returns the style class name for the severity

SeverityList

Procedure

 

SYS_REFCURSOR/

Resultset

Returns the current list of severity values

SeverityText

Function

 

VARCHAR2/

NVARCHAR(255)

Returns the text for the severity based on defined thresholds

PLS_INTEGER/

INTEGER

 

The severity value

SubField

Function

 

VARCHAR2

Returns a particular item from a delimited list

VARCHAR2

 

The delimited list

NUMBER

 

The item number to be retrieved (starts at 1)

VARCHAR2

 

The separator used in the list

TableFromString

Function

 

WGNWC_UTIL_STRINGS

Returns a table of strings from a delimited string

VARCHAR2

 

The delimited list

VARCHAR2

 

The separator used in the list (Defaults to ',')

Tidy

Function

 

VARCHAR2

Tidies a string by removing empty elements ',,', leading and trailing commas and repeated ellipsis

VARCHAR2

 

The string to be tidied

UID_From_2ID

Function

 

NUMBER

Gets the UID from IDM and ID

NUMBER

 

The IDM

NUMBER

 

The ID

UserUID

Function

 

NUMBER

Gets a user UID for the given class of participant for the event (0 if multiple users)

NUMBER

 

The event UID

DATE

 

The event timestamp

NUMBER

 

The required class

Constants

On Oracle, constants can be specified using package.constant (e.g. WgnWC_Util.COMP_EQUALS).

MSSQL does not support constants; the values need to be used instead.

Group

Constant Name

Constant Value

Description

Comparator

COMP_CONTAINS

1

String contains the specified value

COMP_NOT_CONTAINS

2

String does not contain the specified value

COMP_EQUALS

3

String equals the specified value

COMP_NOT_EQUALS

4

String does not equal the specified value

COMP_STARTS_WITH

5

String starts with the specified value

COMP_NOT_STARTS_WITH

6

String does not start with the specified value

COMP_ENDS_WITH

7

String ends with the specified value

COMP_NOT_ENDS_WITH

8

String does not end with the specified value

COMP_IS_EMPTY

9

String is empty

COMP_IS_NOT_EMPTY

10

String is not empty