Package evolaris.framework.um.business

Examples of evolaris.framework.um.business.UserSetManager


  // retrieves user and user set from IDs in form; throws exception if insufficient access rights
  // also sets session attributes "users" and "userSets"
  private void requestingUserAndUserSetPreparation(TimerEventEnterOrEditForm form, Group group, HttpServletRequest req) {
 
    // user sets
    UserSetManager userSetManager = new UserSetManager(locale, session);
    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


 
  private ActionForward getUsersByUserset(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    Long id = Long.parseLong(req.getParameter("id"));
    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")) {
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.