Package evolaris.framework.sys.business

Examples of evolaris.framework.sys.business.GroupManager


    this.locale = locale;
    this.session = session;
  }
 
  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


        groupname = (String)req.getSession().getAttribute("sysCurrentGroupName");
      } else {
        req.getSession().setAttribute("sysCurrentGroupName", groupname);
      }
      if (groupname != null) {
        GroupManager groupMgr = new GroupManager(locale, session);
        group = groupMgr.getGroup(groupname);
        if (group == null) {
          group = webUser.getGroup();
        }
      } else {
        group = webUser.getGroup();
View Full Code Here

    }
    Group groups[] = null;
    Group groupToDisplay = null;
   
    if (UserManager.isUserInRole(webUser, UserManagerBase.ADMINISTRATOR)) {
      GroupManager groupMgm = new GroupManager(locale,session);
      Long selectedGroupId = userImportForm.getGroupId();
      if (selectedGroupId == null) {
        // set the group name of the administrator group
        groupToDisplay = webUser.getGroup();
      } else {
        groupToDisplay = groupMgm.getGroup(selectedGroupId);
      }
      // set an array of groups into the request
      groups = groupMgm.getGroups();
    } else if (UserManager.isUserInRole(webUser, UserManagerBase.GROUP_ADMINISTRATOR)) {
      // this is a security aspect - > group administartors can only display its own group
      groups = new Group[1];
      Group gr = webUser.getGroup();
      Hibernate.initialize(gr);
View Full Code Here

   *      org.apache.struts.action.ActionForm,
   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    req.getSession().setAttribute("groupList", new GroupManager(locale,session).getGroups());
    return mapping.findForward("enter");
  }
View Full Code Here

    Sender sender = senderManager.getSmsSenderByMsisdn(Long.parseLong(msisdnParam));
    if (sender == null) {
      throw new InputException(getResources(req).getMessage(locale, "admin.SenderNotFound",  msisdnParam));
    }
    senderToForm(sender, (SenderEnterOrEditForm)form);
    req.getSession().setAttribute("groupList", new GroupManager(locale,session).getGroups());     
    return mapping.findForward("edit");
  }
View Full Code Here

    sender.setThreeUnitedApplicationId(f.getThreeUnitedApplicationId());
    sender.setThreeUnitedAuthenticationKey(f.getThreeUnitedAuthenticationKey())
    sender.setMobilkomFreeInterfaceServiceName(f.getMobilkomFreeIFServiceName());
    Set<Group> groups = new HashSet<Group>();
    if (f.getSelectedGroupIds() != null) {
      GroupManager groupManager = new GroupManager(locale,session);
      for (String selectedGroupId : f.getSelectedGroupIds()) {
        Group group = groupManager.getGroup(Long.parseLong(selectedGroupId));
        if (group == null) {
          throw new BugException("illegal group id "+selectedGroupId)// must not happen because groups can not be deleted
        }
        groups.add(group);
      }
View Full Code Here

    req.getSession().setAttribute("webUser", webUser)/* in session for same reason as the menu */
    req.getSession().setAttribute("webUserGroup", group.getGroupname())/* for group-specific css; in session for same reason as the menu */
    req.getSession().setAttribute("webUserGroupClientProject", group.getClientProject().getName())/* for clientProject-specific css; in session for same reason as the menu */
   
    // put groups in session for group select box in menu
    GroupManager groupMgr = new GroupManager(locale, session);
    List<String> groups = new ArrayList<String>();
    for (Group g : groupMgr.getGroups()) {
      groups.add(g.getGroupname());
    }
    req.getSession().setAttribute("sysGroupNames", groups);
    req.getSession().setAttribute("sysCurrentGroupName", getCurrentGroup(req).getGroupname());
//    if (req.getSession().getAttribute("sysCurrentGroupName") == null) {
View Full Code Here

  }

  // retrieves group from group ID in form; returns web user group if none available; throws exception if insufficient access rights
  // also sets session attribute "groups" with groups according to access rights
  protected Group groupPreparation(HttpServletRequest req, Long groupId){
    GroupManager groupManager = new GroupManager(locale, session);
    Group[] groups;
    if (req.isUserInRole(UserManagerBase.ADMINISTRATOR)){
      groups = groupManager.getGroups();
    } else {
      groups = new Group[1];
      groups[0] = webUser.getGroup();
    }
    req.getSession().setAttribute("groups", groups);
View Full Code Here

   * @param groupId  ID of the group
   * @return  group object
   * @throws BugException if entry not found
   */
  protected Group groupFromId(long groupId) {
    GroupManager groupManager = new GroupManager(locale, session);
    Group group = groupManager.getGroup(groupId);
    if (group == null){
      throw new BugException("Group with ID " + groupId + " disappeared");
    }
    return group;
  }
View Full Code Here

      application = new Application();
    }
    application.setId(getId());
    application.setName(getName());
    application.setDescription(getDescription());
    GroupManager groupManager = new GroupManager(locale, session);
    Group group = groupManager.getGroup(getGroupId());
    application.setGroup(group);
    return application;
  }
View Full Code Here

TOP

Related Classes of evolaris.framework.sys.business.GroupManager

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.