Examples of projects()


Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      newUser.setCredentials(creds);
      Response response = admin.users().create(newUser);
      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
      Assert.assertEquals(403, response.getStatus());
      client.close();
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      newUser.setCredentials(creds);
      Response response = admin.users().create(newUser);
      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      String signed = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).obtainSignedToken("Skeleton Key");
      System.out.println(signed);
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      String signed = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).obtainSignedToken("Skeleton Key");
      System.out.println(signed);
      PKCS7SignatureInput input = new PKCS7SignatureInput(signed);
      input.setCertificate(certificate);
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      newUser.setCredentials(creds);
      Response response = admin.users().create(newUser);
      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
      Assert.assertEquals(403, response.getStatus());
      client.close();
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      Response response = admin.users().create(newUser);
      User user = response.readEntity(User.class);
      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      String json = target.path("projects").queryParam("name", "Skeleton Key").request().get(String.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
View Full Code Here

Examples of org.jboss.resteasy.keystone.client.SkeletonKeyAdminClient.projects()

      response = admin.roles().create("user");
      Role role = response.readEntity(Role.class);
      String json = target.path("projects").queryParam("name", "Skeleton Key").request().get(String.class);
      Projects projects = admin.projects().query("Skeleton Key");
      Project project = projects.getList().get(0);
      admin.projects().addUserRole(project.getId(), user.getId(), role.getId());

      admin = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).admin();
      response = admin.roles().create("error");
      Assert.assertEquals(403, response.getStatus());
      client.close();
View Full Code Here

Examples of org.sonar.server.qualitygate.QgateProjectFinder.Association.projects()

    when(assoc.hasMoreResults()).thenReturn(true);
    List<ProjectQgateAssociation> projects = ImmutableList.of(
      new ProjectQgateAssociation().setId(42L).setName("Project One").setMember(false),
      new ProjectQgateAssociation().setId(24L).setName("Project Two").setMember(true)
      );
    when(assoc.projects()).thenReturn(projects);
    when(projectFinder.find(any(ProjectQgateAssociationQuery.class))).thenReturn(assoc);

    tester.newGetRequest("api/qualitygates", "search")
      .setParam("gateId", Long.toString(gateId))
      .setParam("query", "Project")
View Full Code Here

Examples of org.sonar.server.qualitygate.QgateProjectFinder.Association.projects()

    Association assoc = mock(Association.class);
    when(assoc.hasMoreResults()).thenReturn(true);
    List<ProjectQgateAssociation> projects = ImmutableList.of(
      new ProjectQgateAssociation().setId(24L).setName("Project Two").setMember(true)
      );
    when(assoc.projects()).thenReturn(projects);
    when(projectFinder.find(any(ProjectQgateAssociationQuery.class))).thenReturn(assoc);

    tester.newGetRequest("api/qualitygates", "search")
      .setParam("gateId", Long.toString(gateId))
      .execute()
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.