Beispiel #1
0
  public UserEntity createUser(
      String uid, String displayName, UserType type, String userStoreName, GroupEntity group) {
    UserEntity user = new UserEntity();
    user.setName(uid);
    user.setDisplayName(displayName);
    user.setSyncValue(uid);
    user.setTimestamp(new DateTime());
    user.setType(type);
    user.setDeleted(0);
    if (userStoreName != null) {
      user.setUserStore(fixture.findUserStoreByName(userStoreName));
    }
    if (group != null) {
      user.setUserGroup(group);
    }

    return user;
  }
Beispiel #2
0
  public UserEntity createUserWithAllValues(
      String uid, String displayName, UserType type, String userStoreName, UserInfo userInfo) {
    UserEntity user = new UserEntity();
    user.setName(uid);
    user.setDisplayName(displayName);
    user.setSyncValue(uid);
    user.setTimestamp(new DateTime());
    user.setType(type);
    user.setDeleted(0);
    if (userStoreName != null) {
      user.setUserStore(fixture.findUserStoreByName(userStoreName));
    }
    user.setUserGroup(null);

    user.setUserFields(new UserInfoTransformer().toUserFields(userInfo));

    return user;
  }