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 class
The classAuthorShortTo
contains the transport object for authors references.protected static class
The classAuthorTo
contains the transport object for authors.protected static class
The classCopyrightTo
contains the transport object for copyright information.protected static class
The classCtanTo
contains the transport object for references to the tex-archive.protected static class
The classDescriptionTo
contains the transport object for a package description.protected static class
The classDocTo
contains the transport object for package documentation.protected static class
The classListItemTo
contains the transport object for list items.protected static class
The classPackageTo
contains the transport object for a package.protected static class
The classVersionTo
contains 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 methodgetPackages
provides means to retrieve a list of packages starting with a given pattern.getPkgByKey
(@NonNull String vers, @NonNull String id, Boolean authorNames, String drop) The methodgetPkgByKey
provides 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 methodgetPackages
provides 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 methodgetPkgByKey
provides means to retrieve a package.- Parameters:
vers
- the versionid
- the key of the packageauthorNames
- ...drop
- ...- Returns:
- an package or
null
-