|
deegree 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.enterprise.control.AbstractListener
org.deegree.portal.standard.context.control.AbstractContextListener
org.deegree.portal.standard.context.control.ContextSwitchListener
public class ContextSwitchListener
This class handles switch of map contexts. The basic logic is (1) receiving an rpc request with a context name (xml)
and, possibly, a bounding box, (2) transforming this xml using a provided xsl, and (3) forwarding the result back to
the browser.
Most of the action takes place in doTransformContext, and is delegated to the
ContextTransformer.
In order to perform the transformation from a context xml to a html, a xslt is provided. This is per default called
context2HTML.xsl (see the class member DEFAULT_CTXT2HTML) and should be put under
${context-home}/WEB-INF/xml/.
| Field Summary | |
|---|---|
protected URL |
ctxt2html
A String defining the name of the xsl file that defines the transformation from a context to html. |
static String |
NEW_CONTEXT_HTML
A String used as a key value for the new html (of the client). |
protected static String |
WEBMAPCTXT2HTML
script to transform a standard WMC document into a deegree WMC |
| Fields inherited from class org.deegree.portal.standard.context.control.AbstractContextListener |
|---|
userDir |
| Constructor Summary | |
|---|---|
ContextSwitchListener()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(FormEvent event)
|
protected String |
doTransformContext(XMLFragment xml)
Transforms the context pointed to by xml into html using xsl |
protected XMLFragment |
getContext(String context,
Envelope bbox,
String sessionID)
returns the context to be used as a String |
protected void |
writeContextToSession(String context,
String sessionID)
writes the context the user choosed to the users session. |
| Methods inherited from class org.deegree.portal.standard.context.control.AbstractContextListener |
|---|
changeBBox, changeLayerList, extractBBox, extractBBox, extractRPCParameters, extractRPCStruct, getContextList, getUserName, getUserPassword, getUsersStartContext, readSessionID, transformToHtmlMapContext |
| Methods inherited from class org.deegree.enterprise.control.AbstractListener |
|---|
getAlternativeNextPage, getHomePath, getInitParameter, getInitParameterList, getNextPage, getRequest, getReturnValue, gotoErrorPage, handle, setAlternativeNextPage, setDefaultAlternativeNextPage, setDefaultNextPage, setNextPage, setReturnValue, toModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NEW_CONTEXT_HTML
String used as a key value for the new html (of the client). This key is used in the JSP which
output the new(-ly transformed html.
protected URL ctxt2html
String defining the name of the xsl file that defines the transformation from a context to html.
This must be placed, together with the map context xml and helper xsl files, under
${context-home}/WEB-INF/conf/igeoportal/.
protected static final String WEBMAPCTXT2HTML
| Constructor Detail |
|---|
public ContextSwitchListener()
| Method Detail |
|---|
public void actionPerformed(FormEvent event)
actionPerformed in interface WebListeneractionPerformed in class AbstractListener
protected void writeContextToSession(String context,
String sessionID)
throws Exception
context - sessionID -
Exception
protected XMLFragment getContext(String context,
Envelope bbox,
String sessionID)
throws Exception
context - bbox - sessionID -
Exceptionprotected String doTransformContext(XMLFragment xml)
xml into html using xsl
xml - the context xml
|
deegree 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org