Package evolaris.framework.um.business

Examples of evolaris.framework.um.business.UserSetManager


      timerEvent.setRequestingUserSet(null);
    } else {
      if (f.getApplyToSelection() != 2) { // user set
        throw new BugException("invalid apply-to flag: " + f.getApplyToSelection());
      }
      UserSetManager userSetManager = new UserSetManager(locale,session);
      timerEvent.setRequestingUser(null);
      UserSet requestingUserSet = userSetManager.getUserSet(f.getRequestingUserSetId());
      if (requestingUserSet == null){
        throw new InputException(resources.getMessage(locale,"smssvc.AnEntryNotAvailable"));
      }
      timerEvent.setRequestingUserSet(requestingUserSet);
    }
View Full Code Here


        selectableUsers.add(new SelectableUser(user.getId(),userManager.selectionDescription(user)));
      }
    }
    req.setAttribute("selectableUsers", selectableUsers);
   
    UserSetManager userSetManager = new UserSetManager(locale,session);
    req.setAttribute("selectableUserSets", userSetManager.getUserSets(destinationGroup));
   
    Set<Sender> senders = destinationGroup.getSmsSenders();
    for (Sender sender : senders) {  // fill cache
      sender.getMsisdn();
      sender.getGatewayProvider();
View Full Code Here

      }
    }
   
    // user sets
   
    UserSetManager userSetManager = new UserSetManager(locale,session);
    long[] sourceUserSetIds = f.getSourceUserSetIds();
    if (sourceUserSetIds != null){
      long[] selectedUserSetIds = f.getSelectedUserSetIds();
      for (int i = 0; i < sourceUserSetIds.length; i++){
        long sourceUserSetId = sourceUserSetIds[i];
        UserSet sourceUserSet = userSetManager.getUserSet(sourceUserSetId);
        if (sourceUserSet == null){
          throw new InputException(getResources(req).getMessage(locale, "smssvc.SourceUserSetNotAvailableAnymore"),"user set #" + sourceUserSetId + " not found",null,null);
        }
        checkAccessRights(req,sourceUserSet.getGroup());
        long selectedUserSetId = selectedUserSetIds[i];
        if (selectedUserSetId >= 1){  // mapping entry => assign; no entry => create
          UserSet selectedUserSet = userSetManager.getUserSet(selectedUserSetId);
          if (selectedUserSet == null){
            throw new InputException(getResources(req).getMessage(locale, "smssvc.SelectedUserSetNotAvaliableAnymore"),"user set #" + selectedUserSetId + " not found",null,null);
          }
          checkAccessRights(req,selectedUserSet.getGroup());
          mappingSet.add(new Entry(sourceUserSet), new Entry(selectedUserSet));
View Full Code Here

    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
    entry.setSortLabel(f.getSortLabel());

    UserSetManager userSetManager = new UserSetManager(locale, session);
    Set<UserSet> userSets = new HashSet<UserSet>();
    if (selectedUserSetIds != null) {
      for (String selectedUserSetId : selectedUserSetIds) {
        UserSet userSet = userSetManager.getUserSet(Long.parseLong(selectedUserSetId));
        if (userSet == null) {
          throw new BugException("illegal user set id `"+selectedUserSetId + "`");
        }
        userSets.add(userSet);
      }
View Full Code Here

   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    IterateInteractionEnterOrEditForm f = (IterateInteractionEnterOrEditForm)form;
    f.setSortLabel(sortLabelProposalFromSession(req));
    UserSetManager userSetManager = new UserSetManager(locale,session);
    req.getSession().setAttribute("userSets", userSetManager.getUserSets(groupFromSession(req)));
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("enter");
  }
View Full Code Here

    if(commandEntry == null){
      throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
    }
    checkAccessRights(req, commandEntry.getGroup());
    iterateForm.initialize(commandEntry, locale, session, getResources(req));
    UserSetManager userSetManager = new UserSetManager(locale,session);
    req.getSession().setAttribute("userSets", userSetManager.getUserSets(commandEntry.getGroup()));
    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("edit");
  }
View Full Code Here

   * @param sendForm
   * @param group  group whose user sets shall be considered
   * @return selected user set; null => none selected
   */
  protected UserSet prepareUserSets(HttpServletRequest req, F sendForm, Group group) {
    UserSetManager userSetManager = new UserSetManager(locale,session);
    UserSet[] userSetsOfTheGroup = userSetManager.getUserSets(group,false);
    req.getSession().setAttribute("userSets", userSetsOfTheGroup);
   
    Long selectedUserSetId = sendForm.getUserSetId();
    if (selectedUserSetId == null || selectedUserSetId <= 0){
      return null;
    }
    UserSet userSet = userSetManager.getUserSet(selectedUserSetId);
    if (userSet.getGroup() != group){
      sendForm.setUserSetId(-1L);
      return null;
    }
    return userSet;
View Full Code Here

   * @param sendForm
   * @param group  group whose user sets shall be considered
   * @return selected user set; null => none selected
   */
  protected UserSet prepareUserSets(HttpServletRequest req, F sendForm, Group group) {
    UserSetManager userSetManager = new UserSetManager(locale,session);
    UserSet[] userSetsOfTheGroup = userSetManager.getUserSets(group,false);
    req.getSession().setAttribute("userSets", userSetsOfTheGroup);
   
    Long selectedUserSetId = sendForm.getUserSetId();
    if (selectedUserSetId == null || selectedUserSetId <= 0){
      return null;
    }
    UserSet userSet = userSetManager.getUserSet(selectedUserSetId);
    if (userSet.getGroup() != group){
      sendForm.setUserSetId(-1L);
      return null;
    }
    return userSet;
View Full Code Here

    if(userImportForm.getDelimiter() == null){
      userImportForm.setDelimiter(DEFAULT_DELIMITER);
    }
   
    Hibernate.initialize(groupToDisplay); // used to fetch  the data from db
    UserSetManager userSetMgm = new UserSetManager(locale,session);
    UserSet[] userSets = userSetMgm.getUserSets(groupToDisplay,false);
    MessageResources resources = getResources(req);
   
 
    UserSet[] extendesUserSets = new  UserSet[userSets.length+1];
   
View Full Code Here

    super.setUp();
    session = HibernateSessions.startTransaction(this.getClass());
    mgr = new PermissionManager(Locale.getDefault(), session);
   
    UserManager umgr = new UserManager(Locale.getDefault(), session);
    UserSetManager usmgr = new UserSetManager(Locale.getDefault(), session);;
    adminUser = umgr.getUserDetails("rbra");
    userUser = umgr.getUserDetails("heic");
    userOfOtherGroup = umgr.getUserDetails("administrator");

    adminRole = umgr.getRole("administrator");
    userRole = umgr.getRole("user");
   
    javaDevelopers = usmgr.getUserSet(1L)// adminUser is member, userUser is not
   
    testObject = new Blog();
    testObject.setName("test");
    testObject.setGroup(adminUser.getGroup());
    session.save(testObject);
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.