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

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

java.lang.Object
  extended by org.deegree.enterprise.control.AbstractListener
      extended by org.deegree.portal.standard.context.control.AbstractContextListener
          extended by org.deegree.portal.standard.context.control.ContextSaveListener
All Implemented Interfaces:
EventListener, WebListener

public class ContextSaveListener
extends AbstractContextListener

This class saves a new context based on changes made by the user (on the client) and based on the original context xml.
Files are saved under .../WEB-INF/xml/users/some_user, where some_user is passed as an RPC parameter. Files should be saved with .xml extension because the default load context listener class looks up those files.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Ugo Taddei, Andreas Poth, last edited by: $Author: mschneider $

Constructor Summary
ContextSaveListener()
           
 
Method Summary
 void actionPerformed(FormEvent event)
           
protected static void internalSave(OutputStream os, Document doc)
          common method to save xml
static void saveDocument(ViewContext vc, String filename)
          saves the new context as xml
 
Methods inherited from class org.deegree.portal.standard.context.control.AbstractContextListener
changeBBox, changeLayerList, extractBBox, extractBBox, extractRPCParameters, extractRPCStruct, getUserName, getUserPassword, 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
 

Constructor Detail

ContextSaveListener

public ContextSaveListener()
Method Detail

actionPerformed

public void actionPerformed(FormEvent event)
Specified by:
actionPerformed in interface WebListener
Specified by:
actionPerformed in class AbstractListener

saveDocument

public static final void saveDocument(ViewContext vc,
                                      String filename)
                               throws PortalException
saves the new context as xml

Parameters:
vc -
filename -
Throws:
PortalException

internalSave

protected static void internalSave(OutputStream os,
                                   Document doc)
                            throws PortalException
common method to save xml

Parameters:
os -
doc -
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