Examples of BusinessException


Examples of loxia.exception.BusinessException

    }
    }

  private List<String> getBusiExceptionMessage(ActionInvocation invocation, BusinessException e){   
    List<String> errors = new ArrayList<String>();
    BusinessException be = e;
    while(be != null){
      String msgKey = "business_exception_" + be.getErrorCode();
      errors.add(getMessage(invocation, msgKey, be.getArgs()));
      be = be.getLinkedException();
    }

    return errors;
  }
View Full Code Here

Examples of loxia.exception.BusinessException

 
  @Override
  protected ModelAndView getModelAndView(String viewName, Exception ex,
      HttpServletRequest request) {
    if(ex instanceof BusinessException){
      BusinessException bex = (BusinessException)ex;
      ex = encode(bex);
    }
    if(((HttpServletRequest)request).getHeader("X-Requested-With") != null){
      return getModelAndView("json", ex);
    }else   
View Full Code Here

Examples of loxia.exception.BusinessException

      return super.getModelAndView(viewName, ex, request);
  }

  private BusinessException encode(BusinessException ex){
    String key = BUSINESS_EXCEPTION_PREFIX + ex.getErrorCode();
    BusinessException result = new BusinessException(ex.getErrorCode(),
        context.getMessage(key, ex.getArgs(),key, LocaleContextHolder.getLocale()));
    result.setArgs(ex.getArgs());
    if(ex.getLinkedException() != null){
      result.setLinkedException(encode(ex.getLinkedException()));
    }
    return result;
  }
View Full Code Here

Examples of loxia.exception.BusinessException

      logger.debug("Current ou isn't changed.");
    }
   
    if(controller.getCurrentOperatingUnit() == null){
      logger.warn("Current ou is null.");
      throw new BusinessException(PreserveErrorCode.NO_SUFFICICENT_PRIVILEGE);
    }
    if(controller.checkPrivilege(acl.value())){
      logger.debug("User pass the authorization.");
      return pjp.proceed(pjp.getArgs());
    }else{
      throw new BusinessException(PreserveErrorCode.NO_SUFFICICENT_PRIVILEGE);
    }
  }
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

        calls.append("retrieveCount,");
        return  callbackCount;
    }
   
    public void businessException() throws BusinessException {
        throw new BusinessException("Business Exception");
    }    
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

        calls.append("retrieveCount,");
        return  callbackCount;
    }
   
    public void businessException() throws BusinessException {
        throw new BusinessException("Business Exception");
    }    
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

    public void incrementCount() {
        state.put(cid, Integer.valueOf(state.get(cid)+1));
    }

    public void businessException() throws BusinessException {
        throw new BusinessException("Business Exception");
    }
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

        // TODO Auto-generated method stub
       
    }
   
    public void businessExceptionCallback() throws BusinessException {
        throw new BusinessException("Business Exception");
    }   
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

        return count;
    }
   
    public void businessException() throws BusinessException {
        calls.append("businessException,");
        throw new BusinessException("Business Exception");
    }    
View Full Code Here

Examples of org.apache.tuscany.sca.itest.conversational.BusinessException

        calls.append("retrieveCount,");
        return  callbackCount;
    }
   
    public void businessException() throws BusinessException {
        throw new BusinessException("Business Exception");
    }    
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.