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