public final class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
getContextParams(jakarta.servlet.ServletContext servletContext)
Extract context params from
ServletContext. |
static ResourceConfig |
retrieve(jakarta.servlet.ServletContext context,
String configName)
Load
resource config from given
servlet context. |
static void |
store(ResourceConfig config,
jakarta.servlet.ServletContext context,
String configName)
Store
resource config as an attribute of given
servlet context. |
public static void store(ResourceConfig config, jakarta.servlet.ServletContext context, String configName)
resource config as an attribute of given
servlet context. If config is null then the previously stored value
(if any) is removed. The configName is used as an attribute name suffix.config - resource config to be stored.context - servlet context to store the config in.configName - name or id of the resource config.public static ResourceConfig retrieve(jakarta.servlet.ServletContext context, String configName)
resource config from given
servlet context. If found then the resource config is also removed from servlet
context. The configName is used as an attribute name suffix.context - servlet context to load resource config from.configName - name or id of the resource config.null if no resource config has been stored.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.