Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| 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

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

    java.lang.Object
      org.deegree.enterprise.control.AbstractListener
          org.deegree.portal.standard.context.control.AbstractContextListener

All Implemented Interfaces:
  EventListener, WebListener

Direct Known Subclasses:
  ContextDeleteListener, 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: 24549 $, $Date: 2010-05-25 14:29:38 +0200 (Di, 25. Mai 2010) $
Author:
  Andreas Poth , last edited by: $Author: jmays $

Field Summary
`protected static String` | `userDir` WEB-INF/conf/igeoportal/users/

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 List<String>` | `getContextList(String userName)` returns a list of all available context documents assigned to the passed user
`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` | `getUsersStartContext(String userName)` returns the name of the users start context.
`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`

Field Detail

### userDir

    protected static final String userDir

  WEB-INF/conf/igeoportal/users/

  See Also:
    Constant Field Values

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`

### getContextList

    protected List<String> getContextList(String userName)

  returns a list of all available context documents assigned to the passed user

  Parameters:
    `userName` -
  Returns:
    the list of available context documents

### getUsersStartContext

    protected String getUsersStartContext(String userName)
                                   throws IOException

  returns the name of the users start context. If the user does not own an individual start context the name of the default start context for all users will be returned. (copied and adapted from org.deegree.portal.standard.security.control.GetSessionIDListener)

  Parameters:
    `userName` -
  Returns:
    String
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| 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