Search in sources :

Example 1 with DeleteGeneratedDownloadsActionHandler

use of com.willshex.blogwt.server.api.download.action.DeleteGeneratedDownloadsActionHandler in project blogwt by billy1380.

the class DownloadJsonServlet method processAction.

@Override
protected String processAction(String action, JsonObject request) {
    String output = "null";
    if ("DeleteGeneratedDownloads".equals(action)) {
        DeleteGeneratedDownloadsRequest input = new DeleteGeneratedDownloadsRequest();
        input.fromJson(request);
        output = new DeleteGeneratedDownloadsActionHandler().handle(input).toString();
    } else if ("GenerateDownload".equals(action)) {
        GenerateDownloadRequest input = new GenerateDownloadRequest();
        input.fromJson(request);
        output = new GenerateDownloadActionHandler().handle(input).toString();
    } else if ("GetGeneratedDownloads".equals(action)) {
        GetGeneratedDownloadsRequest input = new GetGeneratedDownloadsRequest();
        input.fromJson(request);
        output = new GetGeneratedDownloadsActionHandler().handle(input).toString();
    }
    return output;
}
Also used : GenerateDownloadRequest(com.willshex.blogwt.shared.api.download.call.GenerateDownloadRequest) DeleteGeneratedDownloadsRequest(com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsRequest) GetGeneratedDownloadsActionHandler(com.willshex.blogwt.server.api.download.action.GetGeneratedDownloadsActionHandler) GenerateDownloadActionHandler(com.willshex.blogwt.server.api.download.action.GenerateDownloadActionHandler) DeleteGeneratedDownloadsActionHandler(com.willshex.blogwt.server.api.download.action.DeleteGeneratedDownloadsActionHandler) GetGeneratedDownloadsRequest(com.willshex.blogwt.shared.api.download.call.GetGeneratedDownloadsRequest)

Aggregations

DeleteGeneratedDownloadsActionHandler (com.willshex.blogwt.server.api.download.action.DeleteGeneratedDownloadsActionHandler)1 GenerateDownloadActionHandler (com.willshex.blogwt.server.api.download.action.GenerateDownloadActionHandler)1 GetGeneratedDownloadsActionHandler (com.willshex.blogwt.server.api.download.action.GetGeneratedDownloadsActionHandler)1 DeleteGeneratedDownloadsRequest (com.willshex.blogwt.shared.api.download.call.DeleteGeneratedDownloadsRequest)1 GenerateDownloadRequest (com.willshex.blogwt.shared.api.download.call.GenerateDownloadRequest)1 GetGeneratedDownloadsRequest (com.willshex.blogwt.shared.api.download.call.GetGeneratedDownloadsRequest)1