@@ -0,0 +1,914 @@
+package dev.openshift.tapestry.angular.ws.service;%0D%0A%0D%0Aimport dev.openshift.tapestry.angular.data.user.User;%0D%0Aimport dev.openshift.tapestry.angular.services.UserDatabase;%0D%0Aimport org.apache.tapestry5.ioc.annotations.Inject;%0D%0A%0D%0Aimport javax.annotation.security.PermitAll;%0D%0Aimport javax.ws.rs.*;%0D%0Aimport javax.ws.rs.core.Response;%0D%0A%0D%0A%0D%0A%0D%0A@Path(%22/app/account%22)%0D%0Apublic class AccountService%0D%0A%7B%0D%0A%0D%0A    @Inject%0D%0A    UserDatabase userDatabase;%0D%0A%0D%0A%0D%0A    @POST%0D%0A    @Path(%22/register%22)%0D%0A    @Consumes(%22application/json%22)%0D%0A    @PermitAll%0D%0A    public Response addUser(User newUser) %7B%0D%0A%0D%0A        User user = userDatabase.getUserByLogin(newUser.getLogin());%0D%0A        if (user != null) %7B%0D%0A            //NOT_MODIFIED%0D%0A            return Response.status(304).build();%0D%0A        %7D%0D%0A        else %7B%0D%0A%0D%0A            userDatabase.add(newUser);%0D%0A            //CREATED%0D%0A            return Response.status(201).build();%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A%7D

add Account Service