public class GraphHelper extends Object
GraphQuery
implementations for reuse.Constructor and Description |
---|
GraphHelper(Helper helper,
GraphPathBean graphPathBean)
Construct a helper for a graph request instance.
|
Modifier and Type | Method and Description |
---|---|
Set<Class<? extends IObject>> |
getClassesFromNames(Collection<String> classNames)
Given class names provided by the user, find the corresponding set of actual classes.
|
com.google.common.collect.SetMultimap<String,Long> |
getTargetMultimap(Set<Class<? extends IObject>> legalClasses,
Map<String,List<Long>> targetObjects)
Converts the Ice
StringLongListMap to a multimap. |
Set<String> |
getTargetSet(Set<Class<? extends IObject>> legalClasses,
Collection<String> targetClasses)
Converts the Ice
StringSet to a set. |
Set<String> |
getTopLevelNames(Iterable<Class<? extends IObject>> modelClasses)
Get the simple names of the top-level superclasses of the given classes.
|
GraphTraversal |
prepareGraphTraversal(List<omero.cmd.graphs.ChildOption> childOptions,
Set<GraphPolicy.Ability> requiredPermissions,
GraphPolicy graphPolicy,
Iterable<com.google.common.base.Function<GraphPolicy,GraphPolicy>> graphPolicyAdjusters,
ACLVoter aclVoter,
SystemTypes systemTypes,
GraphPathBean graphPathBean,
com.google.common.collect.SetMultimap<String,String> unnullable,
GraphTraversal.Processor processor,
boolean dryRun)
Deprecated.
from OMERO 5.4 the systemTypes argument is no longer included
|
void |
publishEventLog(org.springframework.context.ApplicationContext context,
String action,
String className,
Collection<Long> ids)
Publish database changes to the event log.
|
public GraphHelper(Helper helper, GraphPathBean graphPathBean)
helper
- the general request helper for the graph request instancegraphPathBean
- the graph path beanpublic Set<Class<? extends IObject>> getClassesFromNames(Collection<String> classNames)
classNames
- names of model object classespublic GraphTraversal prepareGraphTraversal(List<omero.cmd.graphs.ChildOption> childOptions, Set<GraphPolicy.Ability> requiredPermissions, GraphPolicy graphPolicy, Iterable<com.google.common.base.Function<GraphPolicy,GraphPolicy>> graphPolicyAdjusters, ACLVoter aclVoter, SystemTypes systemTypes, GraphPathBean graphPathBean, com.google.common.collect.SetMultimap<String,String> unnullable, GraphTraversal.Processor processor, boolean dryRun)
GraphQuery
request.childOptions
- the child options set on the requestrequiredPermissions
- the abilities that the user must have to operate upon an object for it to be includedgraphPolicy
- the graph policy for the requestgraphPolicyAdjusters
- the adjusters to be applied to the graph policyaclVoter
- 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 operationprocessor
- how to operate on the resulting target object graphdryRun
- if the request should skip the actual model object updatespublic Set<String> getTargetSet(Set<Class<? extends IObject>> legalClasses, Collection<String> targetClasses)
StringSet
to a set.legalClasses
- legal target object classestargetClasses
- the actual target object classesInternalException
- if any of the target classes are illegalpublic com.google.common.collect.SetMultimap<String,Long> getTargetMultimap(Set<Class<? extends IObject>> legalClasses, Map<String,List<Long>> targetObjects)
StringLongListMap
to a multimap.legalClasses
- legal target object classestargetObjects
- the model objects to processInternalException
- if any of the target object classes are illegalpublic Set<String> getTopLevelNames(Iterable<Class<? extends IObject>> modelClasses)
modelClasses
- some model classespublic void publishEventLog(org.springframework.context.ApplicationContext context, String action, String className, Collection<Long> ids)
context
- the context for publishing the application eventaction
- the name of the change actionclassName
- the class of objects that were changedids
- the IDs of the objects that were changed
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.