Package de.xima.fc.app
Class WebAppContext
- java.lang.Object
-
- de.xima.fc.app.WebAppContext
-
public class WebAppContext extends Object
Singleton model allowing access to information about the web app context.- Since:
- 8.0.1
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddestroy(javax.servlet.ServletContextEvent sce)static WebAppContextgetInstance()StringgetMimeType(String fileName)Cuurently delegates toServletContext.getMimeType(String)- copied description: "Returns the MIME type of the specified file, or null if the MIME type is not known.javax.servlet.ServletContextgetServletContext()Gets the global servlet context instance of the web app.@NotNull IServletContextInfogetServletContextInfo()@NotNull IWebAppDescriptorgetWebAppDescriptor()static voidinit(javax.servlet.ServletContextEvent sce)StringtoString()
-
-
-
Method Detail
-
init
public static void init(javax.servlet.ServletContextEvent sce)
-
destroy
public static void destroy(javax.servlet.ServletContextEvent sce)
-
getInstance
public static WebAppContext getInstance()
- Returns:
- the current web app context.
-
getWebAppDescriptor
@NotNull public @NotNull IWebAppDescriptor getWebAppDescriptor()
- Returns:
- the
descriptorof this web app.
-
getServletContextInfo
@NotNull public @NotNull IServletContextInfo getServletContextInfo()
- Returns:
- the
servlet context informationof this web app.
-
getServletContext
@Nullable public javax.servlet.ServletContext getServletContext()
Gets the global servlet context instance of the web app. May be null if the web app context is not available.- Returns:
- The global servlet context of the web app.
-
getMimeType
public String getMimeType(String fileName)
Cuurently delegates toServletContext.getMimeType(String)- copied description: "Returns the MIME type of the specified file, or null if the MIME type is not known. The MIME type is determined by the configuration of the servlet container, and may be specified in a web application deployment descriptor."- Parameters:
fileName- the file name to process- Returns:
- the MIME type or null
-
-