use of com.willshex.blogwt.client.api.blog.event.GetResourceEventHandler.GetResourceFailure in project blogwt by billy1380.
the class ResourceController method getResource.
public void getResource(Resource resource) {
final GetResourceRequest input = SessionController.get().setSession(ApiHelper.setAccessCode(new GetResourceRequest())).resource(resource);
ApiHelper.createBlogClient().getResource(input, new AsyncCallback<GetResourceResponse>() {
@Override
public void onSuccess(GetResourceResponse output) {
if (output.status == StatusType.StatusTypeSuccess) {
if (input.resource != null) {
}
}
DefaultEventBus.get().fireEventFromSource(new GetResourceSuccess(input, output), ResourceController.this);
}
@Override
public void onFailure(Throwable caught) {
DefaultEventBus.get().fireEventFromSource(new GetResourceFailure(input, caught), ResourceController.this);
}
});
}
Aggregations