Class XmlAuthorResource

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

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

    • XmlAuthorResource

      public XmlAuthorResource(@NonNull @NonNull AuthorStore store)
      This is the constructor for the class XmlAuthorResource.
      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 method getAuthorByKey provides means to retrieve an author.
      Parameters:
      vers - the version
      id - the key of the author
      ref - 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 method getAuthors provides means to retrieve a list of authors starting with a given pattern.
      Parameters:
      vers - the version number
      key - the key
      Returns:
      a list of matching author summaries