Package org.sete.vo.admin

Examples of org.sete.vo.admin.RolePrivilegeVo


        final String[] readAllowedPrivs = new String[selectedRole.getUserRolePrivileges().size()];
        final Map selPrivMap = new HashMap();
        {
            for(int i = 0; i < selectedRole.getUserRolePrivileges().size(); i++)
            {
                final RolePrivilegeVo rpvo = selectedRole.getUserRolePrivileges().get(i);
                selPrivs[i] = rpvo.getUserRolePrivilege();
                selPrivMap.put(rpvo.getUserRolePrivilege(), "true");
               
                if(PrivilegeActionType.Key.READ_WRITE_KEY.equals(rpvo.getPrivilegeActions())) {
                    writeAllowedPrivs[i] = rpvo.getUserRolePrivilege();
                }
               
                //always read allowed
                readAllowedPrivs[i] = rpvo.getUserRolePrivilege();
            }
        }
       
            //now set them in the form
        ((ModifyRoleForm)form).setUserRolePrivileges( selPrivs );
View Full Code Here


            urvo.setUserRole( ((ModifyRoleForm)form).getUserRole() );
           
            final List<RolePrivilegeVo> rolePrivList = new ArrayList<RolePrivilegeVo>();
            for(final String assignedPrivKey: ((ModifyRoleForm)form).getUserRolePrivileges())
            {
               final RolePrivilegeVo rpvo = new RolePrivilegeVo();
               rpvo.setUserRolePrivilege( assignedPrivKey );
              
               boolean writeAllowed = false;
               for(final String writeAllowedPrivKey: ((ModifyRoleForm)form).getPrivilegesWithWriteAllowed())
               {
                   if( assignedPrivKey.equals(writeAllowedPrivKey) )
                   {
                       writeAllowed = true;
                       break;
                   }
               }
              
               rpvo.setPrivilegeActions( writeAllowed ? PrivilegeActionType.Key.READ_WRITE_KEY.getKey() : PrivilegeActionType.Key.READ_KEY.getKey());
              
               rolePrivList.add( rpvo );
            }
           
            urvo.setUserRolePrivileges(rolePrivList);
View Full Code Here

                // do role privileges
            final List<RolePrivilegeVo> rolePrivs = new ArrayList<RolePrivilegeVo>();
            for(UserPrivilege up: urp.getUserPrivileges())
            {
                final RolePrivilegeVo rpvo = new RolePrivilegeVo();
                rpvo.setUserRolePrivilege(up.getUserPrivilegeType().getKey());
                rpvo.setPrivilegeActions(up.getPrivilegeActionType().getKey());
                rolePrivs.add(rpvo);
            }

            uro.setUserRolePrivileges(rolePrivs);
View Full Code Here

                urVo.setUserRole( "student" );
                urVo.setUserRoleLabel( "Student" );
               
                final List<RolePrivilegeVo> privs = new ArrayList<RolePrivilegeVo>(1);
                {
                    final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                    rpVo.setUserRolePrivilege("projIdea");
                    rpVo.setPrivilegeActions("rw");
                   
                    privs.add(rpVo);
                }
                urVo.setUserRolePrivileges( privs );
            }       
View Full Code Here

                urVo.setUserRoleLabel( "Student" );
               
                final List<RolePrivilegeVo> privs = new ArrayList<RolePrivilegeVo>(1);
                //add first privilege, with r/w action
                {
                    final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                    rpVo.setUserRolePrivilege("projIdea");
                    rpVo.setPrivilegeActions("rw");
                   
                    privs.add(rpVo);
                }
                //add second privilege, with r/o action
                {
                    final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                    rpVo.setUserRolePrivilege("projDoc");
                    rpVo.setPrivilegeActions("r");
                   
                    privs.add(rpVo);
                }
               
                urVo.setUserRolePrivileges( privs );
View Full Code Here

                urVo.setUserRole( "student" );
                urVo.setUserRoleLabel( "Student" );
               
                final List<RolePrivilegeVo> privs = new ArrayList<RolePrivilegeVo>(1);
                {
                    final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                    rpVo.setUserRolePrivilege("projIdea");
                    rpVo.setPrivilegeActions("rw");
                   
                    privs.add(rpVo);
                }
                urVo.setUserRolePrivileges( privs );
            }       
View Full Code Here

        final UserRoleVo urVo = new UserRoleVo();
        {
            urVo.setUserRole("student");
            final ArrayList<RolePrivilegeVo> rolePrivVos = new ArrayList<RolePrivilegeVo>(1);
            {
                final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                rpVo.setUserRolePrivilege("projIdea");
                rpVo.setPrivilegeActions("rw");
               
                rolePrivVos.add(rpVo);
            }
            urVo.setUserRolePrivileges( rolePrivVos );
        }
View Full Code Here

        {
            urVo.setUserRole("student");
            final ArrayList<RolePrivilegeVo> rolePrivVos = new ArrayList<RolePrivilegeVo>(1);
            //put the r/w one
            {
                final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                rpVo.setUserRolePrivilege("projIdea");
                rpVo.setPrivilegeActions("rw");
               
                rolePrivVos.add(rpVo);
            }
            //put the r/o one
            {
                final RolePrivilegeVo rpVo = new RolePrivilegeVo();
                rpVo.setUserRolePrivilege("projDoc");
                rpVo.setPrivilegeActions("r");
               
                rolePrivVos.add(rpVo);
            }
            urVo.setUserRolePrivileges( rolePrivVos );
        }
View Full Code Here

TOP

Related Classes of org.sete.vo.admin.RolePrivilegeVo

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.