Package org.jboss.seam.wiki.core.action.prefs

Examples of org.jboss.seam.wiki.core.action.prefs.UserManagementPreferences


        }
    }

    @Factory(value = "newUserDefaultRole", scope = ScopeType.SESSION)
    public Role getDefaultRole() {
        UserManagementPreferences userPrefs = Preferences.instance().get(UserManagementPreferences.class);
        try {
            return (Role) entityManager
                    .createQuery("select r from Role r where r.name = '"+userPrefs.getNewUserInRole()+"'")
                    .setHint("org.hibernate.cacheable", true)
                    .getSingleResult();
        } catch (NoResultException ex) {
            throw new RuntimeException("Configured default role for new users '"+userPrefs.getNewUserInRole()+"' not found");
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.action.prefs.UserManagementPreferences

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.