Class JsonPkgResource

java.lang.Object
org.ctan.site.resources.catalogue.api.JsonPkgResource

@Path("/") @Produces("application/json") public class JsonPkgResource extends Object
The class AuthorResource.java contains the controller for the author resource.
  • Constructor Details

    • JsonPkgResource

      public JsonPkgResource(@NonNull @NonNull PkgStore store)
      This is the constructor for the class PkgResource.
      Parameters:
      store - the underlying store
  • Method Details

    • getPackages

      @GET @Path("/json/{vers}/packages") @PermitAll @UnitOfWork("siteDb") public List<JsonPkgResource.ListItemTo> getPackages(@NonNull @PathParam("vers") @NonNull String vers, @QueryParam("key") String key)
      The method getPackages provides means to retrieve a list of packages starting with a given pattern.
      Parameters:
      vers - the version number
      key - the pattern for the key
      Returns:
      a list of matching package summaries
    • getPkgByKey

      @GET @Path("/json/{vers}/pkg/{id}") @PermitAll @UnitOfWork("siteDb") public JsonPkgResource.PackageTo getPkgByKey(@NonNull @PathParam("vers") @NonNull String vers, @NonNull @PathParam("id") @NonNull String id, @QueryParam("author-names") Boolean authorNames, @QueryParam("drop") String drop)
      The method getPkgByKey provides means to retrieve a package.
      Parameters:
      vers - the version
      id - the key of the package
      authorNames - ...
      drop - ...
      Returns:
      an package or null