getEventBus())
{
@Override
public void onSuccess(final GetActivitiesResult result)
{
ShowMessageEvent.fire(DashboardPresenter.this, new Message(INFO, "Activities successfully loaded.", true));
ActivitiesLoadedEvent.fire(DashboardPresenter.this, result.getActivities());
}
@Override
public void onNotFound(final RestException caught)
{
String errorMessage = "No activities found";
ShowMessageEvent.fire(DashboardPresenter.this, new Message(WARNING, errorMessage, true));
warn(activity, errorMessage);
String links = caught.getMethod().getResponse().getHeader("Link");
LinkHeader linkHeader = new LinkHeader(LinksParser.valueOf(links));
ActivitiesNotFoundEvent.fire(DashboardPresenter.this, linkHeader);