Search in sources :

Example 1 with DeleteGeneratedDownloadsFailure

use of com.willshex.blogwt.client.api.download.event.DeleteGeneratedDownloadsEventHandler.DeleteGeneratedDownloadsFailure in project blogwt by billy1380.

the class GeneratedDownloadController method deleteGeneratedDownload.

public void deleteGeneratedDownload(GeneratedDownload generatedDownload) {
    final DeleteGeneratedDownloadsRequest input = ApiHelper.setAccessCode(new DeleteGeneratedDownloadsRequest());
    input.session = SessionController.get().sessionForApiCall();
    input.downloads = Arrays.asList(generatedDownload);
    ApiHelper.createDownloadClient().deleteGeneratedDownloads(input, new AsyncCallback<DeleteGeneratedDownloadsResponse>() {

        @Override
        public void onSuccess(DeleteGeneratedDownloadsResponse output) {
            DefaultEventBus.get().fireEventFromSource(new DeleteGeneratedDownloadsSuccess(input, output), GeneratedDownloadController.this);
        }

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new DeleteGeneratedDownloadsFailure(input, caught), GeneratedDownloadController.this);
        }
    });
}
Also used : DeleteGeneratedDownloadsRequest(com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsRequest) DeleteGeneratedDownloadsFailure(com.willshex.blogwt.client.api.download.event.DeleteGeneratedDownloadsEventHandler.DeleteGeneratedDownloadsFailure) DeleteGeneratedDownloadsResponse(com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsResponse) DeleteGeneratedDownloadsSuccess(com.willshex.blogwt.client.api.download.event.DeleteGeneratedDownloadsEventHandler.DeleteGeneratedDownloadsSuccess)

Aggregations

DeleteGeneratedDownloadsFailure (com.willshex.blogwt.client.api.download.event.DeleteGeneratedDownloadsEventHandler.DeleteGeneratedDownloadsFailure)1 DeleteGeneratedDownloadsSuccess (com.willshex.blogwt.client.api.download.event.DeleteGeneratedDownloadsEventHandler.DeleteGeneratedDownloadsSuccess)1 DeleteGeneratedDownloadsRequest (com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsRequest)1 DeleteGeneratedDownloadsResponse (com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsResponse)1