Package org.cytoscape.jobs
Class SUIDUtil
java.lang.Object
org.cytoscape.jobs.SUIDUtil
This utility class provides methods to save and restore SUIDs that
are sent to remote execution environments across sessions.
Module: jobs-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>jobs-api</artifactId> </dependency>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CyNetwork
restoreNetwork(CyJob job, CyNetworkManager netManager, Long networkSUID, boolean clear)
This method is used to restore a saved network based on the network SUID.static Map<Long,CyIdentifiable>
restoreSUIDs(CyJob job, CyNetwork network, List<Long> oldIds, boolean clear)
Method to restore Cytoscape objects based on a list of SUIDs that were sent to the remote service as saved in the hidden table.static void
saveSUIDs(CyJob job, CyNetwork network, List<? extends CyIdentifiable> objs)
This method may be used to save a list of SUIDs that have been sent to a remote service so that they may be restored later
-
Constructor Details
-
SUIDUtil
public SUIDUtil()
-
-
Method Details
-
saveSUIDs
This method may be used to save a list of SUIDs that have been sent to a remote service so that they may be restored later- Parameters:
job
- the job that we're saving the SUIDs fornetwork
- the network that the SUIDs are part ofobjs
- the Cytoscape objects whose SUIDs we want to save
-
restoreNetwork
public static CyNetwork restoreNetwork(CyJob job, CyNetworkManager netManager, Long networkSUID, boolean clear)This method is used to restore a saved network based on the network SUID. This takes some special handling, since our access to the network tables are through the network itself, we need to use the network manager to get the list of networks in order to find the right network.- Parameters:
job
- theCyJob
we're restoringnetManager
- theCyNetworkManager
to get the list of networksnetworkSUID
- the SUIDof the network we're restoringclear
- if true, remove the column for this job- Returns:
- the restored network or null if we can't find it
-
restoreSUIDs
public static Map<Long,CyIdentifiable> restoreSUIDs(CyJob job, CyNetwork network, List<Long> oldIds, boolean clear)Method to restore Cytoscape objects based on a list of SUIDs that were sent to the remote service as saved in the hidden table.- Parameters:
job
- theCyJob
we're restoringnetwork
- the network the SUIDs are part of. See {@link SaveSUID.restoreNetwork()} for a method to get the networkoldIds
- the list of old SUIDs that were sent to the remote server and saved in the sessionclear
- if true, remove the columns for this job- Returns:
- a map that relates the original id to the Cytoscape object
-