Class JsonPkgResource
java.lang.Object
org.ctan.site.resources.catalogue.api.JsonPkgResource
The class
AuthorResource.java contains the controller for the
author resource.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classThe classAuthorShortTocontains the transport object for authors references.protected static classThe classAuthorTocontains the transport object for authors.protected static classThe classCopyrightTocontains the transport object for copyright information.protected static classThe classCtanTocontains the transport object for references to the tex-archive.protected static classThe classDescriptionTocontains the transport object for a package description.protected static classThe classDocTocontains the transport object for package documentation.protected static classThe classListItemTocontains the transport object for list items.protected static classThe classPackageTocontains the transport object for a package.protected static classThe classVersionTocontains the transport object for the version number. -
Constructor Summary
ConstructorsConstructorDescriptionJsonPkgResource(@NonNull PkgStore store) This is the constructor for the classPkgResource. -
Method Summary
Modifier and TypeMethodDescriptiongetPackages(@NonNull String vers, String key) The methodgetPackagesprovides means to retrieve a list of packages starting with a given pattern.getPkgByKey(@NonNull String vers, @NonNull String id, Boolean authorNames, String drop) The methodgetPkgByKeyprovides means to retrieve a package.
-
Constructor Details
-
JsonPkgResource
This is the constructor for the classPkgResource.- 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 methodgetPackagesprovides means to retrieve a list of packages starting with a given pattern.- Parameters:
vers- the version numberkey- 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 methodgetPkgByKeyprovides means to retrieve a package.- Parameters:
vers- the versionid- the key of the packageauthorNames- ...drop- ...- Returns:
- an package or
null
-