Class MessageConfigurationResource

java.lang.Object
io.jans.configapi.core.rest.BaseResource
io.jans.configapi.rest.resource.auth.ConfigBaseResource
io.jans.configapi.rest.resource.auth.MessageConfigurationResource

@Path("/config/message") @Consumes("application/json") @Produces("application/json") public class MessageConfigurationResource extends ConfigBaseResource
Configuration endpoints for messages
Author:
Yuriy Movchan Date: 07/12/2023
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.core.Response
    Retrieve the current global MessageConfiguration.
    jakarta.ws.rs.core.Response
    Retrieve the Postgres message configuration.
    jakarta.ws.rs.core.Response
    Retrieve the Redis section of the global MessageConfiguration.
    jakarta.ws.rs.core.Response
    patchMessageConfiguration(@NotNull String requestString)
    Applies a JSON Patch document to the global MessageConfiguration and persists the change.
    jakarta.ws.rs.core.Response
    patchPostgresMessageConfiguration(@NotNull String requestString)
    Apply a JSON Patch to the Postgres message configuration.
    jakarta.ws.rs.core.Response
    patchRedisMessageConfiguration(@NotNull String requestString)
    Applies a JSON Patch to the stored RedisMessageConfiguration and returns the updated configuration.
    jakarta.ws.rs.core.Response
    updatePostgresMessageConfiguration(@NotNull io.jans.service.message.model.config.PostgresMessageConfiguration postgresMessageConfiguration)
    Replace the Postgres message configuration with the provided configuration.
    jakarta.ws.rs.core.Response
    updateRedisMessageConfiguration(@NotNull io.jans.service.message.model.config.RedisMessageConfiguration redisConfiguration)
    Update the global Redis message configuration used by the application.

    Methods inherited from class io.jans.configapi.rest.resource.auth.ConfigBaseResource

    getMaxCount

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MessageConfigurationResource

      public MessageConfigurationResource()
  • Method Details

    • getMessageConfiguration

      @GET public jakarta.ws.rs.core.Response getMessageConfiguration()
      Retrieve the current global MessageConfiguration.
      Returns:
      the current MessageConfiguration in the response body (HTTP 200)
    • patchMessageConfiguration

      @PATCH @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchMessageConfiguration(@NotNull @NotNull String requestString)
      Applies a JSON Patch document to the global MessageConfiguration and persists the change.
      Parameters:
      requestString - a JSON Patch document (application/json-patch+json) as a string
      Returns:
      a JAX-RS Response containing the updated MessageConfiguration
      Throws:
      jakarta.ws.rs.InternalServerErrorException - if the patch cannot be applied or an I/O error occurs
    • getRedisMessageConfiguration

      @GET @Path("/redis") public jakarta.ws.rs.core.Response getRedisMessageConfiguration()
      Retrieve the Redis section of the global MessageConfiguration.
      Returns:
      a Response whose entity is the current RedisMessageConfiguration.
    • updateRedisMessageConfiguration

      @PUT @Path("/redis") public jakarta.ws.rs.core.Response updateRedisMessageConfiguration(@NotNull @NotNull io.jans.service.message.model.config.RedisMessageConfiguration redisConfiguration)
      Update the global Redis message configuration used by the application.
      Parameters:
      redisConfiguration - the RedisMessageConfiguration to apply to the global MessageConfiguration
      Returns:
      the updated RedisMessageConfiguration
    • patchRedisMessageConfiguration

      @PATCH @Path("/redis") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchRedisMessageConfiguration(@NotNull @NotNull String requestString)
      Applies a JSON Patch to the stored RedisMessageConfiguration and returns the updated configuration.
      Parameters:
      requestString - JSON Patch document as a string (media type application/json-patch+json) describing modifications to apply
      Returns:
      the updated RedisMessageConfiguration after applying the patch
    • getPostgresConfiguration

      @GET @Path("/postgres") public jakarta.ws.rs.core.Response getPostgresConfiguration()
      Retrieve the Postgres message configuration.
      Returns:
      the current PostgresMessageConfiguration.
    • updatePostgresMessageConfiguration

      @PUT @Path("/postgres") public jakarta.ws.rs.core.Response updatePostgresMessageConfiguration(@NotNull @NotNull io.jans.service.message.model.config.PostgresMessageConfiguration postgresMessageConfiguration)
      Replace the Postgres message configuration with the provided configuration. Persists the supplied PostgresMessageConfiguration into the global MessageConfiguration and returns the stored configuration.
      Parameters:
      postgresMessageConfiguration - the new PostgresMessageConfiguration to store; must not be null
      Returns:
      the persisted PostgresMessageConfiguration
    • patchPostgresMessageConfiguration

      @PATCH @Path("/postgres") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchPostgresMessageConfiguration(@NotNull @NotNull String requestString)
      Apply a JSON Patch to the Postgres message configuration.
      Parameters:
      requestString - JSON Patch document (application/json-patch+json) as a string.
      Returns:
      the updated PostgresMessageConfiguration.
      Throws:
      jakarta.ws.rs.InternalServerErrorException - if the patch cannot be parsed or applied.