Package org.apache.jetspeed.om.security

Examples of org.apache.jetspeed.om.security.Role


    private String locatorToString(ProfileLocator locator)
    {
        StringBuffer keybuf = new StringBuffer();

        JetspeedUser user = locator.getUser();
        Role role = locator.getRole();
        Group group = locator.getGroup();
        String name = locator.getName();
        String mediaType = locator.getMediaType();
        String country = locator.getCountry();
        String language = locator.getLanguage();

       synchronized (this)
       {
            if (user != null)
            {
                keybuf.append("User:").append(user.getUserName());
           }
            else if (group != null)
            {
                keybuf.append("Group:").append(group.getName());
            }
            else if (role != null)
            {
                keybuf.append("Role:").append(role.getName());
            }

            if (name != null)
            {
                keybuf.append('$').append("Page:").append(name);
View Full Code Here


            Log.warn("DatabasePsmlManagerService.createOrSaveDocument: " + message);
            throw new IllegalArgumentException(message);
        }

        JetspeedUser user = profile.getUser();
        Role role = profile.getRole();
        Group group = profile.getGroup();
        String tableName = null;

        Connection dbCon = getDbConnection();
View Full Code Here

            Log.warn("DatabasePsmlManagerService.removeDocument: " + message);
            throw new IllegalArgumentException(message);
        }

        JetspeedUser user = locator.getUser();
        Role role = locator.getRole();
        Group group = locator.getGroup();
        String tableName = null;

        // get a database connection
        Connection dbCon = getDbConnection();
View Full Code Here

            Log.warn("DatabasePsmlManagerService.refresh: " + message);
            throw new IllegalArgumentException(message);
        }

        JetspeedUser user = locator.getUser();
        Role role = locator.getRole();
        Group group = locator.getGroup();
        String tableName = null;
        List records = null;
        Portlets portlets = null;
        PSMLDocument psmldoc = null;
View Full Code Here

    public Profile createRoleProfile(JetspeedRoleProfile entity, Portlets portlets)
    {
        Profile profile = Profiler.createProfile();
        try
        {
            Role role = JetspeedSecurity.getRole(entity.getRoleName());
            if (null == role)
            {
                role = JetspeedRoleFactory.getInstance();
                role.setName(entity.getRoleName());
            }
            profile.setRole(role);
            profile.setMediaType(entity.getMediaType());
            profile.setLanguage(entity.getLanguage());
            profile.setCountry(entity.getCountry());
View Full Code Here

        try
        {
            Iterator roles = JetspeedSecurity.getRoles();
            while (roles.hasNext())
            {
                Role role = (Role)roles.next();
                Map map = new HashMap();
                Iterator prms = JetspeedSecurity.getPermissions(role.getName());
                while (prms.hasNext())
                {
                    Permission perm = (Permission)prms.next();
                    map.put(perm.getName(), perm);
                }
                perms.put(role.getName(), map);
            }
        }
        catch (JetspeedSecurityException e)
        {
            Log.error(e);
View Full Code Here

                    if (roles != null)
                    {
                        while (roles.hasNext())
                        {
                            // note: this is an unordered list. will need to change db schema to order it
                            Role role = (Role)roles.next();
                            rundata.getParameters().setString( Profiler.PARAM_ROLE, role.getName() );
                            profile = fallbackProfile(rundata, cm);
                            if (profile != null)
                            {
                                profiles.add(profile);
                            }
View Full Code Here

            {
                uri.addPathInfo(Profiler.PARAM_GROUP, group.getName());
            }
            else
            {
                Role role = locator.getRole();
                if (null != role)
                {
                    uri.addPathInfo(Profiler.PARAM_ROLE, role.getName());
                }
            }
        }

        // check Page to add to the uri
View Full Code Here

    public void setRoleByName( String roleName )
    {
        try
        {
            Role temp = JetspeedSecurity.getRole(roleName);
            if (null != temp)
            {
                role = temp;
            }
        }
View Full Code Here

            String name = locator.getName();
            String mediaType = locator.getMediaType();
            String language = locator.getLanguage();
            String country = locator.getCountry();
            Group group = locator.getGroup();
            Role role = locator.getRole();

            return nameEquals(name)
//                   && locator.getId() == id
                   && mediaTypeEquals(mediaType)
                   && languageEquals(language)
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.security.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.