Package org.gatein.wci
Interface WebApp
-
public interface WebAppAbstraction of a web application.- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfireRequestDestroyed(javax.servlet.ServletRequest servletRequest)voidfireRequestInitialized(javax.servlet.ServletRequest servletRequest)ClassLoadergetClassLoader()Returns the class loader of the web application.StringgetContextPath()Returns the context path of the web application.javax.servlet.http.HttpSessiongetHttpSession(String sessId)Returns Http session in case that session with sessId exists for this web applicationjavax.servlet.ServletContextgetServletContext()Returns the servlet context of the web application.booleanimportFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite)Import a file in the war file.
-
-
-
Method Detail
-
getServletContext
javax.servlet.ServletContext getServletContext()
Returns the servlet context of the web application.- Returns:
- the servlet context
-
getClassLoader
ClassLoader getClassLoader()
Returns the class loader of the web application.- Returns:
- the web application class loader
-
getContextPath
String getContextPath()
Returns the context path of the web application.- Returns:
- the web application context path
-
importFile
boolean importFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite) throws IOException
Import a file in the war file. The file could not be created for some reasons which are :- The parent dir exists and is a file
- The parent dir does not exist and its creation failed
- An underlying exception occurs when writing bytes from the source
Inputstreamto the targetOutputStream
- Parameters:
parentDirRelativePath- the parent relative path in the web app starting from the app rootname- the name the created file should havesource- the data of the target fileoverwrite- if false and the file already exists nothing is done- Returns:
- true if the file has been created
- Throws:
IOException- if the file cannot be created
-
getHttpSession
javax.servlet.http.HttpSession getHttpSession(String sessId)
Returns Http session in case that session with sessId exists for this web application- Parameters:
sessId-- Returns:
- session with given ID or null if session with this ID doesn't exist
-
fireRequestInitialized
void fireRequestInitialized(javax.servlet.ServletRequest servletRequest)
-
fireRequestDestroyed
void fireRequestDestroyed(javax.servlet.ServletRequest servletRequest)
-
-