Package org.cytoscape.session.events
Class SessionAboutToBeSavedEvent
- java.lang.Object
-
- org.cytoscape.event.AbstractCyEvent<CySessionManager>
-
- org.cytoscape.session.events.SessionAboutToBeSavedEvent
-
- All Implemented Interfaces:
CyEvent<CySessionManager>
public final class SessionAboutToBeSavedEvent extends AbstractCyEvent<CySessionManager>
This event is fired synchronously by theCySessionManager
at beginning of theCySessionManager.getCurrentSession()
method. The intent is to allow listeners to provide information to this event object or to update their state before that state is interrogated by the CySessionManager.Module:
session-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>session-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Constructor Summary
Constructors Constructor Description SessionAboutToBeSavedEvent(CySessionManager source)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAppFiles(String appName, List<File> files)
A method that allows apps to specify a list of files that should be stored in the session.Map<String,List<File>>
getAppFileListMap()
This method is not meant to be used by listeners for this event, although you can and no harm should come to you.-
Methods inherited from class org.cytoscape.event.AbstractCyEvent
getListenerClass, getSource
-
-
-
-
Constructor Detail
-
SessionAboutToBeSavedEvent
public SessionAboutToBeSavedEvent(CySessionManager source)
Constructor.- Parameters:
source
- TheCySessionManager
that will be saving the session.
-
-
Method Detail
-
addAppFiles
public void addAppFiles(String appName, List<File> files) throws Exception
A method that allows apps to specify a list of files that should be stored in the session.- Parameters:
appName
- The name of the app that these files should be stored for.files
- The list of File objects to be stored in the session file.- Throws:
Exception
-
getAppFileListMap
public Map<String,List<File>> getAppFileListMap()
This method is not meant to be used by listeners for this event, although you can and no harm should come to you. This method is used by theCySessionManager
to retrieve the list of files from apps.- Returns:
- A map of app names to lists of files to be stored in the session for that app.
-
-