pSentObj.add("uuid", pSent.getUuid());
pSentObj.add("display", pSent.getName());
}
obj.add("providerSent", pSentObj);
SimpleObject toLocationObj = new SimpleObject();
Location toLocation = rAlert.getToLocation();
if (toLocation != null) {
toLocationObj.add("uuid", toLocation.getUuid());
toLocationObj.add("display", toLocation.getName());
}
obj.add("toLocation", toLocationObj);
SimpleObject fromLocationObj = new SimpleObject();
Location fromLocation = rAlert.getFromLocation();
if (fromLocation != null) {
fromLocationObj.add("uuid", fromLocation.getUuid());
fromLocationObj.add("display", fromLocation.getName());
}
obj.add("fromLocation", fromLocationObj);
obj.add("alertType", rAlert.getAlertType());
obj.add("defaultTask", rAlert.getDefaultTask());
obj.add("seen", rAlert.getSeen());