Class ConfigApiResource


  • @Path("/api-config")
    @Produces("application/json")
    @Consumes("application/json")
    public class ConfigApiResource
    extends ConfigBaseResource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.ws.rs.core.Response getAppConfiguration()
      Retrieve the current config-api application configuration.
      jakarta.ws.rs.core.Response patchAppConfigurationProperty​(@NotNull String jsonPatchString)
      Apply a JSON Patch to the config-api dynamic configuration and return the updated application configuration.
      • 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

      • ConfigApiResource

        public ConfigApiResource()
    • Method Detail

      • getAppConfiguration

        @GET
        public jakarta.ws.rs.core.Response getAppConfiguration()
        Retrieve the current config-api application configuration.
        Returns:
        the current ApiAppConfiguration
      • patchAppConfigurationProperty

        @PATCH
        @Consumes("application/json-patch+json")
        public jakarta.ws.rs.core.Response patchAppConfigurationProperty​(@NotNull
                                                                         @NotNull String jsonPatchString)
                                                                  throws com.github.fge.jsonpatch.JsonPatchException,
                                                                         IOException
        Apply a JSON Patch to the config-api dynamic configuration and return the updated application configuration.

        The provided JSON Patch document is applied to the stored dynamic configuration, the change is persisted, and the latest ApiAppConfiguration is returned.

        Parameters:
        jsonPatchString - a JSON Patch document (RFC 6902) as a string describing the modifications to apply
        Returns:
        the updated ApiAppConfiguration after the patch has been applied and persisted
        Throws:
        com.github.fge.jsonpatch.JsonPatchException - if the JSON Patch cannot be applied to the current configuration
        IOException - if there is an I/O or JSON processing error while applying the patch