Search in sources :

Example 1 with SetupBlogFailure

use of com.willshex.blogwt.client.api.blog.event.SetupBlogEventHandler.SetupBlogFailure in project blogwt by billy1380.

the class PropertyController method setupBlog.

public void setupBlog(List<Property> properties, List<User> users) {
    final SetupBlogRequest input = ApiHelper.setAccessCode(new SetupBlogRequest()).properties(properties).users(users);
    BlogService blogService = ApiHelper.createBlogClient();
    blogService.setupBlog(input, new AsyncCallback<SetupBlogResponse>() {

        @Override
        public void onSuccess(SetupBlogResponse output) {
            DefaultEventBus.get().fireEventFromSource(new SetupBlogSuccess(input, output), PropertyController.this);
        }

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new SetupBlogFailure(input, caught), PropertyController.this);
        }
    });
}
Also used : BlogService(com.willshex.blogwt.client.api.blog.BlogService) SetupBlogRequest(com.willshex.blogwt.shared.api.blog.call.SetupBlogRequest) SetupBlogResponse(com.willshex.blogwt.shared.api.blog.call.SetupBlogResponse) SetupBlogFailure(com.willshex.blogwt.client.api.blog.event.SetupBlogEventHandler.SetupBlogFailure) SetupBlogSuccess(com.willshex.blogwt.client.api.blog.event.SetupBlogEventHandler.SetupBlogSuccess)

Aggregations

BlogService (com.willshex.blogwt.client.api.blog.BlogService)1 SetupBlogFailure (com.willshex.blogwt.client.api.blog.event.SetupBlogEventHandler.SetupBlogFailure)1 SetupBlogSuccess (com.willshex.blogwt.client.api.blog.event.SetupBlogEventHandler.SetupBlogSuccess)1 SetupBlogRequest (com.willshex.blogwt.shared.api.blog.call.SetupBlogRequest)1 SetupBlogResponse (com.willshex.blogwt.shared.api.blog.call.SetupBlogResponse)1