Package evolaris.framework.sys.business.exception

Examples of evolaris.framework.sys.business.exception.ConfigurationException


      LOGGER.debug("redirecting to other context: "+target);
      resp.sendRedirect(target.toString());
    } catch (Exception e) {
      String msg = "Failure redirecting to `"+target+"`: "+e.getMessage();
      LOGGER.error(msg, e);
      throw new ConfigurationException(msg, e);
    }
  }
View Full Code Here


        }
      } else {
        group = webUser.getGroup();
      }
      if (webUser.getGroup().getId() != group.getId() && !req.isUserInRole(UserManagerBase.ADMINISTRATOR)) {
        throw new ConfigurationException("User "+UserManagerBase.toString(webUser) +" must not access group `"+group.getGroupname()+"`");
      }
    }
    return group;
  }
View Full Code Here

          throw new BugException("illegal user set id: " + userSetId);
        }
        UserSetManager userSetManager = new UserSetManager(locale,session);
        UserSet userSet =  userSetManager.getUserSet(userSetId);
        if (userSet == null && userSetId != -2) {
          throw new ConfigurationException("illegal user set id: " + userSetId);
        }
        emailCommandEntry.setDestinationUserSet(userSet);
        emailCommandEntry.setCurrentUserSetAsDestination(userSetId == -2 ? 1 : 0);
        emailCommandEntry.setDestinationUser(null);
        emailCommandEntry.setDestinationEmail(null);
        emailCommandEntry.setDestinationPersonalName(null);
        break;
      case 2: // message to user
        Long userId = f.getUserId();
        if (userId.longValue() == -1){
          throw new InputException(resources.getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSelected"));
        }
        UserManager userManager = new UserManager(locale,session);
        User user = userManager.getUserDetails(userId);
        if (user == null){
          throw new ConfigurationException("illegal user id: " + user);
        }
        emailCommandEntry.setDestinationUser(user);
        emailCommandEntry.setDestinationUserSet(null);
        emailCommandEntry.setDestinationEmail(null);
        emailCommandEntry.setDestinationPersonalName(null);
View Full Code Here

        String s = this.getResources(req).getMessage(locale,"um.AccessPermission_"+p.getValue());
         displayablePermissions.add(new KeyValueContainer(p.getId(), s));
         LOGGER.debug("added displayable permission `"+s+"`");
      } catch (Exception e) {
        String msg = getResources(req).getMessage(locale,"um.missingAccessPermissionName", p.getValue());
        throw new ConfigurationException(msg);
      }
    }
    req.setAttribute("permissions", displayablePermissions);

    LOGGER.debug("about to fetch anonymous permissions...");
View Full Code Here

   */
  @Override
  public ActionForward execute(Exception exception, ExceptionConfig arg1, ActionMapping mapping, ActionForm arg3, HttpServletRequest req, HttpServletResponse arg5) throws ServletException {
    String userName = req.getUserPrincipal() == null ? "`ANONYMOUS USER`" : req.getUserPrincipal().getName().toLowerCase();       
    correctStrutsLocale(req);
    ConfigurationException e = (ConfigurationException) exception;
    e.generalLog(userName);
    req.setAttribute("userMessage",e.getUserMessage());
    return mapping.findForward("configurationErrorPage");
  }
View Full Code Here

        req.setAttribute("generalError",noUserSetSelectedString);
        return mapping.findForward("notSent");
      }
      UserSet userSet =  userSetManager.getUserSet(userSetId);
      if (userSet == null){
        throw new ConfigurationException("illegal user set id: " + userSetId);
      }
      users = userSet.getUsers();
      break;
    case 2: // user
      if (userId.longValue() == -1){
        String noUserSelectedString = getResources(req).getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSelected");
        req.setAttribute("generalError",noUserSelectedString);
        return mapping.findForward("notSent");
      }
      UserManager userManager = new UserManager(locale,session);
      User user = userManager.getUserDetails(userId);
      if (user == null){
        throw new ConfigurationException("illegal user id: " + user);
      }
      Set<User> oneManSet = new HashSet<User>();
      oneManSet.add(user);
      users = oneManSet;
      break;
View Full Code Here

          throw new BugException("illegal user set id: " + userSetId);
        }
        UserSetManager userSetManager = new UserSetManager(locale,session);
        UserSet userSet =  userSetManager.getUserSet(userSetId);
        if (userSet == null && userSetId != -2) {
          throw new ConfigurationException("illegal user set id: " + userSetId);
        }
        smsCommandEntry.setDestinationUserSet(userSet);
        smsCommandEntry.setCurrentUserSetAsDestination(userSetId == -2 ? 1 : 0);       
        smsCommandEntry.setDestinationUser(null);
        smsCommandEntry.setDestinationMsisdn(null);
        break;
      case 5: // message to user
        Long userId = msgForm.getUserId();
        if (userId.longValue() == -1){
          String noUserSelectedString = getResources(req).getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSelected");
          throw new InputException(noUserSelectedString);
        }
        UserManager userManager = new UserManager(locale,session);
        User user = userManager.getUserDetails(userId);
        if (user == null){
          throw new ConfigurationException("illegal user id: " + user);
        }
        smsCommandEntry.setDestinationContact(0);
        smsCommandEntry.setDestinationUser(user);
        smsCommandEntry.setDestinationUserSet(null);
        smsCommandEntry.setDestinationMsisdn(null);
View Full Code Here

          throw new BugException("illegal user set id: " + userSetId);
        }
        UserSetManager userSetManager = new UserSetManager(locale,session);
        UserSet userSet =  userSetManager.getUserSet(userSetId);
        if (userSet == null&& userSetId != -2) {
          throw new ConfigurationException("illegal user set id: " + userSetId);
        }
        smsCommandEntry.setDestinationUserSet(userSet);
        smsCommandEntry.setCurrentUserSetAsDestination(userSetId == -2 ? 1 : 0);
        smsCommandEntry.setDestinationMsisdn(null);
        smsCommandEntry.setDestinationUser(null);
        break;
      case 5: // message to user
        smsCommandEntry.setDestinationContact(0);
        Long userId = msgForm.getUserId();
        if (userId.longValue() == -1){
          String noUserSelectedString = getResources(req).getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSelected");
          throw new InputException(noUserSelectedString);
        }
        UserManager userManager = new UserManager(locale,session);
        User user = userManager.getUserDetails(userId);
        if (user == null){
          throw new ConfigurationException("illegal user id: " + user);
        }
        smsCommandEntry.setDestinationUser(user);
        smsCommandEntry.setDestinationUserSet(null);
        smsCommandEntry.setDestinationMsisdn(null);
        break;
View Full Code Here

    if (eventId == -1) {
      throw new BugException("id -1 in session");
    }
    TimerEvent event = serviceMgr.getTimerEvent(eventId);
    if(event == null) {
      throw new ConfigurationException("There is no event with id: " + eventId + " -> cannot add a new interaction");
    }
    return event;
  }
View Full Code Here

          }
        }
      }
      return (ApplicationType[])resultList.toArray(new ApplicationType[0]);
    } catch (ArrayIndexOutOfBoundsException e){
      throw new ConfigurationException("Application selection configuration changed during result evaluation.");
    }
  }
View Full Code Here

TOP

Related Classes of evolaris.framework.sys.business.exception.ConfigurationException

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.