3.5 UDR Related Functions
createUDR
Creates a new UDR of the specified type. All fields are included, except for the optional.
<T> T createUDR( Class<T> udrInterface ) throws InstantiationException;
Parameter | Description |
---|---|
udrInterface | The class for the UDR bean. |
Returns: | A UDRInterface. |
listAddUDR
This function adds a UDRInterface into a list<DRUDR>. This function is utilized only when a list is present in within a UDR, normal Java list arrays will not work with this function.
void listAddUDR ( List list, UDRInterface udr ) throws Exception;
Parameter | Description |
---|---|
list | A list object containing UDRs. |
udr | The UDRInterface to be added into the list. |
Returns | A UDRInterface. |
Example - Using listAddUDR
mainUDR main = env.createUDR(mainUDR.class); // mainUDR contains the list sampleUDR out = env.createUDR(sampleUDR.class); out.setString1("this udr added from java agent."); out.setDate1(new DRDate(true)); out.setLong1(12345678); out.setDouble1(22.88); out.setBoolean1(false); env.listAddUDR(main.mylist,(UDRInterface) out)
listGetUDR
This function gets a UDR from a List<DRUDR>. This function is utilized only when a list is present in within a UDR, normal Java list arrays will not work with this function.
UDRInterface listGetUDR ( List list, int position ) throws Exception;
Parameter | Description |
---|---|
| A list object containing UDRs. |
| The position in the list to get from. |
Returns | A UDR. |
mapContainsUDR
This function will check for a particular UDRInterface value contained within a map object. This function is utilized only when a map is present in within a UDR, normal Java maps will not work with this function.
boolean mapContainsUDR ( Map map, UDRInterface udr ) throws Exception;
Parameter | Description |
---|---|
map | The map object to be inspected. |
| The UDRInterface value to be searched for. |
Returns | True if the map contains the matching UDRInterface. Fales if the map does not contain the UDRInterface or is null. |
mapGetUDR
Returns a UDRInterface from a map based on a specific key. This function is utilized only when a map is present in within a UDR, normal Java maps will not work with this function.
UDRInterface mapGetUDR ( Map map, Object key ) throws Exception;
Parameter | Description |
---|---|
| The map object containing the UDRs. |
key | The key associated to the UDR to be returned. |
Returns | A UDR. |
mapSetUDR
This function adds a UDRInterface into a map object. This function is utilized only when a map is present in within a UDR, normal Java maps will not work with this function.
void mapSetUDR ( Map map, Object key, UDRInterface udr ) throws Exception;
 Â
Parameter | Description |
---|---|
| The map object to be inserted into. |
key | The key associated to the UDR is to be inserted |
udr | The UDRInterface value to be inserted. |
Returns | Nothing. |
mapValuesUDR
Returns a string containing all error information that has been added to the UDR.
List mapValuesUDR (Map map) throws Exception;
Parameter | Descripton |
---|---|
map | The map object containing the UDRs. |
Returns | A list of all the UDRInterface in the map. |
route
The route function sends a UDR to a workflow route.
If no call to the route function is made, the agent will not have any outgoing routes in the Workflow Editor environment - it will not be possible to link to a subsequent agent.
The function routes a UDR to all the output routes, or a named output route.
public void route(Object data, String route /*Optional*/ );
Parameter | Description |
---|---|
data | The UDR/Bytearray to be routed. |
route | The local name of the route. This is an optional field. If this field is not included in the command, the UDR/Bytearray will be routed out to all connected output routes. |
Returns | Nothing. |