Advertisement
akakunin

PetCatalogPortlet.daletePet

Dec 6th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. /**
  2. * Метод удаляет питомца
  3. *
  4. * @param request
  5. * @param response
  6. */
  7. public void deletePet(ActionRequest request, ActionResponse response) {
  8. ThemeDisplay themeDisplay = getThemeDisplay(request);
  9. long petId = ParamUtil.getLong(request, PARAM_PET_ID);
  10.  
  11. log.info("User " + themeDisplay.getUserId() + " attemtps to remove pet " + petId);
  12. try {
  13. PetServiceUtil.deletePet(petId);
  14. log.info("Pet " + petId + " removed by user " + themeDisplay.getUserId());
  15. } catch (Exception ex) {
  16. log.error("Cannot remove pet", ex);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement