Package step.core.entities
Class EntityManager
java.lang.Object
step.core.entities.EntityManager
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRegister aEntityDependencyTreeVisitor
hookCollection<Entity<?,
?>> void
getEntitiesReferences
(String entityName, String entityId, step.core.objectenricher.ObjectPredicate objectPredicate, EntityReferencesMap references, boolean recursive) get entities recursively by scanning the given entity (aka artefact), the entity is retrieved and deserialized from the dbvoid
getEntitiesReferences
(String entityType, step.core.objectenricher.ObjectPredicate objectPredicate, boolean recursively, EntityReferencesMap refs) Retrieve all existing references from the DB for given entity typeEntity<?,
?> getEntityByName
(String entityName) void
registerExportHook
(BiConsumer<Object, ExportContext> exportBiConsumer) void
registerImportHook
(BiConsumer<Object, ImportContext> importBiConsumer) Class<?>
resolveClass
(String entityName) void
runExportHooks
(Object o, ExportContext exportContext) void
runImportHooks
(Object o, ImportContext importContext) void
updateReferences
(Object entity, Map<String, String> references, step.core.objectenricher.ObjectPredicate objectPredicate, Set<String> messageCollector)
-
Field Details
-
executions
- See Also:
-
plans
- See Also:
-
functions
- See Also:
-
reports
- See Also:
-
tasks
- See Also:
-
users
- See Also:
-
resources
- See Also:
-
resourceRevisions
- See Also:
-
recursive
- See Also:
-
measurements
- See Also:
-
-
Constructor Details
-
EntityManager
public EntityManager()
-
-
Method Details
-
register
-
getEntities
-
getEntityByName
-
resolveClass
-
getEntitiesReferences
public void getEntitiesReferences(String entityType, step.core.objectenricher.ObjectPredicate objectPredicate, boolean recursively, EntityReferencesMap refs) Retrieve all existing references from the DB for given entity type- Parameters:
entityType
- type of entities to retrieveobjectPredicate
- to apply to filter entities (i.e. project)recursively
- flag to export references recursively (i.e by exporting a plan recursively the plan will be scanned to find sub references)refs
- the map of entity references to be populated during the process
-
getEntitiesReferences
public void getEntitiesReferences(String entityName, String entityId, step.core.objectenricher.ObjectPredicate objectPredicate, EntityReferencesMap references, boolean recursive) get entities recursively by scanning the given entity (aka artefact), the entity is retrieved and deserialized from the db- Parameters:
entityName
- name of the type of entityentityId
- the id of the entityreferences
- the map of references to be populated
-
updateReferences
-
addDependencyTreeVisitorHook
Register aEntityDependencyTreeVisitor
hook- Parameters:
hook
- the hook instance to be registered- Returns:
- this instance
-
getDependencyTreeVisitorHooks
-
registerExportHook
-
runExportHooks
-
registerImportHook
-
runImportHooks
-