Class XmlPkgResource
java.lang.Object
org.ctan.site.resources.catalogue.api.XmlPkgResource
The class
XmlPkgResource
contains the controller for the pkg
resource.-
Constructor Summary
ConstructorsConstructorDescriptionXmlPkgResource
(@NonNull PkgStore store) This is the constructor for the classXmlPkgResource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodgetPkgByKey
provides means to retrieve an pkg.The methodgetPkgs
provides means to retrieve a list of pkgs starting with a given pattern.
-
Constructor Details
-
XmlPkgResource
This is the constructor for the classXmlPkgResource
.- 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 methodgetPkgByKey
provides means to retrieve an pkg.- Parameters:
vers
- the versionid
- the key of the pkgref
- 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 methodgetPkgs
provides means to retrieve a list of pkgs starting with a given pattern.- Parameters:
vers
- the version numberkey
- the key- Returns:
- a list of matching pkg summaries
-