Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.GroupPrincipal


    /**
     * @see org.apache.jetspeed.security.spi.GroupSecurityHandler#getGroupPrincipal(java.lang.String)
     */
    public Principal getGroupPrincipal(String groupFullPathName)
    {
        GroupPrincipal groupPrincipal = null;
        InternalGroupPrincipal internalGroup = commonQueries
                .getInternalGroupPrincipal(GroupPrincipalImpl
                        .getFullPathFromPrincipalName(groupFullPathName));
        if (null != internalGroup)
        {
View Full Code Here


        // Check if group already exists.
        if (groupExists(groupFullPathName)) { 
            throw new SecurityException(SecurityException.GROUP_ALREADY_EXISTS.create(groupFullPathName));
        }

        GroupPrincipal groupPrincipal = new GroupPrincipalImpl(
                groupFullPathName);
        String fullPath = groupPrincipal.getFullPath();
        // Add the preferences.
        Preferences preferences = Preferences.userRoot().node(fullPath);
        if (log.isDebugEnabled())
        {
            log.debug("Added group preferences node: " + fullPath);
View Full Code Here

     * @param groupFullPathName
     * @throws SecurityException
     */
    private void verifyGroupAndRoleExist(String groupFullPathName, String roleFullPathName) throws SecurityException
    {
        GroupPrincipal group = getGroup(groupFullPathName);
        RolePrincipal role = getRole(roleFullPathName);
        if ((null == group) && (null == role))
        {
            throw new SecurityException(SecurityException.ROLE_DOES_NOT_EXIST);
        }
View Full Code Here

     * @throws SecurityException
     */
    private void verifyUserAndGroupExist(String username, String groupFullPathName) throws SecurityException
    {
        UserPrincipal user = getUser(username);
        GroupPrincipal group = getGroup(groupFullPathName);
        if ((null == user) && (null == group))
        {
            throw new SecurityException(SecurityException.USER_DOES_NOT_EXIST);
        }
    }   
View Full Code Here

     */
    private void createResolvedGroupPrincipalSet(String username, Set groupPrincipals, String[] groups, int i)
    {
        LOG.debug("Group [" + i + "] for user[" + username + "] is [" + groups[i] + "]");

        GroupPrincipal group = new GroupPrincipalImpl(groups[i]);
        Preferences preferences = Preferences.userRoot().node(group.getFullPath());
        LOG.debug("Group name:" + group.getName());
        String[] fullPaths = groupHierarchyResolver.resolve(preferences);
        for (int n = 0; n < fullPaths.length; n++)
        {
            LOG.debug("Group [" + i + "] for user[" + username + "] is ["
                    + GroupPrincipalImpl.getPrincipalNameFromFullPath(fullPaths[n]) + "]");
View Full Code Here

    /**
     * @see org.apache.jetspeed.security.spi.GroupSecurityHandler#getGroupPrincipal(java.lang.String)
     */
    public GroupPrincipal getGroupPrincipal(String groupFullPathName)
    {
        GroupPrincipal groupPrincipal = null;
        InternalGroupPrincipal internalGroup = commonQueries
                .getInternalGroupPrincipal(GroupPrincipalImpl
                        .getFullPathFromPrincipalName(groupFullPathName));
        if (null != internalGroup)
        {
View Full Code Here

        // Check if group already exists.
        if (groupExists(groupFullPathName)) { 
            throw new SecurityException(SecurityException.GROUP_ALREADY_EXISTS.create(groupFullPathName));
        }

        GroupPrincipal groupPrincipal = new GroupPrincipalImpl(
                groupFullPathName);
        String fullPath = groupPrincipal.getFullPath();
        // Add the preferences.
        Preferences preferences = Preferences.userRoot().node(fullPath);
        if (log.isDebugEnabled())
        {
            log.debug("Added group preferences node: " + fullPath);
View Full Code Here

        { username, groupFullPathName}, new String[]
        { "username", "groupFullPathName"},
                "addUserToGroup(java.lang.String, java.lang.String)");

        // Get the group principal to add to user.
        GroupPrincipal groupPrincipal = groupSecurityHandler.getGroupPrincipal(groupFullPathName);
        if (null == groupPrincipal) {
            throw new SecurityException(SecurityException.GROUP_DOES_NOT_EXIST.create(groupFullPathName));
        }
        // Check that user exists.
        Principal userPrincipal = atnProviderProxy.getUserPrincipal(username);
View Full Code Here

    /**
     * @see org.apache.jetspeed.security.spi.GroupSecurityHandler#getGroupPrincipal(java.lang.String)
     */
    public GroupPrincipal getGroupPrincipal(String groupFullPathName)
    {
        GroupPrincipal groupPrincipal = null;
        InternalGroupPrincipal internalGroup = commonQueries
                .getInternalGroupPrincipal(GroupPrincipalImpl
                        .getFullPathFromPrincipalName(groupFullPathName));
        if (null != internalGroup)
        {
View Full Code Here

        // Check if group already exists.
        if (groupExists(groupFullPathName)) { 
            throw new SecurityException(SecurityException.GROUP_ALREADY_EXISTS.create(groupFullPathName));
        }

        GroupPrincipal groupPrincipal = new GroupPrincipalImpl(
                groupFullPathName);
        String fullPath = groupPrincipal.getFullPath();
        // Add the preferences.
        Preferences preferences = Preferences.userRoot().node(fullPath);
        if (log.isDebugEnabled())
        {
            log.debug("Added group preferences node: " + fullPath);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.GroupPrincipal

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.