Package evolaris.framework.um.business

Examples of evolaris.framework.um.business.UserSetManager


        smsCommandEntry.setDestinationContact(0);
        Long userSetId = msgForm.getUserSetId();
        if(userSetId.longValue() == -1){
          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);       
View Full Code Here


        smsCommandEntry.setDestinationContact(0);
        Long userSetId = msgForm.getUserSetId();
        if(userSetId.longValue() == -1){
          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);
View Full Code Here

    Set<User> users=null;

    Integer destinationSelection = smsSendForm.getDestinationSelection();
    switch (destinationSelection==null?0:destinationSelection){
    case 1// user set
      UserSetManager userSetManager = new UserSetManager(locale,session);
      if (userSetId.longValue() == -1){
        String noUserSetSelectedString = getResources(req).getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSetSelected");
        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;
View Full Code Here

    Set<User> users=null;

    Integer destinationSelection = emailSendForm.getDestinationSelection();
    switch (destinationSelection==null?0:destinationSelection){
    case 1// user set
      UserSetManager userSetManager = new UserSetManager(locale,session);
      if (userSetId.longValue() == -1){
        String noUserSetSelectedString = getResources(req).getMessage(locale,"smssvc.MessageNotSentBecauseNoUserSetSelected");
        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;
View Full Code Here

    interactionLogForm.setParameterSelection(0)// default (empty) constant
    interactionLogForm.setUserSetId(-1)// no user set preselected
    interactionLogForm.setLogContact(false)// logging the contact not required
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    req.getSession().setAttribute("userSets", new UserSetManager(locale,session).getUserSets(group));
    return mapping.findForward("enter");
  }
View Full Code Here

    interactionLogForm.setLogContact(commandEntry.getLogContact() != 0);
    interactionLogForm.setSortLabel(commandEntry.getSortLabel());

    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    req.getSession().setAttribute("userSets", new UserSetManager(locale,session).getUserSets(commandEntry.getGroup()));
    return mapping.findForward("edit");
  }
View Full Code Here

    interactionLogCommandEntry.setOperation(interactionLogForm.getOperation().trim().length() == 0 ? null : interactionLogForm.getOperation());
    interactionLogCommandEntry.setParameter(interactionLogForm.getParameter().length() == 0 ? null : interactionLogForm.getParameter());
    interactionLogCommandEntry.setParameterFromContent(interactionLogForm.getParameterSelection() == null ? 0 : interactionLogForm.getParameterSelection());
    long userSetId = interactionLogForm.getUserSetId();
    if (userSetId >= 1L){
      UserSetManager userSetManager = new UserSetManager(locale,session);
      UserSet userSet = userSetManager.getUserSet(userSetId);
      if (userSet == null || userSet.getGroup() != interactionLogCommandEntry.getGroup()){
        throw new InputException(getResources(req).getMessage(locale, "smssvc.selectedUserSetDoesNotExistAnymore"))// may have been deleted
      }
      interactionLogCommandEntry.setLogUserSet(userSet);
    } else {
View Full Code Here

    }
    UserSetCommandEntry userSetCommandEntry = (UserSetCommandEntry)commandEntry;
    checkAccessRights(req, userSetCommandEntry.getGroup());
    commandEntryManager.evict(userSetCommandEntry)// do not modify in this session yet (might be erroneous)
   
    UserSetManager userSetManager = new UserSetManager(locale,session);
    UserSet userSet = f.getUserSetId() == -2 ? null : userSetManager.getUserSet(f.getUserSetId());
    if (f.getUserSetId() != -2
      && (userSet == null || userSet.getGroup() != userSetCommandEntry.getGroup())) {
      throw new InputException(getResources(req).getMessage(locale, "smssvc.selectedUserSetDoesNotExistAnymore"))// may have been deleted
    }
View Full Code Here

   */
  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    UserSetInteractionEnterOrEditForm f = (UserSetInteractionEnterOrEditForm) form;
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    UserSetManager userSetManager = new UserSetManager(locale,session);
    UserSet userSet = f.getUserSetId() == -2 ? null : userSetManager.getUserSet(f.getUserSetId());
    if (f.getUserSetId() != -2
      && (userSet == null || userSet.getGroup() != group)) {
      throw new InputException(getResources(req).getMessage(locale, "smssvc.selectedUserSetDoesNotExistAnymore"))// may have been deleted
    }
    UserSetCommandEntry userSetCommandEntry = new UserSetCommandEntry();
View Full Code Here

    return mapping.findForward("created");
  }
 
  // set user set operand according to form
  private void setUserSetOperand(UserSetCommandEntry userSetCommandEntry, UserSetInteractionEnterOrEditForm form) {
    UserSetManager userSetManager = new UserSetManager(locale,session);   
    UserSet userSetOperand;
    switch (form.getCommandType()) {
    case 6:
      userSetOperand = form.getAssignUserSetId() == -2 ? null : userSetManager.getUserSet(form.getAssignUserSetId());
      userSetCommandEntry.setUserSetOperand(userSetOperand);
      userSetCommandEntry.setCurrentUserSetAsOperand(form.getAssignUserSetId() == -2 ? 1 : 0);
      break;
    case 7:
      userSetOperand = form.getReplaceWithUserSetId() == -2 ? null : userSetManager.getUserSet(form.getReplaceWithUserSetId());
      userSetCommandEntry.setUserSetOperand(userSetOperand);
      userSetCommandEntry.setCurrentUserSetAsOperand(form.getReplaceWithUserSetId() == -2 ? 1 : 0);
      break;
    case 8:
      userSetOperand = form.getRemoveUserSetId() == -2 ? null : userSetManager.getUserSet(form.getRemoveUserSetId());
      userSetCommandEntry.setUserSetOperand(userSetOperand);
      userSetCommandEntry.setCurrentUserSetAsOperand(form.getRemoveUserSetId() == -2 ? 1 : 0);
      break;
    case 9:
      userSetOperand = form.getKeepSharedUserSetId() == -2 ? null : userSetManager.getUserSet(form.getKeepSharedUserSetId());
      userSetCommandEntry.setUserSetOperand(userSetOperand);
      userSetCommandEntry.setCurrentUserSetAsOperand(form.getKeepSharedUserSetId() == -2 ? 1 : 0);
      break;
    case 10:
      userSetOperand = form.getDrawFromUserSetId() == -2 ? null : userSetManager.getUserSet(form.getDrawFromUserSetId());
      userSetCommandEntry.setUserSetOperand(userSetOperand);
      userSetCommandEntry.setCurrentUserSetAsOperand(form.getDrawFromUserSetId() == -2 ? 1 : 0);
      if(form.getNofDrawings() != null && !form.getNofDrawings().equals("")){
        userSetCommandEntry.setNofUsers(Integer.parseInt(form.getNofDrawings()));
      } else {
View Full Code Here

TOP

Related Classes of evolaris.framework.um.business.UserSetManager

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.