Class XmlPkgResource

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

@Path("/") @Produces("application/xml") public class XmlPkgResource extends Object
The class XmlPkgResource contains the controller for the pkg resource.
  • Constructor Details

    • XmlPkgResource

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

    • getPkgByKey

      @GET @Path("/xml/{vers}/pkg/{id}") @PermitAll @UnitOfWork("siteDb") public String getPkgByKey(@NonNull @PathParam("vers") @NonNull String vers, @NonNull @PathParam("id") @NonNull String id, @QueryParam("ref") @DefaultValue("false") Boolean ref, @QueryParam("no-dtd") @DefaultValue("false") Boolean noDtd, @QueryParam("no-xml") @DefaultValue("false") Boolean noXml)
      The method getPkgByKey provides means to retrieve an pkg.
      Parameters:
      vers - the version
      id - the key of the pkg
      ref - the indicator whether or not to return the references to the packages pkged by the pkg
      Returns:
      an pkg or null
    • getPkgs

      @GET @Path("/xml/{vers}/pkgs") @PermitAll @UnitOfWork("siteDb") public String getPkgs(@NonNull @PathParam("vers") @NonNull String vers, @QueryParam("key") String key, @QueryParam("no-dtd") @DefaultValue("false") Boolean noDtd, @QueryParam("no-xml") @DefaultValue("false") Boolean noXml)
      The method getPkgs provides means to retrieve a list of pkgs starting with a given pattern.
      Parameters:
      vers - the version number
      key - the key
      Returns:
      a list of matching pkg summaries