Examples of User


Examples of org.sonar.wsclient.user.User

  private void parseUsers(DefaultIssues result, Map jsonRoot) {
    List<Map> jsonUsers = (List<Map>) jsonRoot.get("users");
    if (jsonUsers != null) {
      for (Map jsonUser : jsonUsers) {
        result.add(new User(jsonUser));
      }
    }
  }
View Full Code Here

Examples of org.sonatype.nexus.client.core.subsystem.security.User

    role = client().getSubsystem(Roles.class).create(roleName)
        .withName(roleName)
        .withRole("anonymous")
        .save();

    final User user = client().getSubsystem(Users.class).create(uniqueName("u"))
        .withEmail("foo_bar@sonatype.org")
        .withFirstName("bar")
        .withLastName("foo")
        .withPassword(TEST_USER_PASSWORD)
        .withRole(role.id())
        .save();

    clientForTestUser = createNexusClient(nexus(), user.id(), TEST_USER_PASSWORD);

    // remove all trusted keys
    final Collection<Certificate> trustedKeys = truststore().get();
    for (final Certificate trustedKey : trustedKeys) {
      trustedKey.remove();
View Full Code Here

Examples of org.sonatype.security.usermanagement.User

    return this.filterListInMemeory(this.listUsers(), criteria);
  }

  private User toUser(SimpleUser simpleUser) {
    // simple conversion of object
    User user = new DefaultUser();
    user.setEmailAddress(simpleUser.getEmail());
    user.setName(simpleUser.getName());
    user.setUserId(simpleUser.getUserId());
    user.setStatus(UserStatus.active);
    for (String role : simpleUser.getRoles()) {
      RoleIdentifier plexusRole = new RoleIdentifier(this.getSource(), role);
      user.addRole(plexusRole);
    }
    // set the source of this user to this
    user.setSource(this.getSource());

    return user;
  }
View Full Code Here

Examples of org.springframework.boot.autoconfigure.security.SecurityProperties.User

  @Autowired
  private SecurityProperties security;

  @Override
  public void init(AuthenticationManagerBuilder auth) throws Exception {
    User user = security.getUser();
    // @formatter:off
    auth.jdbcAuthentication().dataSource(dataSource)
      .withUser(user.getName())
      .password(user.getPassword())
      .roles(user.getRole().toArray(new String[0]));
    // @formatter:on
  }
View Full Code Here

Examples of org.springframework.data.cassandra.test.integration.repository.User

  @Test
  public void testCdiRepository() {
    assertNotNull(repository);

    User bean = new User();
    bean.setUsername("username");
    bean.setFirstName("first");
    bean.setLastName("last");

    repository.save(bean);

    assertTrue(repository.exists(bean.getUsername()));

    User retrieved = repository.findOne(bean.getUsername());
    assertNotNull(retrieved);
    assertEquals(bean.getUsername(), retrieved.getUsername());
    assertEquals(bean.getFirstName(), retrieved.getFirstName());
    assertEquals(bean.getLastName(), retrieved.getLastName());

    assertEquals(1, repository.count());

    assertTrue(repository.exists(bean.getUsername()));
View Full Code Here

Examples of org.springframework.data.gemfire.repository.sample.User

  protected static User createUser(final String username, final Boolean active) {
    return createUser(username, String.format("%1$s@companyx.com", username), Calendar.getInstance(), active);
  }

  protected static User createUser(final String username, final String email, final Calendar since, final Boolean active) {
    User user = new User(username);
    user.setActive(Boolean.TRUE.equals(active));
    user.setEmail(email);
    user.setSince(since);
    return user;
  }
View Full Code Here

Examples of org.springframework.data.jpa.domain.sample.User

  User ollie, tom;

  @Before
  public void setup() {

    ollie = new User("Oliver", "Gierke", "ogierke@gopivotal.com");
    tom = new User("Thomas", "Darimont", "tdarimont@gopivotal.com");
  }
View Full Code Here

Examples of org.springframework.data.jpa.example.repository.simple.User

   * exception. Simplification serves descriptivness.
   */
  @Test
  public void savingUsers() {

    User user = new User();
    user.setUsername("username");

    user = userRepository.save(user);

    assertEquals(user, userRepository.findOne(user.getId()));
  }
View Full Code Here

Examples of org.springframework.data.mongodb.repository.User

   * @see org.springframework.data.mongodb.repository.custom.CustomMongoRepository#findByFullName()
   */
  @Override
  public List<User> findByUsernameCustom(String username) {

    User user = new User();
    user.setUsername(username);
    return Arrays.asList(user);
  }
View Full Code Here

Examples of org.springframework.data.neo4j.partial.model.User

    }

    @Test
    @Transactional
    public void jpaUserHasNodeAndId() {
        User user = user("John");
        Assert.assertNotNull("jpa-id",user.getId());
        Assert.assertNotNull("node",user.getPersistentState());
    }
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.