Package com.google.enterprise.adaptor

Examples of com.google.enterprise.adaptor.UserPrincipal


        ImmutableSet.of(new GroupPrincipal("group1", LOCAL_NAMESPACE));
    assertEquals(expectedGroupSet, groupSet);

    Set<UserPrincipal> expectedUserSet =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user2", LOCAL_NAMESPACE));
    Collection<Principal> users = groups.get(groupSet.iterator().next());
    Set<Principal> userSet = new HashSet<Principal>(users);
    assertEquals(expectedUserSet, userSet);
  }
View Full Code Here


        ImmutableSet.of(expectedGroup1, expectedGroup2);
    assertEquals(expectedGroupSet, groupSet);

    Set<UserPrincipal> expectedUserSet1 =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user2", LOCAL_NAMESPACE));
    Collection<Principal> users1 = groups.get(expectedGroup1);
    Set<Principal> userSet1 = new HashSet<Principal>(users1);
    assertEquals(expectedUserSet1, userSet1);

    Set<UserPrincipal> expectedUserSet2 =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user3", LOCAL_NAMESPACE),
            new UserPrincipal("user4", LOCAL_NAMESPACE));
    Collection<Principal> users2 = groups.get(expectedGroup2);
    Set<Principal> userSet2 = new HashSet<Principal>(users2);
    assertEquals(expectedUserSet2, userSet2);
  }
View Full Code Here

        ImmutableSet.of(new GroupPrincipal("group1", LOCAL_NAMESPACE));
    assertEquals(expectedGroupSet, groupSet);

    Set<UserPrincipal> expectedUserSet =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user2", GLOBAL_NAMESPACE));
    Collection<Principal> users = groups.get(groupSet.iterator().next());
    Set<Principal> userSet = new HashSet<Principal>(users);
    assertEquals(expectedUserSet, userSet);
  }
View Full Code Here

        ImmutableSet.of(expectedGroup1, expectedGroup2, expectedGroup3);
    assertEquals(expectedGroupSet, groupSet);

    Set<UserPrincipal> expectedUserSet1 =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user2", LOCAL_NAMESPACE));
    Collection<Principal> users1 = groups.get(expectedGroup1);
    Set<Principal> userSet1 = new HashSet<Principal>(users1);
    assertEquals(expectedUserSet1, userSet1);

    Set<Principal> expectedUserSet2 = ImmutableSet.of(
        new UserPrincipal("user1", LOCAL_NAMESPACE),
        new UserPrincipal("user3", LOCAL_NAMESPACE),
        new GroupPrincipal("group1", LOCAL_NAMESPACE),
        new GroupPrincipal("group3", GLOBAL_NAMESPACE));
    Collection<Principal> users2 = groups.get(expectedGroup2);
    Set<Principal> userSet2 = new HashSet<Principal>(users2);
    assertEquals(expectedUserSet2, userSet2);
View Full Code Here

      LOGGER.log(Level.FINER, "Member name: {0} ; Member Type: {1}",
          new Object[] {memberName, memberType});
      ClientValue memberUserData = groupMembers.toValue(i, "UserData");
      String memberNamespace = identityUtils.getNamespace(memberUserData);
      if (memberType == Client.USER) {
        memberPrincipals.add(new UserPrincipal(memberName, memberNamespace));
      } else if (memberType == Client.GROUP) {
        memberPrincipals.add(new GroupPrincipal(memberName, memberNamespace));
      }
    }
View Full Code Here

TOP

Related Classes of com.google.enterprise.adaptor.UserPrincipal

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.