Class XmlAuthorResource
java.lang.Object
org.ctan.site.resources.catalogue.api.XmlAuthorResource
The class
XmlAuthorResource
contains the controller for the
author resource.-
Constructor Summary
ConstructorsConstructorDescriptionXmlAuthorResource
(@NonNull AuthorStore store) This is the constructor for the classXmlAuthorResource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodgetAuthorByKey
provides means to retrieve an author.getAuthors
(@NonNull String vers, String key, Boolean noDtd, Boolean noXml) The methodgetAuthors
provides means to retrieve a list of authors starting with a given pattern.
-
Constructor Details
-
XmlAuthorResource
This is the constructor for the classXmlAuthorResource
.- Parameters:
store
- the underlying store
-
-
Method Details
-
getAuthorByKey
@GET @Path("/xml/{vers}/author/{id}") @PermitAll @UnitOfWork("siteDb") public String getAuthorByKey(@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 methodgetAuthorByKey
provides means to retrieve an author.- Parameters:
vers
- the versionid
- the key of the authorref
- the indicator whether or not to return the references to the packages authored by the author- Returns:
- an author or
null
-
getAuthors
@GET @Path("/xml/{vers}/authors") @PermitAll @UnitOfWork("siteDb") public String getAuthors(@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 methodgetAuthors
provides means to retrieve a list of authors starting with a given pattern.- Parameters:
vers
- the version numberkey
- the key- Returns:
- a list of matching author summaries
-