Class TestContentFolder
java.lang.Object
com.flowable.agent.engine.impl.util.TestContentFolder
Shared helper for sandboxing transient content items produced by agent test execution and
one-off agent invocations. Items are saved under a per-run folder rooted at a single
tenant-scoped folder named
ROOT_FOLDER_NAME. The root persists across runs — only
the per-run folder is deleted on cleanup, so cleanup failures cannot leak items at the
content engine root.
The per-run folder name is <prefix>-<UUID>. Callers should pick a stable
prefix (e.g. test-run, invocation) that distinguishes their scope from
other callers using the same root.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static CoreContentItemQueryapplyTenantFilter(CoreContentItemQuery query, String tenantId) Applies the tenant filter to a folder query.static StringcreateRunFolder(CoreContentService contentService, String tenantId, String topFolderName, String prefix) static voiddeleteRunFolder(CoreContentService contentService, String runFolderId) protected static CoreContentItemensureRootFolder(CoreContentService contentService, String tenantId, String topFolderName) protected static CoreContentItemfindRootFolder(CoreContentService contentService, String tenantId, CoreContentItem topFolder) protected static CoreContentItemresolveTopFolder(CoreContentService contentService, String tenantId, String topFolderName)
-
Field Details
-
ROOT_FOLDER_NAME
- See Also:
-
-
Constructor Details
-
TestContentFolder
public TestContentFolder()
-
-
Method Details
-
createRunFolder
public static String createRunFolder(CoreContentService contentService, String tenantId, String topFolderName, String prefix) -
deleteRunFolder
-
ensureRootFolder
protected static CoreContentItem ensureRootFolder(CoreContentService contentService, String tenantId, String topFolderName) -
resolveTopFolder
protected static CoreContentItem resolveTopFolder(CoreContentService contentService, String tenantId, String topFolderName) -
findRootFolder
protected static CoreContentItem findRootFolder(CoreContentService contentService, String tenantId, CoreContentItem topFolder) -
applyTenantFilter
protected static CoreContentItemQuery applyTenantFilter(CoreContentItemQuery query, String tenantId) Applies the tenant filter to a folder query. A blank tenant id is filtered withwithoutTenantId()rather thantenantId("")so the lookup also matches rows stored with aNULLtenant — Oracle persists empty strings asNULL, so an exact= ''match never hits there and the folder would be recreated at the content-engine root instead of being reused underTop.
-