APL - PCC Mapper Support
The mapper support is used for accessing a table in the rules database containing references to the rules that are applicable for the specified service.
The mapper support functions include:
pccMapperCreate
pccMapperGet
pccMapperGetFlat
pccMapperGetIndexes
pccMapperGetFromIndex
These functions can be used to create and use a PCC flexible mapper object.
pccMapperCreate
This function creates a mapper table.
any pccMapperCreate ( string area, string typename [, string argumentsField, string targetField] Â
Parameters
Parameter | Description |
---|---|
| The name of the area which the mapper is operating against. |
| The fully qualified UDR typename to be used for the mapper configuration information. |
| The field name of the field that contains the argument list to be used for matching. This field must be a list of strings. Either null or the string "*" can be used to signify a wildcard matching. This field is optional. |
| The field name of the field that contains the target value. This is the value that should be returned from the |
Returns: | A mapper table that can be used in |
Example
rulesMapping = pccMapperCreate("PROD", "PCRF.Rules.Provisioning.RulesMapping");
will create a mapper table named rulesMapping that will use the PCRF.Rules.Provisioning.RulesMapping
pccMapperGet
This function matches a list of arguments using a PCC mapper table.
list<any> pccMapperGet ( [any mapper,] any argument1, any argument2, ... )Â
Parameters
Parameter | Description |
---|---|
| The mapper table to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup. |
| Any number of arguments to match using the mapper object. The number of arguments must match the mapper configuration. |
Returns: | The matched target, or null if the mapper did not match any data. |
Example
list<any> rules = pccMapperGet(rulesMapping, "GOLD");
will return a list of rules matching argument "GOLD" using the rulesMapping mapper table.
pccMapperGetFlat
This function will provide a list of all matching products using a PCC mapper table.
list<any> pccMapperGetFlat ( [any mapper,] any argument1, any argument2, ... )
Parameters
Parameter | Description |
---|---|
| The mapper table to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup. |
| Any number of arguments to match using the mapper object. The number of arguments must match the mapper configuration. |
Returns: | A list of the matching products, or null if the mapper did not match any data. |
Example
list<any> rules = pccMapperGetFlat(rulesMapping, "GOLD");
will return a list of rules matching argument "GOLD" using the rulesMapping mapper table.
pccMapperGetIndex
This function will provide a list of all matching products with an index for each matching. This index may then be used by the pccMapperGetFromIndex function below for retrieving the rules applicable for the actual object.
list<any> pccMapperGetIndex ( [any mapper,] any argument1, any argument2, ... )
Parameters
Paramater | Description |
---|---|
| The mapper object to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup. |
| Any number of arguments to match using the mapper object. The number of arguments must match the mapper configuration. |
Returns: | A list of the matching products with an index for each matching object, or null if the mapper did not match any data. |
Example
list pccMapperGetIndex(rulesMapping,"GOLD");
will return a list of the products named "GOLD" using the mapper table rulesMapping , with an index for each matching object.
pccMapperGetFromIndex
This function will provide a list of rules applicable for the stated object.
list<any> pccMapperGetFromIndex ( [any mapper,] int index )
Parameters
Parameter | Description |
---|---|
| The mapper object to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup. |
| The index for the object that you want to retrieve rules for. |
Returns: | A list of rules applicable for the object with the stated index. |