public class GraphTraversal extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | GraphTraversal.ProcessorExecutes the planned operation. | 
| Constructor and Description | 
|---|
| GraphTraversal(org.hibernate.Session session,
              EventContext eventContext,
              ACLVoter aclVoter,
              SystemTypes systemTypes,
              GraphPathBean graphPathBean,
              com.google.common.collect.SetMultimap<String,String> unnullable,
              GraphPolicy policy,
              GraphTraversal.Processor processor)Construct a new instance of a graph traversal manager. | 
| Modifier and Type | Method and Description | 
|---|---|
| Map.Entry<Collection<ome.model.IObject>,Collection<ome.model.IObject>> | planOperation(org.hibernate.Session session,
             Collection<? extends ome.model.IObject> objectInstances,
             boolean include)Traverse model object graph to determine steps for the proposed operation. | 
| Map.Entry<com.google.common.collect.SetMultimap<String,Long>,com.google.common.collect.SetMultimap<String,Long>> | planOperation(org.hibernate.Session session,
             com.google.common.collect.SetMultimap<String,Long> objects,
             boolean include)Traverse model object graph to determine steps for the proposed operation. | 
| void | processTargets()Process the targeted model objects. | 
| void | unlinkTargets(boolean isUnlinkIncludeFromExclude)Remove links between the targeted model objects and the remainder of the model object graph. | 
public GraphTraversal(org.hibernate.Session session,
              EventContext eventContext,
              ACLVoter aclVoter,
              SystemTypes systemTypes,
              GraphPathBean graphPathBean,
              com.google.common.collect.SetMultimap<String,String> unnullable,
              GraphPolicy policy,
              GraphTraversal.Processor processor)
session - the Hibernate sessioneventContext - the current event contextaclVoter - ACL voter for permissions checkingsystemTypes - for identifying the system typesgraphPathBean - the graph path beanunnullable - properties that, while nullable, may not be nulled by a graph traversal operationpolicy - how to determine which related objects to include in the operationprocessor - how to operate on the resulting target object graphpublic Map.Entry<com.google.common.collect.SetMultimap<String,Long>,com.google.common.collect.SetMultimap<String,Long>> planOperation(org.hibernate.Session session, com.google.common.collect.SetMultimap<String,Long> objects, boolean include) throws GraphException
session - the Hibernate session to use for HQL queriesobjects - the model objects to processif - the given model objects are to be included (instead of just deleted)GraphException - if the model objects were not as expectedpublic Map.Entry<Collection<ome.model.IObject>,Collection<ome.model.IObject>> planOperation(org.hibernate.Session session, Collection<? extends ome.model.IObject> objectInstances, boolean include) throws GraphException
session - the Hibernate session to use for HQL queriesobjectInstances - the model objects to process, may be unloaded with ID onlyif - the given model objects are to be included (instead of just deleted)GraphException - if the model objects were not as expectedpublic void unlinkTargets(boolean isUnlinkIncludeFromExclude)
                   throws GraphException
isUnlinkIncludeFromExclude - if GraphPolicy.Action.EXCLUDE objects must be unlinked from GraphPolicy.Action.INCLUDE objects
 and vice versaGraphException - if the user does not have permission to unlink the targetspublic void processTargets()
                    throws GraphException
GraphException - if the user does not have permission to process the targets or
 if a cycle is detected in the model object graph
                
                
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.