idmap.addIdmap
idmap.addIdmap(ep1, id1, ep2, id2)
Description
Creates an id mapping association between endpoint ep1, id id1 and endpoint ep2, id id2.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
| ep1 | String | The first endpoint |
| id1 | String | The first id (the id in the idmaps of the endpoint ep1) |
| ep2 | String | The second endpoint |
| id2 | String | The second id (the id in the idmaps of the endpoint ep2) |
Example
idmap = option.getIdmap()
originid = message.getId()
originendpoint = message.getEndpoint()
id = idmap.findIdmap(originendpoint, originid, api.getEndpoint())
if(id == null)
idmap.addIdmap(originendpoint, originid, api.getEndpoint(), "fresh-"+originid)