3 Working with Record Enhancement Charging Java Hooks in NPL

This chapter lists and describes the Java hooks available for the Oracle Communications Offline Mediation Controller record enhancement charging Enhancement Processor (EP) cartridge.

About Record Enhancement Charging Java Hooks

Java hooks are an advanced feature of NPL (Node Programming Language) that enable Offline Mediation Controller to call a Java method from an NPL program. For more information on using Java hooks with NPL, see the discussion on Java hooks in Offline Mediation Controller Cartridge Development Kit NPL Reference Guide.

Table 3-1 lists the record enhancement charging Java hooks methods.

Table 3-1 Record Enhancement Charging Java Hooks Method Summary

Modifier and Type Method and Description

void

load() throws NodeProcessingException

Loads data from the database into memory.

IntField

exists(StringField key) throws NodeProcessingException

Searches for a key in the data collection for the configuration service.

MapField

get(StringField key) throws NodeProcessingException

Searches for the field that contains the record that matches key.

StringField

getLoadedInfo() throws NodeProcessingException

Searches for the string that represents the cached data and time it was cached.

StringField

getMapField(MapField map, StringField fieldName) throws NodeProcessingException

Searches for the value of fieldName in map.

IntField

isEmpty(DCField field) throws NodeProcessingException

Verifies if field contains any values.

IntField

TRUE() throws NodeProcessingException

Use this method instead of checking if the return value is 1 (true).

IntField

FALSE() throws NodeProcessingException

Use this method instead of checking if the return value is 0 (false).

StringField

VALUE(IntField val) throws NodeProcessingException

Use this method to return the string representation of val.

MapField

search(StringField areacode) throws NodeProcessingException

Searches for the longest best match in the cached data for areacode.

MapField

search(StringField mapGroup, StringField extServicecode, StringField usageclass, StringField locarindVasevent, StringField qosRequested, StringField qosUsed, StringField recordtype) throws NodeProcessingException

Searches for the first ranked record matching the search criteria.

MapField

search(StringField mapGroup, StringField extUsageclass, StringField usagetype, StringField zoneWs, StringField tariffclass, StringField tariffsubclass, StringField recordtype, StringField connecttype, StringField connectsubtype, StringField transitAreacode, StringField apnAddress, StringField ssPacket) throws NodeProcessingException

Searches for the first ranked record matching the search criteria.

MapField

search(StringField apnGroup, StringField servicecode, StringField accesspointname) throws NodeProcessingException

Searches for the first ranked record matching the search criteria for the access point name (APN) group.

MapField

getByNo(IntField no) throws NodeProcessingException

Searches for the network operator record having the internal ID no.

Record Enhancement Charging Java Hook Method Details

The section describes the record enhancement charging Java hook methods.

load

void load() throws NodeProcessingException

Usage

This function loads data from the database into memory.

Parameters

This method has no parameters.

Returns

This function returns nothing.

exists

IntField exists(StringField key) throws NodeProcessingException

Usage

This function searches for a key in the data collection for the configuration service.

Parameters

key is the key field in the record to search for.

Returns

1 (true) if the key is found in the record.

0 (false) if the key is not found in the record.

get

MapField get(StringField key) throws NodeProcessingException)

Usage

This function searches for the record that matches key. The database column name (case insensitive) is used as the field name in the MapField. For Service Code Map and Usage Class Map, which are keyed by the map_group, the first ranked record is returned if found.

Parameters

key is the key field in the record.

Returns

The record that matches the key.

getLoadedInfo

StringField getLoadedInfo() throws NodeProcessingException)

Usage

This function searches for the string that represents the cached data and time it was cached.

Parameters

This method has no parameters.

Returns

The string that represents the cached data and the time the data was cached.

getMapField

StringField getMapField(MapField map, StringField fieldName) throws NodeProcessingException)

Usage

This function searches for the value of fieldName in map.

Parameters

map is the MapField in which the value for fieldName is to be found.

fieldName is the field name for which the value is to be returned.

Returns

The string associated with fieldName.

An empty string ("") is returned if the field is not found.

isEmpty

IntField isEmpty(DCField field) throws NodeProcessingException)

Usage

This function verifies if field contains any values.

Parameters

field is the DCField that contains the field type and field value.

Returns

1 (true) if the field is empty.

0 (false) if the field is not empty.

TRUE

IntField TRUE() throws NodeProcessingException)

Usage

This function can be used to verify that the return value is 1 (true).

Parameters

This method has no parameters.

Returns

1 (true) if the return value is true.

FALSE

IntField FALSE() throws NodeProcessingException)

Usage

This function can be used to verify that the return value is 0 (false).

Parameters

This method has no parameters.

Returns

0 (false) if the return value is false.

VALUE

StringField VALUE(IntField val) throws NodeProcessingException)

Usage

This function returns the string representation of val.

Parameters

val is the IntField to be converted from an integer to a string.

Returns

The string representation of val.

search

MapField search(StringField areacode) throws NodeProcessingException)

Usage

This function searches for the longest best match in the cached data for areacode.

Parameters

areacode is the area code to search.

Returns

Returns the longest best match for areacode.

search

MapField search(StringField mapGroup, StringField extServicecode, StringField usageclass, StringField locarindVasevent, StringField qosRequested, StringField qosUsed, StringField recordtype) throws NodeProcessingException 

Usage

This function searches for the first ranked record matching the search criteria.

Parameters

mapGroup is the map group.

extServicecode is the name of the external service code map.

usageclass is the name of the usage class map.

locarindVasevent is the MSC responsible for handling the call and the location of the equipment making or receiving the call.

qosRequested is the type of QoS requested.

qosUsed the type of QoS negotiated by the network.

recordtype is the record type.

Returns

The first ranked record matching the search criteria.

search

MapField search(StringField mapGroup, StringField extUsageclass, StringField usagetype, StringField zoneWs, StringField tariffclass, StringField tariffsubclass, StringField recordtype, StringField connecttype, StringField connectsubtype, StringField transitAreacode, StringField apnAddress, StringField ssPacket) throws NodeProcessingException

Usage

This function searches for the first ranked record matching the search criteria.

Parameters

mapGroup is the map group.

extUsageclass is the external usage class.

usagetype is the customer-related usage scenario.

zoneWs is the impact category for wholesale zone.

tariffclass is the tariff class that contains the tariff information.

tariffsubclass is the detailed tariff information.

recordtype is the record type.

connecttype is the type of connection.

connectsubtype is the detailed description of the connection or call type.

transitAreacode is the area code.

apnAddress is the logical name of the connected access point to the external packet data network.

ssPacket is the number of supplementary service records.

Returns

The first record matching the search criteria.

search

MapField search(StringField apnGroup, StringField servicecode, StringField accesspointname) throws NodeProcessingException

Usage

This function searches for the first ranked record matching the search criteria for the access point name (APN) group.

Parameters

apnGroup is the APN group.

servicecode is the service code.

accesspointname is the APN name.

Returns

The first record matching the search criteria for the APN.

getByNo

MapField getByNo(IntField no) throws NodeProcessingException

Usage

This function searches for the network operator record having the internal ID no.

Parameters

no is the internal ID for the network operator.

Returns

The network operator record having the internal ID no.