Class Utils
- java.lang.Object
-
- org.glassfish.jersey.servlet.internal.Utils
-
public final class Utils extends Object
Utility class.- Author:
- Michal Gajdos
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>getContextParams(jakarta.servlet.ServletContext servletContext)Extract context params fromServletContext.static ResourceConfigretrieve(jakarta.servlet.ServletContext context, String configName)Loadresource configfrom givenservlet context.static voidstore(ResourceConfig config, jakarta.servlet.ServletContext context, String configName)Storeresource configas an attribute of givenservlet context.
-
-
-
Method Detail
-
store
public static void store(ResourceConfig config, jakarta.servlet.ServletContext context, String configName)
Storeresource configas an attribute of givenservlet context. Ifconfigisnullthen the previously stored value (if any) is removed. TheconfigNameis used as an attribute name suffix.- Parameters:
config- resource config to be stored.context- servlet context to store the config in.configName- name or id of the resource config.
-
retrieve
public static ResourceConfig retrieve(jakarta.servlet.ServletContext context, String configName)
Loadresource configfrom givenservlet context. If found then the resource config is also removed from servlet context. TheconfigNameis used as an attribute name suffix.- Parameters:
context- servlet context to load resource config from.configName- name or id of the resource config.- Returns:
- previously stored resource config or
nullif no resource config has been stored.
-
-