@Test(expected = javax.ws.rs.NotFoundException.class) public void testGetRepositoryTypeOfNonExistentRepository() throws Exception { getRepoType(Paths.get("/totally-nonexistent-repository").toString()); }
@GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) public Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field) throws IOException { Object ri = getRepositoryInfoData(repositoryPath); if (ri == null) { throw new WebApplicationException("cannot find repository with path: " + repositoryPath, Response.Status.NOT_FOUND); } return ClassUtil.getFieldValue(ri, field); }
RepositoriesController { @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) public Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field) throws IOException { Object ri = getRepositoryInfoData(repositoryPath); if (ri == null) { throw new WebApplicationException("cannot find repository with path: " + repositoryPath, Response.Status.NOT_FOUND); } return ClassUtil.getFieldValue(ri, field); } }
RepositoriesController { @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) public Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field) throws IOException { Object ri = getRepositoryInfoData(repositoryPath); if (ri == null) { throw new WebApplicationException("cannot find repository with path: " + repositoryPath, Response.Status.NOT_FOUND); } return ClassUtil.getFieldValue(ri, field); }  }
RepositoriesController { @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) public Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field) throws IOException { Object ri = getRepositoryInfoData(repositoryPath); if (ri == null) { throw new WebApplicationException("cannot find repository with path: " + repositoryPath, Response.Status.NOT_FOUND); } return ClassUtil.getFieldValue(ri, field); }  @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field); }
RepositoriesController { @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) public Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field) throws IOException { Object ri = getRepositoryInfoData(repositoryPath); if (ri == null) { throw new WebApplicationException("cannot find repository with path: " + repositoryPath, Response.Status.NOT_FOUND); } return ClassUtil.getFieldValue(ri, field); }  @GET @Path("/property/{field}") @Produces(MediaType.APPLICATION_JSON) Object get(@QueryParam("repository") final String repositoryPath, @PathParam("field") final String field);  }