|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.web.struts.action.LyStrutsLeonardiPlugin
public class LyStrutsLeonardiPlugin
Type : leon.view.web.struts.LyStrutsLeonardiPlugin
This class implements the org.apache.struts.action.PlugIn
interface of the
Struts framework.
This class manages the link between the Leonardi applications, Leonardi sessions and the WEB
Container.
Once created, this plugin is stored inside the current ServletContext with the key
LEONARDI_PLUGIN
so that it may be retreived by any Leonardi Struts Action.
To configure this plugin, add a plugin declaration inside the struts-config.xml
file:
<plug-in className="leon.view.web.struts.LyStrutsLeonardiPlugin">
<set-property property="initName" value="$identfier of your Leonardi
application$"/>
<set-property property="initFile" value="$intitialisation file name of
your Leonardi application$"/>
</plug-in>
This class is also a LyApplication and LySession factory : see the
createLySession
and createLyApplication
methods.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
LEONARDI_PLUGIN
The key to store the Leonardi plugin inside the context. |
java.lang.String |
LOCK_HTTP_SESSION
A lock for the HTTP SESSION. |
Constructor Summary | |
---|---|
LyStrutsLeonardiPlugin()
Default constructor without parameters. |
Method Summary | |
---|---|
java.lang.String |
clearContextPath(javax.servlet.http.HttpServletRequest request,
java.lang.String page)
Removes the context path from URLS to enable forwarding into a JSP. |
static LyApplication |
createApplication(javax.servlet.ServletContext context)
Factory method for creating a new LyApplication. |
static LySession |
createSession(javax.servlet.ServletContext context)
Factory method for creating a new LySession. |
static LySession |
createSession(javax.servlet.ServletContext context,
java.lang.String sessionCode)
Factory method for creating a new LySession. |
void |
destroy()
Implementation of the PlugIn interface, calls for the destruction of all Leonardi application with the current id. |
java.lang.String |
getInitFile()
Gets the ".ini" file name. |
java.lang.String |
getInitName()
Gets the name of the Leonardi application. |
static LyStrutsLeonardiPlugin |
getPlugin(javax.servlet.ServletContext context)
Method that search for the Leonardi plugin inside the given context. |
javax.servlet.ServletContext |
getServletContext()
Method overriden to return the context of the Struts servlet. |
void |
init(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig config)
Implementation of the PlugIn interface, intialise the default Leonardi servlet for request processing. |
boolean |
isLoadingData()
Indicates whether application is being loaded. |
java.lang.String |
isPreloadApplication()
Gets the value of the isPreloadApplication parameter. |
void |
setInitFile(java.lang.String file)
Sets the ".ini" file name. |
void |
setInitName(java.lang.String name)
Sets the name of the Leonardi application. |
void |
setIsPreloadApplication(java.lang.String isPreloadApplication)
Sets the name value of the isPreloadApplication parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String LEONARDI_PLUGIN
public final java.lang.String LOCK_HTTP_SESSION
Constructor Detail |
---|
public LyStrutsLeonardiPlugin()
Method Detail |
---|
public static LyStrutsLeonardiPlugin getPlugin(javax.servlet.ServletContext context) throws java.lang.IllegalStateException
context
- A servlet context, i.e. the object that wraps the WEB application
configuration.
java.lang.IllegalStateException
- An illegal state exception if the plugin is not found.public static LyApplication createApplication(javax.servlet.ServletContext context)
initName
and initFile
parameters.
context
- A servlet context, i.e. the object that wraps the WEB application
configuration.
public static LySession createSession(javax.servlet.ServletContext context)
context
- A servlet context, i.e. the object that wraps the WEB application
configuration.
public static LySession createSession(javax.servlet.ServletContext context, java.lang.String sessionCode)
context
- A servlet context, i.e. the object that wraps the WEB application
configuration.sessionCode
- hashcode of the session that must be retrieved
public void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
init
in interface org.apache.struts.action.PlugIn
servlet
- The current Struts Servlet.config
- The Configuration of the Struts module realted to this plugin.
javax.servlet.ServletException
public void destroy()
destroy
in interface org.apache.struts.action.PlugIn
public boolean isLoadingData()
public java.lang.String clearContextPath(javax.servlet.http.HttpServletRequest request, java.lang.String page)
request
- request which should contains the attrributespage
- with possibly a context path
public java.lang.String getInitFile()
setInitFile(String)
public void setInitFile(java.lang.String file)
file
- the new name of the ".ini" file.getInitFile()
public java.lang.String getInitName()
setInitName(String)
public void setInitName(java.lang.String name)
name
- the new Leonardi application's name.getInitName()
public java.lang.String isPreloadApplication()
setIsPreloadApplication(String)
public void setIsPreloadApplication(java.lang.String isPreloadApplication)
isPreloadApplication
- the new isPreloadApplication parameter's value.isPreloadApplication()
public javax.servlet.ServletContext getServletContext()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |