Examples of BusinessException


Examples of com.eforce.baby.common.delegates.BusinessException

      dao.createUser(dsName,dbType,userVO);
    }
    catch (DAOException e)
    {
      log.error("ERROR in createUser ",e);
      BusinessException be=new BusinessException(e.getMessage());
      be.setMessageKey(e.getMessageKey());
      throw be;
    }
  }
View Full Code Here

Examples of com.eforce.baby.common.delegates.BusinessException

      dao.updateUser(dsName,dbType,userVO);
    }
    catch (DAOException e)
    {
      log.error("ERROR in createUser ",e);
      BusinessException be=new BusinessException(e.getMessage());
      be.setMessageKey(e.getMessageKey());
      throw be;
    }
   
  }
View Full Code Here

Examples of com.eforce.baby.common.delegates.BusinessException

  
     }
     catch(DAOException e)
     {
       log.error("ERROR in search USER ",e);
       BusinessException be=new BusinessException(e.getMessage());
       be.setMessageKey(e.getMessageKey());
       throw be;
     }
    
     return userData;
View Full Code Here

Examples of com.eforce.baby.common.delegates.BusinessException

      dao.delete(dsName,dbType,id);
    }
    catch (DAOException e)
    {
      log.error("ERROR in deleteUser ",e);
      BusinessException be=new BusinessException(e.getMessage());
      be.setMessageKey(e.getMessageKey());
      throw be;
    }
  }
View Full Code Here

Examples of com.skyline.common.exception.BusinessException

  public static HttpServletRequest initRequest(HttpServletRequest request) {
    if (request == null) {
      request = RequestContainer.getRequest();
    }
    if (request == null) {
      throw new BusinessException("传入的request为空,而且当前线程中也不存在HttpServletRequest对象");
    }
    return request;
  }
View Full Code Here

Examples of com.skyline.common.exception.BusinessException

    if (response == null) {
      response = ResponseContainer.getResponse();
    }

    if (response == null) {
      throw new BusinessException("传入的response为空,而且当前线程中也不存在HttpServletResponse对象");
    }
    return response;
  }
View Full Code Here

Examples of de.spotnik.BusinessException

        try
        {
            account = UserSession.getCurrentAccount();
            if( account == null)
            {
                throw new BusinessException("no active user session (no user logged in)");
            }
           
            List<TagTO> tagList = accountController.findAllTags(account.getId());
           
            for( TagTO tag : tagList)
View Full Code Here

Examples of ifott.BusinessException

    @Override
    public void pruefePasswort(String login, String passwort) throws BusinessException {
        logger.info("pruefePasswort: login='" + login + "', passwort='" + passwort + '\'');
        if (login == null || !login.equals(ServerConfiguration.getInstance().getProperty("ttexport.user")) ||
                passwort == null || !passwort.equals(ServerConfiguration.getInstance().getProperty("ttexport.password"))) {
            throw new BusinessException("unknown user or wrong password",
                    "Unbekannter Benutzer oder falsches Passwort");
        }

    }
View Full Code Here

Examples of ifott.BusinessException

        if (projects.containsKey(Long.parseLong(gruppenId))) {
            return convertProjectToGroup(projects.get(Long.parseLong(gruppenId)));
        }

        throw new BusinessException(
                "group with id " + gruppenId + " does not exist",
                "Gruppe mit ID " + gruppenId + " existiert nicht.");
    }
View Full Code Here

Examples of loxia.exception.BusinessException

   
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
   
    if(needCredential && authentication == null){
      logger.error("Session timeout.");
      throw new BusinessException(PreserveErrorCode.SESSION_TIMEOUT);
    }
   
    if(needCheck){
      BaseProfileAction act = (BaseProfileAction)action;
                 
      LoxiaUserDetails userDetails = (LoxiaUserDetails)authentication.getPrincipal();
      logger.debug("Current Principal:" + userDetails);
      String entryAcl = act.getAcl();
      if(entryAcl != null){
        userDetails.setCurrentOu(null);
        logger.debug("Function Entrance... Organization need to repick");
       
        for(GrantedAuthority auth: userDetails.getAuthorities()){
          LoxiaGrantedAuthority lauth = (LoxiaGrantedAuthority)auth;
          if(lauth.getAuthority().equals(entryAcl)){
            userDetails.setCurrentAuthority(lauth);
            break;
          }
        }
        if(userDetails.getCurrentAuthority() == null ||
            userDetails.getCurrentAuthority().getOuIds().size() == 0){
          logger.error("No sufficicent privilege.");
          throw new BusinessException(PreserveErrorCode.NO_SUFFICICENT_PRIVILEGE);
        }else{
          if(userDetails.getCurrentAuthority().
              getOuIds().size() == 1){
            userDetails.setCurrentOu(operatingUnitDao.getByPrimaryKey(
                userDetails.getCurrentAuthority().getOuIds().iterator().next()));
          }else{
            logger.debug("Redirect Invocation");
           
            String url = request.getRequestURI();
            Enumeration<String> paramNames = request.getParameterNames();
            StringBuffer paramsSb = new StringBuffer();
            while (paramNames.hasMoreElements()) {
              String name = (String) paramNames.nextElement();
              if (!"acl".equalsIgnoreCase(name)){
                paramsSb.append(name + "=" + request.getParameter(name) + "&");
              }
            }
            if (paramsSb.length() > 0){
              paramsSb.deleteCharAt(paramsSb.length()-1);
              url = url + "?" + paramsSb.toString();
            }
            request.getSession().setAttribute(BaseAction.FOLLOWING_URL_AFTER_OPERATING_UNIT_PICKUP, url);
            response.sendRedirect(request.getContextPath() + "/operatingunitpickup.do");
            return null;
          }
        }
      }else{
        if(act.getSelectedOuId() != null){
          //set Current OperatingUint in up
          userDetails.setCurrentOu(operatingUnitDao.getByPrimaryKey(act.getSelectedOuId()));
        }else{
          if(!userDetails.checkAuthority(acl.value())){
            logger.error("No sufficicent privilege.");
            throw new BusinessException(PreserveErrorCode.NO_SUFFICICENT_PRIVILEGE);
          }
        }         
      }
           
    }
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.