Examples of UserPrincipalImpl


Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        secHandler.setUserPrincipalInGroup(uid1, gp1.getName());
        secHandler.setUserPrincipalInGroup(uid2, gp1.getName());
        String fullPathName = new GroupPrincipalImpl(gpUid1).getName();
        logger.debug("Group full path name from testGetUserPrincipalsInGroup()[" + fullPathName + "]");
        Set userPrincipals = secHandler.getUserPrincipalsInGroup(fullPathName);
        assertTrue(userPrincipals.contains(new UserPrincipalImpl(uid1)));
        assertTrue(userPrincipals.contains(new UserPrincipalImpl(uid2)));
       
        assertEquals("The user should have been in two groups.", 2, userPrincipals.size());
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

        secHandler.setUserPrincipalInRole(uid2, ro1.getName());

        String fullPathName = new RolePrincipalImpl(roleUid1).getName();
        logger.debug("Role full path name from testGetUserPrincipalsInRole()[" + fullPathName + "]");
        Set userPrincipals = secHandler.getUserPrincipalsInRole(fullPathName);
        assertTrue(userPrincipals.contains(new UserPrincipalImpl(uid1)));
        assertTrue(userPrincipals.contains(new UserPrincipalImpl(uid2)));
        assertEquals("The user should have been in two roles.", 2, userPrincipals.size());
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            principal = new GroupPrincipalImpl(name);
        }
        else
        {
            name = fullPath.substring(USER_PATH.length());
            principal = new UserPrincipalImpl(name);
        }
        // Create Subject
        Set principals = new HashSet();
        principals.add(principal);
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            principal = new GroupPrincipalImpl(name);
        }
        else
        {
            name = fullPath.substring(USER_PATH.length());
            principal = new UserPrincipalImpl(name);
        }
        // Create Subject
        Set principals = new HashSet();
        principals.add(principal);
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

    {
        UserPrincipal userPrincipal = null;
        InternalUserPrincipal internalUser = securityAccess.getInternalUserPrincipal(username, false);
        if (null != internalUser)
        {
            userPrincipal = new UserPrincipalImpl(UserPrincipalImpl.getPrincipalNameFromFullPath(internalUser.getFullPath()));
            userPrincipal.setEnabled(internalUser.isEnabled());
        }
        return userPrincipal;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

            String path = internalUser.getFullPath();
            if (path == null)
            {
                continue;
            }
            UserPrincipal userPrincipal = new UserPrincipalImpl(UserPrincipalImpl.getPrincipalNameFromFullPath(internalUser.getFullPath()));
            userPrincipal.setEnabled(internalUser.isEnabled());
            userPrincipals.add(userPrincipal);
        }
        return userPrincipals;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

                {
                    Iterator internalUsersIter = internalUsers.iterator();
                    while (internalUsersIter.hasNext())
                    {
                        InternalUserPrincipal internalUser = (InternalUserPrincipal) internalUsersIter.next();
                        Principal userPrincipal = new UserPrincipalImpl(UserPrincipalImpl
                                .getPrincipalNameFromFullPath(internalUser.getFullPath()));
                        if (!userPrincipals.contains(userPrincipal))
                        {
                            userPrincipals.add(userPrincipal);
                        }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

                {
                    Iterator internalUsersIter = internalUsers.iterator();
                    while (internalUsersIter.hasNext())
                    {
                        InternalUserPrincipal internalUser = (InternalUserPrincipal) internalUsersIter.next();
                        Principal userPrincipal = new UserPrincipalImpl(UserPrincipalImpl
                                .getPrincipalNameFromFullPath(internalUser.getFullPath()));
                        if (!userPrincipals.contains(userPrincipal))
                        {
                            userPrincipals.add(userPrincipal);
                        }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

   * @param principalUid The principal uid.
   * @return A group principal object.
   */
  protected Principal makePrincipal(String principalUid)
  {
      return new UserPrincipalImpl(principalUid);
  }   
View Full Code Here

Examples of org.apache.jetspeed.security.impl.UserPrincipalImpl

     * @param principalName The user principal name.
     * @return The subject.
     */
    public static Subject createSubject(String principalName)
    {
        Principal principal = new UserPrincipalImpl(principalName);
        Set principals = new PrincipalsSet();
        principals.add(principal);
        return new Subject(true, principals, new HashSet(), new HashSet());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.