class ComponentResource {

    @GET
    @Path("/{namespace}/{name}/{version}")
    @Timed
    @UnitOfWork(transactional = false)
    @ApiOperation(value = "Get component based on namespace, name and version", response = ComponentDomain.class)
    public Response get(@PathParam("namespace") final String namespace, @PathParam("name") final String name,
            @PathParam("version") final String version) {
        final Set<ComponentDomain> components = service.search(namespace, name, version);
        if (components.isEmpty()) {
            throw new NotFoundException(String.format("Component with namespace: %s, name: %s, version: %s not found",
                    namespace, name, version));
        }
        return Response.ok().entity(components.iterator().next()).build();
    }

}