Package org.sete.vo.common

Examples of org.sete.vo.common.SideMenuVo


    public void execute(ComponentContext componentCtx,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletCtx) throws Exception {

        SideMenuVo menuPrivVo = new SideMenuVo();
        AuthenticatedUserVo userVo =
                            (AuthenticatedUserVo)request.getSession().getAttribute(WebConstants.AUTH_USER);

//        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();
//        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_IDEA_KEY));
View Full Code Here


    public void execute(ComponentContext componentCtx,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletCtx) throws Exception {

        SideMenuVo menuPrivVo = new SideMenuVo();
        AuthenticatedUserVo userVo =
                            (AuthenticatedUserVo)request.getSession().getAttribute(WebConstants.AUTH_USER);

        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_IDEA_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setCreateProjectIdeaVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewProjectsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setViewCreateProjectVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_DOC_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setUploadDocumentsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewMyProjectVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.JUDGE_SCHEDULE_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewJudgeScheduleVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_SCORE_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setSubmitJudgingResultsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_SCORE_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewJudgingResultsReportVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_SPONSOR_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewSponsoredProjectsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.PROJECT_SPONSOR_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setSponsorProjectsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.SETE_USER_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ));

        menuPrivVo.setViewUsersVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, UserPrivilegeType.SETE_USER_KEY));
        userPrivVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class, PrivilegeActionType.READ_WRITE));

        menuPrivVo.setCreateUsersVisible(userVo.hasPrivilege(userPrivVo));

      
        /* etc etc */
        request.setAttribute(WebConstants.SIDE_MENU_VO, menuPrivVo);
    }
View Full Code Here

    public void execute(ComponentContext componentCtx,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletCtx) throws Exception {

        SideMenuVo menuPrivVo = new SideMenuVo();
        AuthenticatedUserVo userVo =
                            (AuthenticatedUserVo)request.getSession().getAttribute(WebConstants.AUTH_USER);

        setProjectIdeasMenuPrivileges(menuPrivVo, userVo);
        setJudgeMenuPrivileges(menuPrivVo, userVo);
View Full Code Here

    public void execute(ComponentContext componentCtx,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletCtx) throws Exception {

        SideMenuVo menuPrivVo = new SideMenuVo();
        AuthenticatedUserVo userVo =
                            (AuthenticatedUserVo)request.getSession().getAttribute(WebConstants.AUTH_USER);

        setProjectIdeasMenuPrivileges(menuPrivVo, userVo);
        setJudgeMenuPrivileges(menuPrivVo, userVo);
View Full Code Here

TOP

Related Classes of org.sete.vo.common.SideMenuVo

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.