|
deegree 2.5 (2011/06/29 09:44 build-8-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 java.net.URL |
ctxt2html
A String defining the name of the xsl file that defines the transformation from a context to html. |
static java.lang.String |
NEW_CONTEXT_HTML
A String used as a key value for the new html (of the client). |
protected static java.lang.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 java.lang.String |
doTransformContext(XMLFragment xml)
Transforms the context pointed to by xml into html using xsl |
protected XMLFragment |
getContext(java.lang.String context,
Envelope bbox,
java.lang.String sessionID)
returns the context to be used as a String |
protected void |
writeContextToSession(java.lang.String context,
java.lang.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 java.lang.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 java.net.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 java.lang.String WEBMAPCTXT2HTML
Constructor Detail |
---|
public ContextSwitchListener()
Method Detail |
---|
public void actionPerformed(FormEvent event)
actionPerformed
in interface WebListener
actionPerformed
in class AbstractListener
protected void writeContextToSession(java.lang.String context, java.lang.String sessionID) throws java.lang.Exception
context
- sessionID
-
java.lang.Exception
protected XMLFragment getContext(java.lang.String context, Envelope bbox, java.lang.String sessionID) throws java.lang.Exception
context
- bbox
- sessionID
-
java.lang.Exception
protected java.lang.String doTransformContext(XMLFragment xml)
xml
into html using xsl
xml
- the context xml
|
deegree 2.5 (2011/06/29 09:44 build-8-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