Package edu.bellevue.its.migration.entities

Examples of edu.bellevue.its.migration.entities.Role


    private UpdateableFrame owner;
   
    public EditRoleFrame(UpdateableFrame frame) {
        initComponents();
        owner = frame;
        currentRole = new Role();
        this.title = "Create Role";
    }
View Full Code Here


    // End of variables declaration//GEN-END:variables

    @Override
    public void updateView() {
       
        Role securityRole = AppHelper.getRoleByName("Security");
        boolean isSecurityApprover = AppGlobals.getInstance().loggedInUser.getRoles().contains(securityRole);
        btnMarkApproved.setEnabled(isSecurityApprover);
       
        String techId = "[ NEW ]";
               
View Full Code Here

   
    public static Role getRoleByName(String role)
    {
        Session s = AppGlobals.getInstance().hibernateSession;
       
        Role aRole = (Role) s.createCriteria(Role.class).add(Restrictions.eq("roleName",role)).uniqueResult();
        return aRole;
    }
View Full Code Here

        return aUser;
    }

    public static boolean userHasRole( String rolename)
    {
        Role r = AppHelper.getRoleByName(rolename);
        return (AppGlobals.getInstance().loggedInUser.getRoles().contains(r));
    }
View Full Code Here

    public boolean userHasRole(User u, Role r)
    {
        Iterator<Role> roles = u.getRoles().iterator();
        while (roles.hasNext())
        {
            Role nextRole = roles.next();
            if (nextRole.equals(r))
            {
                return true;
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of edu.bellevue.its.migration.entities.Role

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.