Package evolaris.framework.um.datamodel

Examples of evolaris.framework.um.datamodel.Group


   * This method is used to fetch a list of groups and forward them to the view component
   *
   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    Group groupToDisplay = this.getCurrentGroup(req);
    UserSetManager userSetMgm = new UserSetManager(locale,session);
    UserSet[] userSets = userSetMgm.getUserSets(groupToDisplay);
    List<UserSetListEntry> userSetList = new LinkedList<UserSetListEntry>();
    for (int i = 0; i < userSets.length; i++) {
      UserSet set = userSets[i];
View Full Code Here


    if (!userSet.getGroup().equals(getCurrentGroup(req))) {
      // due to global group selection, userset should be in current group
      throw new InputException(getResources(req).getMessage("um.userSetNotInCurrentGroup"));
    }
    checkAccessRights(req, userSet.getGroup());
    Group currentGroup = getCurrentGroup(req);
   
    // fetch the list of users
    int pageNumber = 1; // default page size
    if(req.getParameter("page") != null){
      pageNumber = Integer.parseInt(req.getParameter("page"));
View Full Code Here

    if (user == null){
      user = new User();
    }
    user.setId(f.getId());
    GroupManager groupManager = new GroupManager(locale, session);
    Group group = groupManager.getGroup(f.getGroupId());
    user.setGroup(group);
    String username = f.getUsername();
    user.setUsername(username.length() == 0?null:username)// empty input means: no username
     if (f.getPassword().replaceAll("\\*", " ").trim().length() != 0){  // do not change existing (encoded) password if user did not edit the asterisks
       user.setPassword(f.getPassword().length() == 0 ? null : f.getPassword())// will be encoded during creation/modification
View Full Code Here

        try {
          Object messageObject = oMessage.getObject();
          if(messageObject instanceof ReceivedMessage) {
            ReceivedMessage incomingMessage = (ReceivedMessage)messageObject;
            Invocation invocation = incomingMessage.getInvocation();
            Group group = invocation.getGroup()// group and group.clientProject must have been initialized (no lazy Hibernate loading possible here)
            Session session = HibernateSessions.startTransaction(getClass(),group.getId(),group.getClientProject().getHibernateConfigurationFile());
            try {
              session.load(invocation,invocation.getId())// reload because from different session; this may actually fail if the invocation entry was deleted

              UserManager userManager = new UserManager(Locale.GERMAN,session);
              User user;
View Full Code Here

    UserSet originalUserSet = userSetManager.getUserSet(originalUserSetId);
    if (originalUserSet == null){
      throw new InputException(getResources(req).getMessage(locale, "um.userSetNotFound",  originalUserSetId));
    }
    checkAccessRights(req, originalUserSet.getGroup());
    Group group = new GroupManager(locale,session).getGroup(userSetEnterOrEditForm.getGroupId());
    boolean differentGroup = group != originalUserSet.getGroup();
    if (includeUserAssignments && differentGroup && !userSetEnterOrEditForm.isConfirmationPending() && originalUserSet.getUsers().size() >= 1){
      userSetEnterOrEditForm.setConfirmationPending(true);
      String reallyDuplicate1 = getResources(req).getMessage(locale,"um.reallyDuplicate1");
      String reallyDuplicate2 = getResources(req).getMessage(locale,"um.reallyDuplicate2");
View Full Code Here

      userSetEnterOrEditForm.setOriginalId(id);
      userSetEnterOrEditForm.setId(id);
      userSetEnterOrEditForm.setDescription(userSet.getDescription());
      userSetEnterOrEditForm.setHidden(userSet.getHidden()==1?true:false);
      userSetEnterOrEditForm.setUserSetName(req.isUserInRole(UserManagerBase.ADMINISTRATOR) ? userSet.getName() :  getResources(req).getMessage(locale, "um.Copy") + ": " + userSet.getName());
      Group group = userSet.getGroup();
      userSetEnterOrEditForm.setGroupId(group.getId());
      userSetEnterOrEditForm.setGroupname(group.getGroupname());
      Group[] groups = groupManager.getGroups();
      req.getSession().setAttribute("groups", groups)// must be in session, because the form may be redisplayed on validation errors
    }
    return mapping.findForward("edit");
  }
View Full Code Here

      blog = blogMgr.getBlog(Long.parseLong(idParam));
    } else if (codeParam != null && groupParam != null) {
      try {
        long groupId = Long.parseLong(groupParam);
        GroupManager groupMgr = new GroupManager(locale, session);
        Group group = groupMgr.getGroup(groupId);
        blog = blogMgr.getBlog(codeParam, group);
      } catch (Exception e) {
        blog = null;
      }
    } else {
View Full Code Here

      blog = blogMgr.getBlog(Long.parseLong(idParam));
    } else if (codeParam != null && groupParam != null) {
      try {
        long groupId = Long.parseLong(groupParam);
        GroupManager groupMgr = new GroupManager(locale, session);
        Group group = groupMgr.getGroup(groupId);
        blog = blogMgr.getBlog(codeParam, group);
      } catch (Exception e) {
        blog = null;
      }
    }
View Full Code Here

      blog = blogMgr.getBlog(Long.parseLong(idParam));
    } else if (codeParam != null && groupParam != null) {
      try {
        long groupId = Long.parseLong(groupParam);
        GroupManager groupMgr = new GroupManager(locale, session);
        Group group = groupMgr.getGroup(groupId);
        blog = blogMgr.getBlog(codeParam, group);
      } catch (Exception e) {
        blog = null;
      }
    }
View Full Code Here

   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    DynaActionForm userListForm = (DynaActionForm) form;
    String filterString = userListForm.getString("filterString");
    Group groupToDisplay = this.getCurrentGroup(req);
   
    // fetch the list of users
    int pageNumber = 1; // default page size
    if(req.getParameter("page") != null){
      pageNumber = Integer.parseInt(req.getParameter("page"));
View Full Code Here

TOP

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

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.