Esempio n. 1
0
 @Override
 @RolesAllowed("ROLE_USER")
 public void addCustomer(@Valid @RequestBody Customer newCustomer) throws Exception {
   // TODO: somehow database auto generate timestamp not working
   newCustomer.setLastUpdate(new Date());
   customerService.addCustomer(newCustomer);
 }
Esempio n. 2
0
 @Override
 @RolesAllowed("ROLE_USER")
 public Customer getCustomerByLogin(@PathVariable("login_id") @NotNull String id)
     throws Exception {
   return customerService.getCustomerByLogin(id);
 }