Class XmlTopicResource

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

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

    • XmlTopicResource

      public XmlTopicResource(@NonNull @NonNull TopicStore store)
      This is the constructor for the class XmlAuthorResource.
      Parameters:
      store - the underlying store
  • Method Details

    • getTopicByKey

      @GET @Path("/xml/{vers}/topic/{id}") @PermitAll @UnitOfWork("siteDb") public String getTopicByKey(@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 getTopicByKey provides means to retrieve a topic.
      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
    • getTopics

      @GET @Path("/xml/{vers}/topics") @PermitAll @UnitOfWork("siteDb") public String getTopics(@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 getTopics provides means to retrieve a list of topics starting with a given pattern.
      Parameters:
      vers - the version number
      key - the key
      Returns:
      a list of matching author summaries