Package ome.services.graphs
Interface GraphTraversal.Processor
-
- Enclosing class:
- GraphTraversal
public static interface GraphTraversal.Processor
Executes the planned operation.- Since:
- 5.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assertMayProcess(java.lang.String className, long id, ome.model.internal.Details details)
Assert that an object with the given details may be processed.void
deleteInstances(java.lang.String className, java.util.Collection<java.lang.Long> ids)
Delete the given instances.java.util.Set<GraphPolicy.Ability>
getRequiredPermissions()
void
nullProperties(java.lang.String className, java.lang.String propertyName, java.util.Collection<java.lang.Long> ids)
Null the given property of the indicated instances.void
processInstances(java.lang.String className, java.util.Collection<java.lang.Long> ids)
Process the given instances.
-
-
-
Method Detail
-
nullProperties
void nullProperties(java.lang.String className, java.lang.String propertyName, java.util.Collection<java.lang.Long> ids)
Null the given property of the indicated instances.- Parameters:
className
- full name of mapped Hibernate classpropertyName
- HQL-style property name of classids
- applicable instances of class, no more thanGraphTraversal.BATCH_SIZE
-
deleteInstances
void deleteInstances(java.lang.String className, java.util.Collection<java.lang.Long> ids) throws GraphException
Delete the given instances.- Parameters:
className
- full name of mapped Hibernate classids
- applicable instances of class, no more thanGraphTraversal.BATCH_SIZE
- Throws:
GraphException
- if not all the instances could be deleted
-
processInstances
void processInstances(java.lang.String className, java.util.Collection<java.lang.Long> ids) throws GraphException
Process the given instances. They will have been sufficiently unlinked by the other methods.- Parameters:
className
- full name of mapped Hibernate classids
- applicable instances of class, no more thanGraphTraversal.BATCH_SIZE
- Throws:
GraphException
- if not all the instances could be processed
-
getRequiredPermissions
java.util.Set<GraphPolicy.Ability> getRequiredPermissions()
- Returns:
- the permissions required for processing instances with
processInstances(String, Collection)
-
assertMayProcess
void assertMayProcess(java.lang.String className, long id, ome.model.internal.Details details) throws GraphException
Assert that an object with the given details may be processed. Called only if the user is not an administrator.- Parameters:
className
- the name of the object's classid
- the ID of the objectdetails
- the object's details- Throws:
GraphException
- if the object may not be processed
-
-