Package evolaris.framework.um.datamodel

Examples of evolaris.framework.um.datamodel.Group


   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    HttpInteractionEnterOrEditForm f = (HttpInteractionEnterOrEditForm)form;
    f.setSortLabel(sortLabelProposalFromSession(req));
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    req.getSession().setAttribute("templates",getSortedCommandEntries(req));
    return mapping.findForward("enter");
View Full Code Here


    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")) {
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
   
    HttpCommandEntry commandEntry = new HttpCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    commandEntry.setSortLabel(f.getSortLabel());
    commandEntry.setUrl(f.getUrl());
    commandEntry.setNofEvaluatedResponseLetters(Integer.parseInt(f.getNofEvaluatedResponseLetters()));
View Full Code Here

   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    BlogInteractionEnterOrEditForm f = (BlogInteractionEnterOrEditForm)form;
    f.setSortLabel(sortLabelProposalFromSession(req));
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    List<Blog> blogList = getBlogList(group);
    f.setTitle("${subject}");
    f.setContent("${attachment}<br />${content}");
    req.getSession().setAttribute("blogList", blogList);
View Full Code Here

    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")) {
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
   
    BlogCommandEntry commandEntry = new BlogCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    if (f.getBlogId() > 0) {
      BlogManager blogMgr = new BlogManager(locale, session);
      Blog blog = blogMgr.getBlog(f.getBlogId());
View Full Code Here

  /**
   * view a list of articles
   */ 
  protected ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    String labelParam;
    Group group = getGroupParam(req);
    try {
      labelParam = new String(req.getParameter("label").getBytes(), "UTF-8");
    } catch (UnsupportedEncodingException e1) {
      throw new BugException(e1.getMessage());
    }
View Full Code Here

    newFwd.setPath(fwd.getPath()+"&id="+id);
    return newFwd;   
  }
 
  private Group getGroupParam(HttpServletRequest req) {
    Group group = null;
    String groupParam;
    GroupManager groupMgr = new GroupManager(locale, session);
    if (req.getParameter("group") != null) {
      try {
        groupParam = new String(req.getParameter("group").getBytes(), "UTF-8");
        group = groupMgr.getGroup(groupParam);
        if (group == null) {
          group = webUser != null ? webUser.getGroup() : null;
        }
      } catch (UnsupportedEncodingException e) {
        LOGGER.error(e);
      }
    } else {
      groupParam = (String)req.getSession().getAttribute("restrictBlogsToGroup");
      if (groupParam != null) {
        group = groupMgr.getGroup(groupParam);
      }
    }
    req.getSession().setAttribute("restrictBlogsToGroup", group != null ? group.getGroupname() : null);
    return group;
  }
View Full Code Here

  /**
   * view a list of blogs
   */ 
  protected ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    BlogManager blogMgr = new BlogManager(locale, session);
    Group group = getGroupParam(req);
    List<Blog> blogs = blogMgr.getBlogs(webUser, group);
    List<DisplayableBlog> entries = new ArrayList<DisplayableBlog>();
    for (Blog b : blogs) {
      DisplayableBlog e = new DisplayableBlog(b.getId(), b.getName(), b.getDescription());
      entries.add(e);
View Full Code Here

   * view tag cloud for all blogs
   * TODO only get Labels for blogs, the user is allowed to see
   */
  protected ActionForward cloud(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    BlogManager blogMgr = new BlogManager(locale, session);
    Group group = getGroupParam(req);
    req.setAttribute("labelCloud", blogMgr.getLabelCloud(null, webUser, group, Integer.MAX_VALUE))// get all labels
    return mapping.findForward("cloud");
  }
View Full Code Here

    newFwd.setPath(fwd.getPath()+"&id="+id);
    return newFwd;   
  }
 
  private Group getGroupParam(HttpServletRequest req) {
    Group group = null;
    String groupParam;
    GroupManager groupMgr = new GroupManager(locale, session);
    if (req.getParameter("group") != null) {
      try {
        groupParam = new String(req.getParameter("group").getBytes(), "UTF-8");
        group = groupMgr.getGroup(groupParam);
        if (group == null) {
          group = webUser != null ? webUser.getGroup() : null;
        }
      } catch (UnsupportedEncodingException e) {
        LOGGER.error(e);
      }
    } else {
      groupParam = (String)req.getSession().getAttribute("restrictBlogsToGroup");
      if (groupParam != null) {
        group = groupMgr.getGroup(groupParam);
      }
    }
    req.getSession().setAttribute("restrictBlogsToGroup", group != null ? group.getGroupname() : null);
    return group;
  }
View Full Code Here

   * The test fails if less than 1 user will be fetched for administrator group
   */
  public void testGetUsersOfGroup(){
    UserManager usrMng = new UserManager(Locale.GERMAN,session);
    GroupManager groupMgm = new GroupManager(Locale.GERMAN,session);
    Group group = groupMgm.getGroup("administrator");
    User[] users = usrMng.getUsers(group,false);
    assertTrue(users.length > 0);
  }
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.