deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.portal.standard.context.control
Class AbstractContextListener

java.lang.Object
  extended by org.deegree.enterprise.control.AbstractListener
      extended by org.deegree.portal.standard.context.control.AbstractContextListener
All Implemented Interfaces:
EventListener, WebListener
Direct Known Subclasses:
ContextLoadListener, ContextSaveListener, ContextSwitchListener, FullScreenListener, InitDownloadListener, NormalScreenListener, ResetContextListener

public abstract class AbstractContextListener
extends AbstractListener

This exception shall be thrown when a session(ID) will be used that has been expired.

Version:
$Revision: 19116 $, $Date: 2009-08-14 11:48:50 +0200 (Fr, 14. Aug 2009) $
Author:
Andreas Poth , last edited by: $Author: jmays $

Constructor Summary
AbstractContextListener()
           
 
Method Summary
static void changeBBox(ViewContext vc, Envelope bbox)
          changes the bounding box of a given view context
protected  void changeLayerList(ViewContext vc, RPCMember[] rpcLayerList)
          changes the layer list of the ViewContext vc according to the information contained in the rpcLayerList
protected  Envelope extractBBox(RPCStruct bboxStruct)
          Deprecated. use extractBBox( RPCStruct, CoordinateSystem ) instead.
protected  Envelope extractBBox(RPCStruct bboxStruct, CoordinateSystem crs)
          Convenience method to extract the boundig box from an rpc fragment.
protected  RPCParameter[] extractRPCParameters(RPCWebEvent rpcEvent)
          Extracts the parameters from the method call element within the passed rpcEvent.
protected  RPCStruct extractRPCStruct(RPCWebEvent rpcEvent, int index)
          Extracts the RPCStruct from the indicated parameter in the params element of the passed RPCWebEvent.
protected  String getUserName(String sessionId)
          gets the user name assigned to the passed session ID from an authentication service.
protected  String getUserPassword(String sessionId)
          gets the user password assigned to the passed session ID from a authentification service.
protected  String readSessionID(RPCStruct struct)
          reads the users session ID.
protected  String transformToHtmlMapContext(XMLFragment xml, String xsl)
          This function takes in a XmlFragment and transforms it to a html map context
 
Methods inherited from class org.deegree.enterprise.control.AbstractListener
actionPerformed, 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
 

Constructor Detail

AbstractContextListener

public AbstractContextListener()
Method Detail

getUserName

protected String getUserName(String sessionId)
                      throws XMLParsingException,
                             IOException,
                             SAXException
gets the user name assigned to the passed session ID from an authentication service. If no user is assigned to the session ID null will be returned. If the session is closed or expired an exception will be thrown

Parameters:
sessionId -
Returns:
name of the user assigned to the passed session ID
Throws:
XMLParsingException
SAXException
IOException

getUserPassword

protected String getUserPassword(String sessionId)
                          throws XMLParsingException,
                                 IOException,
                                 SAXException,
                                 PortalException
gets the user password assigned to the passed session ID from a authentification service. If no user is assigned to the session ID null will be returned. If the session is closed or expired an exception will be thrown

Parameters:
sessionId -
Returns:
password of the user assigned to the passed session ID
Throws:
XMLParsingException
IOException
SAXException
PortalException

readSessionID

protected String readSessionID(RPCStruct struct)
                        throws XMLParsingException,
                               SAXException,
                               IOException
reads the users session ID.
first the PRC will be parsed for a 'sessionID' element. If not present the sessionID will be read from the users session. If even the user's HTTP session does not contain a sessionID, it will be tried to get it from the WAS registered to the current context. If no WAS available null will be returned.

Parameters:
struct -
Returns:
the users session id
Throws:
IOException
SAXException
XMLParsingException

extractBBox

protected Envelope extractBBox(RPCStruct bboxStruct,
                               CoordinateSystem crs)
Convenience method to extract the boundig box from an rpc fragment.

Parameters:
bboxStruct - the RPCStruct containing the bounding box. For example, <member><name>boundingBox</name>etc....
crs - a coordinate system value, may be null.
Returns:
an envelope with the boundaries defined in the rpc structure

extractBBox

@Deprecated
protected Envelope extractBBox(RPCStruct bboxStruct)
Deprecated. use extractBBox( RPCStruct, CoordinateSystem ) instead.

This method is kept for downward compatibility of the API. Do not use it any more!

Parameters:
bboxStruct - the RPCStruct containing the bounding box. For example, <member><name>boundingBox</name>etc....
Returns:
an envelope with the boundaries defined in the rpc structure

changeBBox

public static final void changeBBox(ViewContext vc,
                                    Envelope bbox)
                             throws PortalException
changes the bounding box of a given view context

Parameters:
vc - the view context to be changed
bbox - the new bounding box
Throws:
PortalException

changeLayerList

protected void changeLayerList(ViewContext vc,
                               RPCMember[] rpcLayerList)
                        throws PortalException
changes the layer list of the ViewContext vc according to the information contained in the rpcLayerList

Parameters:
vc - The original ViewContext where the changes will be applied to
rpcLayerList - the current layerlist
Throws:
PortalException

transformToHtmlMapContext

protected String transformToHtmlMapContext(XMLFragment xml,
                                           String xsl)
                                    throws TransformerException,
                                           MalformedURLException,
                                           IOException,
                                           SAXException
This function takes in a XmlFragment and transforms it to a html map context

Parameters:
xml - xmlFragment to transform
xsl - xsl file used to transform
Returns:
html representing the mapContext
Throws:
TransformerException
SAXException
IOException
MalformedURLException

extractRPCParameters

protected RPCParameter[] extractRPCParameters(RPCWebEvent rpcEvent)
                                       throws PortalException
Extracts the parameters from the method call element within the passed rpcEvent.

Parameters:
rpcEvent -
Returns:
Returns the parameters as array of RPCParameter.
Throws:
PortalException

extractRPCStruct

protected RPCStruct extractRPCStruct(RPCWebEvent rpcEvent,
                                     int index)
                              throws PortalException
Extracts the RPCStruct from the indicated parameter in the params element of the passed RPCWebEvent.

Parameters:
rpcEvent - The RPCWebEvent, that contains the RPCStruct to extract.
index - The index of the parameter from which to extract the RPCStruct (starting with 0).
Returns:
Returns the RPCStruct from the indicated params element.
Throws:
PortalException

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org