Class ConfigResource
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.servlet.BasicRestServlet
org.apache.juneau.microservice.resources.ConfigResource
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
,BasicUniversalConfig
,DefaultConfig
,DefaultHtmlConfig
,BasicRestOperations
Shows contents of the microservice configuration file.
See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetConfigEntry
(String section, String key) getConfigSection
(String section) setConfigContents
(Reader contents) setConfigContentsFormPost
(String contents) setConfigSection
(String section, Map<String, Object> contents) setConfigValue
(String section, String key, String value) Methods inherited from class org.apache.juneau.rest.servlet.BasicRestServlet
error, getFavIcon, getHtdoc, getStats, getSwagger
Methods inherited from class org.apache.juneau.rest.servlet.RestServlet
destroy, doLog, getContext, getPath, getRequest, getResponse, init, log, log, service, setContext
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
ConfigResource
public ConfigResource()
-
-
Method Details
-
getConfig
-
getConfigEditForm
-
getConfigSection
public JsonMap getConfigSection(@Path("section") @Schema(d="Section name in config file.") String section) throws org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound - Throws:
org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound
-
getConfigEntry
public String getConfigEntry(@Path("section") @Schema(d="Section name in config file.") String section, @Path("key") @Schema(d="Key name in section.") String key) throws org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound - Throws:
org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound
-
setConfigContentsFormPost
public JsonMap setConfigContentsFormPost(@FormData("contents") @Schema(d="New contents in INI file format.") String contents) throws Exception - Throws:
Exception
-
setConfigContents
public JsonMap setConfigContents(@Content @Schema(d="New contents in INI file format.") Reader contents) throws Exception - Throws:
Exception
-
setConfigSection
public JsonMap setConfigSection(@Path("section") @Schema(d="Section name in config file.") String section, @Content @Schema(d="New contents of config section as a simple map of key/value pairs.") Map<String, Object> contents) throws Exception- Throws:
Exception
-
setConfigValue
public String setConfigValue(@Path("section") @Schema(d="Section name in config file.") String section, @Path("key") @Schema(d="Key name in section.") String key, @Content @Schema(d="New value for entry.") String value) throws org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound - Throws:
org.apache.juneau.microservice.resources.ConfigResource.SectionNotFound
-