Search in sources :

Example 1 with GetPageActionHandler

use of com.willshex.blogwt.server.api.page.action.GetPageActionHandler in project blogwt by billy1380.

the class PageJsonServlet method processAction.

@Override
protected String processAction(String action, JsonObject request) {
    String output = "null";
    if ("SubmitForm".equals(action)) {
        SubmitFormRequest input = new SubmitFormRequest();
        input.fromJson(request);
        output = new SubmitFormActionHandler().handle(input).toString();
    } else if ("GetPages".equals(action)) {
        GetPagesRequest input = new GetPagesRequest();
        input.fromJson(request);
        output = new GetPagesActionHandler().handle(input).toString();
    } else if ("GetPage".equals(action)) {
        GetPageRequest input = new GetPageRequest();
        input.fromJson(request);
        output = new GetPageActionHandler().handle(input).toString();
    } else if ("UpdatePage".equals(action)) {
        UpdatePageRequest input = new UpdatePageRequest();
        input.fromJson(request);
        output = new UpdatePageActionHandler().handle(input).toString();
    } else if ("DeletePage".equals(action)) {
        DeletePageRequest input = new DeletePageRequest();
        input.fromJson(request);
        output = new DeletePageActionHandler().handle(input).toString();
    } else if ("CreatePage".equals(action)) {
        CreatePageRequest input = new CreatePageRequest();
        input.fromJson(request);
        output = new CreatePageActionHandler().handle(input).toString();
    }
    return output;
}
Also used : GetPagesRequest(com.willshex.blogwt.shared.api.page.call.GetPagesRequest) DeletePageActionHandler(com.willshex.blogwt.server.api.page.action.DeletePageActionHandler) UpdatePageActionHandler(com.willshex.blogwt.server.api.page.action.UpdatePageActionHandler) CreatePageRequest(com.willshex.blogwt.shared.api.page.call.CreatePageRequest) CreatePageActionHandler(com.willshex.blogwt.server.api.page.action.CreatePageActionHandler) UpdatePageRequest(com.willshex.blogwt.shared.api.page.call.UpdatePageRequest) GetPageRequest(com.willshex.blogwt.shared.api.page.call.GetPageRequest) GetPageActionHandler(com.willshex.blogwt.server.api.page.action.GetPageActionHandler) DeletePageRequest(com.willshex.blogwt.shared.api.page.call.DeletePageRequest) SubmitFormRequest(com.willshex.blogwt.shared.api.page.call.SubmitFormRequest) SubmitFormActionHandler(com.willshex.blogwt.server.api.page.action.SubmitFormActionHandler) GetPagesActionHandler(com.willshex.blogwt.server.api.page.action.GetPagesActionHandler)

Example 2 with GetPageActionHandler

use of com.willshex.blogwt.server.api.page.action.GetPageActionHandler in project blogwt by billy1380.

the class StaticPage method lookupPage.

private void lookupPage() {
    GetPageRequest input = input(GetPageRequest.class).includePosts(Boolean.TRUE).page(new Page().slug(slug));
    output = (new GetPageActionHandler()).handle(input);
}
Also used : Page(com.willshex.blogwt.shared.api.datatype.Page) GetPageRequest(com.willshex.blogwt.shared.api.page.call.GetPageRequest) GetPageActionHandler(com.willshex.blogwt.server.api.page.action.GetPageActionHandler)

Aggregations

GetPageActionHandler (com.willshex.blogwt.server.api.page.action.GetPageActionHandler)2 GetPageRequest (com.willshex.blogwt.shared.api.page.call.GetPageRequest)2 CreatePageActionHandler (com.willshex.blogwt.server.api.page.action.CreatePageActionHandler)1 DeletePageActionHandler (com.willshex.blogwt.server.api.page.action.DeletePageActionHandler)1 GetPagesActionHandler (com.willshex.blogwt.server.api.page.action.GetPagesActionHandler)1 SubmitFormActionHandler (com.willshex.blogwt.server.api.page.action.SubmitFormActionHandler)1 UpdatePageActionHandler (com.willshex.blogwt.server.api.page.action.UpdatePageActionHandler)1 Page (com.willshex.blogwt.shared.api.datatype.Page)1 CreatePageRequest (com.willshex.blogwt.shared.api.page.call.CreatePageRequest)1 DeletePageRequest (com.willshex.blogwt.shared.api.page.call.DeletePageRequest)1 GetPagesRequest (com.willshex.blogwt.shared.api.page.call.GetPagesRequest)1 SubmitFormRequest (com.willshex.blogwt.shared.api.page.call.SubmitFormRequest)1 UpdatePageRequest (com.willshex.blogwt.shared.api.page.call.UpdatePageRequest)1