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