Package evolaris.framework.sys.business.exception

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


  public String getMailSmtpHost() {
    try {
      Configuration config = (Configuration)session.get(Configuration.class, 1L);
      if (config == null){
        throw new ConfigurationException("Missing configuration entry");
      }
      return config.getMailSmtpHost();
    } catch (Throwable e) {
      throw new ConfigurationException("Error getting MailSmtpHost", e);
    }
  }
View Full Code Here


      } else if (f.getRepetitionUnit().equals("DAYS")){
        timerEvent.setIntervalInMillis(interval * MILLIS_PER_DAY);
      } else if (f.getRepetitionUnit().equals("WEEKS")){
        timerEvent.setIntervalInMillis(interval * MILLIS_PER_WEEK);
      } else {
        throw new ConfigurationException("unsupported repetition unit: " + f.getRepetitionUnit());
      }
    } else {
      timerEvent.setIntervalInMillis(0);     
    }

View Full Code Here

    if (interactionListId == -1){
      throw new BugException("interactionList id -1 in session");
    }
    InteractionList interactionList = smsDbManager.getInteractionList(interactionListId);
    if(interactionList == null){
      throw new ConfigurationException("There is no interactionList with id: " + interactionListId + " -> cannot add a new interaction");
    }

    // check access rights
    if (!req.isUserInRole(SmsDbManager.INTERACTION_ADMINISTRATOR)
          || !req.isUserInRole(UserManagerBase.ADMINISTRATOR) && interactionList.getGroup() != webUser.getGroup()
View Full Code Here

    }
    long groupId = ((Long)groupIdParameter).longValue();
    GroupManager groupManager = new GroupManager(locale,session);
    Group group = groupManager.getGroup(groupId);
    if (group == null){
      throw new ConfigurationException("There is no group with id: " + groupId + " -> cannot add a new interaction");
    }
    checkAccessRights(req, group);
    return group;
  }
View Full Code Here

      throw new BugException("no command entry id passed to the edit action");
    }
    long commandEntryId = ((Long)commandEntryIdParameter).longValue();
    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if(commandEntry == null){
      throw new ConfigurationException("There is no command entry with id: " + commandEntryId + " -> cannot edit the interaction");
    }
    return commandEntry;
  }
View Full Code Here

      throw new BugException("interactionList id -1 in session");
    }
    SmsDbManager smsDbManager = new SmsDbManager(locale,session);
    InteractionList interactionList = smsDbManager.getInteractionList(interactionListId);
    if(interactionList == null) {
      throw new ConfigurationException("There is no interactionList with id: " + interactionListId + " -> cannot add a new interaction");
    }
    if (!req.isUserInRole(UserManagerBase.ADMINISTRATOR) && (!req.isUserInRole(SmsDbManager.INTERACTION_ADMINISTRATOR) || webUser.getGroup() != interactionList.getGroup())){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.insufficientRights"));
    }   
    LOGGER.debug("interaction list from session: id="+ interactionList.getId() + "; group=`" + interactionList.getGroup().getGroupname() + "`; class=" + interactionList.getClass().getName());
View Full Code Here

   * @return  group object
   */
  protected Group validGroupFromForm(HttpServletRequest req, F messageSendForm) {
    Long selectedGroupId = messageSendForm.getGroupId();
    if (selectedGroupId == null){
      throw new ConfigurationException("validation of group failed: group ID = null");
    }
    GroupManager groupManager = new GroupManager(locale,session);
    Group group = groupManager.getGroup(selectedGroupId);
    if (group == null){
      throw new ConfigurationException("validation of group failed: group ID = " + selectedGroupId);
    }
    return group;
  }
View Full Code Here

  private ActionForward switchCurrentGroup(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    String name = req.getParameter("name");
    GroupManager groupMgr = new GroupManager(locale, session);
    Group group = groupMgr.getGroup(name);
    if (group == null) {
      throw new ConfigurationException("Switching groups failed: No group named `"+name+"` found.");     
    }
    setCurrentGroup(req, resp, group);
    LOGGER.debug("Switched to group `"+name+"`");
    // create a JSON result: [result:...]
    String jsonString = "[result:\"ok\"]";
View Full Code Here

 
  private Group mgblGroup(){
    GroupManager groupManager = new GroupManager(locale,session);
    Group group = groupManager.getGroup(MGBL_GROUPNAME);
    if (group == null){
      throw new ConfigurationException("No group with mGBL groupname `" + MGBL_GROUPNAME + "` found");
    }
    return group;
  }
View Full Code Here

    q.setParameter("CODE", MGBL_GAMEINSTANCES_BLOG_CODE);
    q.setEntity("GROUP", group);
    try {
      return (Blog)q.list().get(0);
    } catch (Exception e) {
      throw new ConfigurationException("No blog with code `"+MGBL_GAMEINSTANCES_BLOG_CODE+"` found for group `" + MGBL_GROUPNAME + "`");
    }
  }
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.