Package org.jayasoft.woj.portal.business.services

Examples of org.jayasoft.woj.portal.business.services.ServiceException


           
            LOGGER.info("new invoice ident generated : " + invId);
            return invId;
        } catch (DaoException e) {
            LOGGER.warn("failed to generate an invoice identifier", e);
            throw new ServiceException("failed to generate an invoice identifier");
        }
    }
View Full Code Here


            throw new NullPointerException("invoice identifier cannot be null");
        }
        try {
            InvoiceIdImpl idInBase = (InvoiceIdImpl)DaoFactory.getInvoiceIdDao().find(id);
            if (idInBase==null) {
                throw new ServiceException("invoice identifier " + id.getIdent() + " cannot be found in database");
            }
            idInBase.setValid(true);
            DaoFactory.getInvoiceIdDao().save(idInBase);
        } catch (DaoException e) {
            LOGGER.warn("cannot validate invoice identifier " + id);
            throw new ServiceException("cannot validate invoice identifier");
        }
    }
View Full Code Here

                          request.setAttribute(Params.REDIRECT.REQUEST.REDIRECTION_URL, ActionsHelper.homepageForward().getPath());
                          request.setAttribute(Params.REDIRECT.REQUEST.MESSAGE_KEY, "illegal.state");
                          return "redirect";          
                        }
            } catch (DaoException e) {
              throw new ServiceException("Cannot handle action on license with parameters: " + request.getParameterMap(), e);
            }
                    }
                }
                , "user.group.administrate"
        );
View Full Code Here

      try {
        prepareValueForAdministration(form, request, userLogged, (Group) DaoFactory.getGroupDao().find(grpId));                       
      } catch (DaoException e) {
        LOGGER.debug("Cannot find group for id:" + grpId);
        throw new ServiceException("Cannot find group for id:" + grpId, e);
      }
     
      return "user.group.administrate";
    }
View Full Code Here

                    Long grpId = (Long)f.get(Params.USER_GROUP.EDIT.PARAMS.GROUP_ID);
                      try {
                        prepareValueForAdministration(form, request, userLogged, (Group) DaoFactory.getGroupDao().find(grpId));                       
                      } catch (DaoException e) {
                        LOGGER.debug("Cannot find group for id:" + grpId);
                        throw new ServiceException("Cannot find group for id:" + grpId, e);
                      }
              return null;
                    }
                }
                , "user.group.administrate"
View Full Code Here

                        if (grpId != null) {
                          try {
                            grp = (Group) DaoFactory.getGroupDao().find(grpId);
                          } catch (DaoException e) {
                            LOGGER.debug("Cannot find group for id:" + grpId);
                            throw new ServiceException("Cannot find group for id:" + grpId, e);
                          }
                        } else {
                          grp = (Group) DaoFactory.getGroupDao().newHandledObject();
                        }
                         
View Full Code Here

           
            return null;
       
      } catch (DaoException e) {
        LOGGER.debug("Cannot find Group for id: " + grpId);
        throw new ServiceException("Cannot find Group for id: " + grpId, e);
      }
    }
View Full Code Here

     */
    public Invoice getInvoice(Long invoiceId) throws ServiceException {
        try {
            return (Invoice)DaoFactory.getInvoiceDao().find(invoiceId);
        } catch (DaoException e) {
            throw new ServiceException("cannot get invoice, invoice " + invoiceId + " not found");
        }
    }
View Full Code Here

        }
        try {
            DaoFactory.getOrderDao().fetch(o);
            return o.getInvoice();
        } catch (DaoException e) {
            throw new ServiceException("cannot retrieve invoice for order " + o.getId(), e);
        }
    }
View Full Code Here

            LOGGER.info(MessageFormat.format("new invoice[{0}] created for user[{1}]", new Object[] {new Long(i.getId()), o.getBuyer().getLogin()}));
            return i;
        } catch (DataAccessException dae) {
            LOGGER.debug("error creating invoice", dae);
            throw new ServiceException("cannot create invoice", dae);
        } catch (DaoException e) {
            LOGGER.debug("error creating invoice", e);
            throw new ServiceException("cannot create invoice", e);
        } catch (Exception re) {
            LOGGER.debug("error creating invoice", re);
            throw new ServiceException("cannot create invoice", re);
        }
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.portal.business.services.ServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.