class ModuleResource extends AbstractResource {

    @GET
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path("/{name}/{version}" + ServerAPI.GET_LICENSES)
    public Response getLicenses(@PathParam("name") final String name, @PathParam("version") final String version) {
        if (LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a get module licenses request [%s %s]", name, version));
        }

        if (name == null || version == null) {
            return Response.serverError().status(HttpStatus.BAD_REQUEST_400).build();
        }

        final LicenseListView view = new LicenseListView(String.format("Licenses of %s in version %s", name, version));
        final String moduleId = DbModule.generateID(name, version);
        final List<DbLicense> dbLicenses = getModuleHandler().getModuleLicenses(moduleId, getLicenseHandler());

        for (final DbLicense dbLicense : dbLicenses) {
            final License license = getModelMapper().getLicense(dbLicense);
            view.add(license);
        }

        return Response.ok(view).build();
    }

    public  ModuleResource(final RepositoryHandler repoHandler, final GrapesServerConfig dmConfig);

}