コード例 #1
0
  @Test
  public void testSerializeProject() throws Exception {
    ProjectConfig config = DtoConverter.asDto(pm.getProject("/fromConfig"));

    assertEquals("/fromConfig", config.getPath());
    assertEquals("primary1", config.getType());
  }
コード例 #2
0
ファイル: WorkspaceHolder.java プロジェクト: joshuawilson/che
  protected void removeProject(ProjectConfig project) throws ServerException {

    final String href =
        UriBuilder.fromUri(apiEndpoint)
            .path(WorkspaceService.class)
            .path(WorkspaceService.class, "deleteProject")
            .build(workspaceId, project.getPath())
            .toString();
    try {
      httpJsonRequestFactory.fromUrl(href).useDeleteMethod().request();
    } catch (IOException | ApiException e) {
      throw new ServerException(e.getMessage());
    }
  }