Example #1
0
 /**
  * This method cancels a batch.
  *
  * @param batchIdString a string representing the batch id
  * @param cancelNote the cancelation note entered by the user
  * @param user the current user
  */
 private boolean performCancel(String batchIdString, String cancelNote, Person user) {
   try {
     Integer batchId = Integer.parseInt(batchIdString);
     return batchMaintenanceService.cancelPendingBatch(batchId, cancelNote, user);
   } catch (NumberFormatException e) {
     GlobalVariables.getMessageMap()
         .putError(
             PdpPropertyConstants.BatchConstants.BATCH_ID,
             PdpKeyConstants.BatchConstants.ErrorMessages.ERROR_BATCH_ID_IS_NOT_NUMERIC);
     return false;
   }
 }