Class AgamaRepoResource


  • @Path("/agama-repo")
    @Consumes("application/json")
    @Produces("application/json")
    public class AgamaRepoResource
    extends ConfigBaseResource
    Author:
    Puja Sharma
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.ws.rs.core.Response getAgamaProject​(String downloadLink)
      Downloads an Agama project from the specified download link.
      jakarta.ws.rs.core.Response getAllAgamaRepositories()
      Retrieve all Agama repositories.
      • Methods inherited from class io.jans.configapi.core.rest.BaseResource

        checkNotEmpty, checkNotEmpty, checkNotNull, checkNotNull, checkNotNull, checkResourceNotNull, createSearchRequest, findRootError, getBadRequestException, getBadRequestException, getBadRequestException, getHttpHeaders, getHttpRequest, getInternalServerException, getInternalServerException, getMissingAttributeError, getNotAcceptableException, getNotFoundError, getNotFoundError, getUriInfo, throwBadRequestException, throwBadRequestException, throwBadRequestException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwMissingAttributeError, throwNotFoundException, throwNotFoundException
    • Constructor Detail

      • AgamaRepoResource

        public AgamaRepoResource()
    • Method Detail

      • getAllAgamaRepositories

        @GET
        @Produces("application/json")
        public jakarta.ws.rs.core.Response getAllAgamaRepositories()
        Retrieve all Agama repositories. Returns an HTTP response whose entity is a JSON representation of the available Agama repositories.
        Returns:
        HTTP 200 with a JSON body containing the repositories (JsonNode) or HTTP 204 if no repositories are available.
      • getAgamaProject

        @GET
        @Produces("text/plain")
        @Path("/download")
        public jakarta.ws.rs.core.Response getAgamaProject​(@QueryParam("downloadLink")
                                                           String downloadLink)
                                                    throws IOException
        Downloads an Agama project from the specified download link.
        Parameters:
        downloadLink - the URL or link used to retrieve the Agama project
        Returns:
        a JAX-RS Response whose entity is the project content as a plain-text/binary payload
        Throws:
        IOException - if an I/O error occurs while obtaining the project