Package evolaris.framework.um.datamodel

Examples of evolaris.framework.um.datamodel.UserSet


  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();
    userSetCommandEntry.setSortLabel(f.getSortLabel());
    userSetCommandEntry.setGroup(group);
View Full Code Here


  }
 
  // 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);
View Full Code Here

    UserSet[] userSetsOfTheGroup = userSetManager.getUserSets(group);
    UserSet[] displayedUserSets = new UserSet[userSetsOfTheGroup.length + 1];
    for (int i = 0; i < userSetsOfTheGroup.length; i++) {
      displayedUserSets[i+1] = userSetsOfTheGroup[i];
    }
    UserSet notSelectedUserSet = new UserSet();
    notSelectedUserSet.setId(-1L);
    String noneSelectedString = getResources(req).getMessage(locale,"smssvc.noUserSetSelected");
    notSelectedUserSet.setName("(" + noneSelectedString + ")");
    displayedUserSets[0] = notSelectedUserSet;
    req.getSession().setAttribute("userSets", displayedUserSets);
    UserSet userSet = notSelectedUserSet;  // none selected at the beginning
    Long selectedUserSetId = form.getRequestingUserSetId();
    if (selectedUserSetId != null && selectedUserSetId >= 1) {
      // check if the selected user set is assigned to the selected group
      UserSet selectedUserSet = userSetManager.getUserSet(selectedUserSetId);
      if (group.getUserSets().contains(selectedUserSet)) {
        userSet = selectedUserSet;
      }
    }
    form.setRequestingUserSetId(userSet.getId());
View Full Code Here

    String mode = req.getParameter("mode")// sms or email
    String groupName = req.getParameter("group");
    UserSetManager userSetMgr = new UserSetManager(locale, session);
    GroupManager groupMgr = new GroupManager(locale, session);
    Group group = groupMgr.getGroup(groupName);
    UserSet userSet = id != null && id > 0 ? userSetMgr.getUserSet(id) : null;

    // creation of user-list as of SmsSendAction
    Set<User> users = userSet == null ? group.getUsers() : userSet.getUsers();
    SortedSet userAddresses;
    if (mode.equals("sms")) {
      userAddresses = SmsDestinationAddress.smsDestinationAddresses(users);
    } else {
      userAddresses = EmailAddress.availableAddresses(users);
View Full Code Here

TOP

Related Classes of evolaris.framework.um.datamodel.UserSet

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.