Example #1
0
 /**
  * Creates a new Account - all fields must be unique
  *
  * @param accountInput Account data
  * @return new account info data
  */
 @POST
 @PermitAll
 @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
 public AccountInfoData createAccount(AccountInput accountInput) {
   return accountOps.createAccount(accountId, accountInput);
 }
Example #2
0
 /**
  * Deletes the account
  *
  * @return response
  * @response.representation.200.doc account status set to active
  * @response.representation.304.doc account active status not modified
  */
 @DELETE
 @RolesAllowed(SystemRoles.ROLES_ADMINISTRATOR)
 public Response deleteAccount() {
   ResponseBuilder builder;
   boolean modified = accountOps.deleteAccount(accountId);
   if (modified) {
     builder = Response.ok();
   } else {
     builder = Response.notModified();
   }
   return builder.build();
 }
Example #3
0
 /**
  * Get account details
  *
  * @return account details
  */
 @GET
 @RolesAllowed(SystemRoles.ROLES_AUTHENTICATED)
 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
 public AccountDetailsData getAccountDetailsData() {
   return accountOps.getAccountDetailsData(accountId);
 }