Package evolaris.framework.um.datamodel

Examples of evolaris.framework.um.datamodel.Group


    UserEnterOrEditForm f = (UserEnterOrEditForm)form;
    ActionForward actionForward = super.enter(mapping, form, req, resp);
    UserManager userManager = new UserManager(locale,session);
    Role userRole = userManager.getRole(UserManagerBase.USER);
    f.setSelectedRoleIds(new String[]{userRole.getId()+""});
    Group currentGroup = getCurrentGroup(req);
    prepareSessionContext(req,currentGroup,false);
    return actionForward;
  }
View Full Code Here


    UserEnterOrEditForm f = (UserEnterOrEditForm)form;
    if (f.getId() == -1){  // personal data
      f.setId(webUser.getId());
    }
    ActionForward actionForward = super.edit(mapping, f, req, resp);
    Group group = groupFromId(f.getGroupId());
    checkAccessRights(req, groupFromId(f.getGroupId()));
    prepareSessionContext(req,group, f.getId().longValue()  == webUser.getId());
   
    return actionForward;
  }
View Full Code Here

   * @see evolaris.framework.sys.web.action.EnterEditDuplicateAction#modify(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  @Override
  public ActionForward modify(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    UserEnterOrEditForm f = (UserEnterOrEditForm)form;
    Group group = groupFromId(f.getGroupId());
    checkAccessRights(req, group);
    if (f.getId().longValue() == webUser.getId()){  // restore disabled roles
      Set<Role>roles = webUser.getRoles();
      String roleIds[] = new String[roles.size()];
      int i = 0;
View Full Code Here

   */
  @Override
  protected ActionForward reedit(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    ActionForward actionForward =  super.reedit(mapping, form, req, resp);
    UserEnterOrEditForm f = (UserEnterOrEditForm)form;
    Group group = groupFromId(f.getGroupId());
    checkAccessRights(req, group);
    String originalUsername = f.getUsername();
    if (originalUsername != null && originalUsername.length() >= 1){
      f.setUsername(originalUsername + "_" + getResources(req).getMessage(locale, "um.copied"));
    } else {
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)
   */
  protected ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp){
    req.getSession().setAttribute("task", "create");
    EnterEditDuplicateForm f = (EnterEditDuplicateForm)form;
    Group group = groupPreparation(req, f.getGroupId());
    f.setGroupId(group.getId());
    Application application = applicationPreparation(req, group, f.getApplicationId());
    f.setApplicationId(application.getId());
    return mapping.findForward("continue");
  }
View Full Code Here

    req.getSession().setAttribute("groups", groups);
   
    if (groupId == null || groupId < 1){
      return this.getCurrentGroup(req);
    }
    Group group = groupFromId(groupId);
    checkAccessRights(req, group, null);
    return group;
  }
View Full Code Here

   * @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

    ET entry = entryFromDatabase(f.getId());
    if (entry == null){
      throw new InputException(getLocalizedMessage("SystemWeb", "sys.entryNotAvailable"),"id = " + f.getId(),null,null);
    }
    f.initialize(entry,locale,session,getResources(req));
    Group group = groupPreparation(req, f.getGroupId());
    f.setGroupId(group.getId());
    Application application = applicationPreparation(req, group, f.getApplicationId());
    f.setApplicationId(application.getId());
    return mapping.findForward("continue");
  }
View Full Code Here

   *      javax.servlet.http.HttpServletResponse)
   */
  @SuppressWarnings("unchecked")
  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    EnterEditDuplicateForm<ET> f = (EnterEditDuplicateForm <ET>)form;
    Group group = groupFromId(f.getGroupId());
    ET entry = f.toEntry(null, locale, session, getResources(req));
    checkAccessRights(req, group, entry);
    f.createEntry(entry, locale, session);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": created new entry of class " + entry.getClass().getSimpleName());
    setCurrentGroup(req, resp, group); // switch group in global group selection   
View Full Code Here

      throw new InputException(getLocalizedMessage("SystemWeb", "sys.entryNotAvailable"));
    }
    f.toEntry(entry, locale, session, getResources(req));
    f.modifyEntry(entry, locale, session);
    f.initialize(entry, locale, session, getResources(req))// check access rights with actually written data
    Group group = groupFromId(f.getGroupId());
    checkAccessRights(req, group, entry);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": modified existing entry #"+ f.getId() + " of class " + entry.getClass().getSimpleName());
    setCurrentGroup(req, resp, group); // switch group in global group selection   
    return mapping.findForward("modified");
  }
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.