Class PlatformContentItemService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.content.PlatformContentItemService
- All Implemented Interfaces:
PermissionServiceRegistryAware
,Aware
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected CasePermissionService
protected CmmnEngine
protected CmmnHistoryService
protected ContentEngine
protected ContentMediaTypeResolver
protected CoreContentService
protected String
static final String
protected FolderNameParser
protected HistoryService
protected MetadataService
protected com.fasterxml.jackson.databind.ObjectMapper
static final String
protected PlatformEntityLinkService
protected ProcessEngine
protected ProcessPermissionService
protected String
protected RenditionService
static final String
protected SimpleContentTypeMapper
protected TaskPermissionService
Fields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, EXTERNAL_WORKER_PREFIX, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChildFiles
(String contentItemId, List<FolderItem> childFiles) protected void
addGroupIdentityLink
(String groupId, String scopeId, String scopeType) protected void
buildHierarchy
(String scopeType, String scopeId, List<HierarchyLevel> hierarchy) void
copyAndTransformSavedFormInstanceValues
(Map<String, Object> startFormVariables, Map<String, Object> variableMap) void
createBinaryContentItem
(CoreContentItem contentItem, MultipartFile file) createCaseFolderHierarchy
(String caseInstanceId) createContentItem
(MultipartFile file, String userId) protected ContentItemRepresentation
createContentItem
(MultipartFile file, String userId, String taskId, String processInstanceId, String caseId, boolean provisional) createContentItemOnCaseInstance
(String caseInstanceId, String userId, MultipartFile file) createContentItemOnProcessInstance
(String processInstanceId, String userId, MultipartFile file) createContentItemOnTask
(String taskId, String userId, MultipartFile file) protected CoreContentItemQuery
createContentItemQueryForHierarchyLevel
(HierarchyLevel hierarchyLevel, String currentParentFolderId, String tenantId) createContentItemResponse
(CoreContentItem contentItem) protected ContentItemRepresentation
createContentItemResponse
(CoreContentItem contentItem, Map<String, Object> metadataValues) protected CoreContentItem
createCustomFolderHierarchy
(List<HierarchyLevel> hierarchy, String parentFolderId, String tenantId) createFolderFromInstance
(String scopeType, String scopeId) createFolderFromPath
(PlatformContentItemService.CustomFolderPath path, String scopeType, String scopeId) createNewContentItemVersion
(String contentItemId, MultipartFile file, boolean validateContentItemPermissions) protected ContentItemRepresentation
createNewContentItemVersion
(MultipartFile file, CoreContentItem dbContentItem) createNewContentItemVersionOnCaseInstance
(String caseInstanceId, String contentItemId, MultipartFile file) createNewContentItemVersionOnProcessInstance
(String processInstanceId, String contentItemId, MultipartFile file) createNewContentItemVersionOnTask
(String taskId, String contentItemId, MultipartFile file) protected CoreContentItem
createPersonalFolder
(String contentItemId) createProcessFolderHierarchy
(String processInstanceId) createProvisionalContentItem
(MultipartFile file, String userId) createProvisionalContentItemOnTask
(String taskId, String userId, MultipartFile file, boolean provisional) protected List<ContentItemRepresentation>
createResultRepresentation
(List<CoreContentItem> results) void
createSimpleContentItem
(CoreContentItem contentItem) createTaskFolderHierarchy
(String taskId) protected CoreContentItem
createWorkFolderHierarchy
(List<HierarchyLevel> hierarchyLevels, String parentFolderId) protected boolean
documentsOnlyOnRoot
(String scopeType, String scopeId) protected void
fillContentItemInJsonNode
(com.fasterxml.jackson.databind.JsonNode itemNode) findContentItem
(String contentItemId, Object variableValue) findContentItem
(String contentItemId, Map<String, Object> variables) protected ContentItem
findContentItemInJsonNode
(String contentItemId, com.fasterxml.jackson.databind.JsonNode itemNode) findLatestContentItemByVersionParentId
(String versionParentId, Object variableValue) findLatestContentItemByVersionParentId
(String contentItemId, Map<String, Object> variables) protected ContentItem
findLatestContentItemInJsonNodeByVersionParentID
(String versionParentId, com.fasterxml.jackson.databind.JsonNode itemNode) getCaseCustomFolderPath
(String caseInstanceId) protected CaseInstanceRepresentation
getCaseInstance
(String caseInstanceId) getCaseTaskCustomFolderPath
(TaskInfo task, String taskDefinitionKey, String caseDefinitionId, String scopeId, String tenantId) getChildContentItems
(String contentItemId, Boolean showFolders, String sort, String order) getChildFolderItems
(String contentItemId, String parentFolderId, Boolean showFolders, String sort, String order) getChildFolderTreeItems
(String folderTreeValue, String sort, String order) protected Comparator<ContentItemRepresentation>
getContentComparator
(String sort, String order) getContentItem
(String contentItemId) getContentItemsForCase
(String caseInstanceId) getContentItemsForProcessInstance
(String processInstanceId) getContentItemsForTask
(String taskId) getContentItemVersions
(String contentItemId) getContentItemWithFolderPath
(String folderTreeValue) protected String
getCustomFolderPathForParentEntityLink
(HistoricEntityLink parentEntityLink, String tenantId) protected String
getFileName
(MultipartFile file) getFirstLevelContentItems
(String contentItemId, String sort, String order) getFolderFromScope
(String scopeType, String scopeId, String tenantId) getFolderItemsForScope
(String scopeId, String scopeType, String sort, String order) protected List<HierarchyLevel>
getHierarchyFromEntityLinks
(String scopeType, String scopeId) protected HierarchyLevel
getHierarchyLevel
(String scopeType, String scopeId) getOrCreateParentFolder
(CoreContentItem contentItem) protected HistoricEntityLink
getParentEntityLink
(String scopeType, String scopeId) getParentFolderWithScope
(CoreContentItem contentItem) getParentPaths
(CoreContentItem current, String parentFolderId) getProcessCustomFolderPath
(String processInstanceId) protected ProcessInstanceRepresentation
getProcessInstance
(String processInstanceId) getProcessTaskCustomFolderPath
(TaskInfo task, String taskDefinitionKey, String processDefinitionId, String processInstanceId, String tenantId) protected EntityLinkInfo
getRootEntityLink
(String scopeType, String scopeId) getRootFolder
(String tenantId) protected String
getScopeIdFromContentItem
(CoreContentItem contentItem) protected String
getScopeTypeFromContentItem
(CoreContentItem contentItem) protected TaskInfo
getTaskCustomFolderPath
(String taskId) getWorkFolder
(String tenantId) void
boolean
isReadOnly
(CoreContentItem contentItem) boolean
protected void
migrateContentItemsWithoutParentFolder
(String parentFolderId, String scopeType, String scopeId) protected ContentItemRepresentation
revertContentItemVersion
(CoreContentItem dbContentItem, CoreContentItem previousDbContentItem) revertContentItemVersion
(String contentItemId, String previousContentItemId) validateAllowedFileMediaType
(String fileMediaType, String fileMediaSubType) validateAllowedFileUploadConfiguration
(String fileName, String fileMediaType, String fileMediaSubType) validateAllowedFileUploadConfiguration
(String filename, MultipartFile file) protected String
protected void
validateAllowedFileUploadSuffixes
(String filename) protected void
validateCasePermissions
(String caseInstanceId) protected void
validateContentItemPermission
(String scopeId, String scopeType) protected void
validateContentItemPermission
(ContentItem contentItem) void
validateContentItemPermissions
(CoreContentItem dbContentItem, boolean requiresScope) protected void
validateProcessPermissions
(String processInstanceId) protected void
validateTaskPermissions
(String taskId) protected void
validateUserPermissions
(String userId) void
validateViewPermissions
(CoreContentItem contentItem) Methods inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
currentUserHasAdminRights, currentUserIsSuperAdmin, fetchCasePermissionMappings, fetchCasePermissionMappings, fetchCaseSecurityPolicyModel, fetchPermissions, fetchPermissionsForTask, fetchProcessPermissionMappings, fetchProcessPermissionMappings, fetchProcessSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModelForCaseInstance, fetchSecurityPolicyModelForProcessInstance, fetchSecurityPolicyModelForTask, fetchSecurityPolicyModelForTask, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappingsForCase, fetchTaskPermissionMappingsForProcess, fetchTaskSecurityPolicyModelForCase, fetchTaskSecurityPolicyModelForProcess, filterPermissionsForRole, getCmmnExtensionElementValue, getCurrentGroupKeys, getCurrentSecurityScope, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
-
Field Details
-
PERSONAL_FOLDER_NAME
- See Also:
-
SCOPE_TYPE_USER
- See Also:
-
DOCUMENTS_ONLY_ON_ROOT
- See Also:
-
contentService
-
contentEngine
-
platformEntityLinkService
-
historyService
-
processEngine
-
cmmnHistoryService
-
cmmnEngine
-
taskPermissionService
-
processPermissionService
-
casePermissionService
-
simpleTypeMapper
-
renditionService
-
metadataService
-
folderNameParser
-
contentMediaTypeResolver
-
objectMapper
-
publicFolderName
-
defaultGroupForPublicFolder
-
allowedFileUploadSuffixes
-
allowedFileUploadMediaTypes
-
-
Constructor Details
-
PlatformContentItemService
-
-
Method Details
-
createProvisionalContentItem
-
createContentItem
-
createNewContentItemVersion
public ContentItemRepresentation createNewContentItemVersion(String contentItemId, MultipartFile file, boolean validateContentItemPermissions) -
revertContentItemVersion
public ContentItemRepresentation revertContentItemVersion(String contentItemId, String previousContentItemId) -
getParentFolderWithScope
-
getOrCreateParentFolder
-
getScopeTypeFromContentItem
-
getScopeIdFromContentItem
-
getFolderFromScope
-
migrateContentItemsWithoutParentFolder
-
getRootFolder
-
getWorkFolder
-
getTaskCustomFolderPath
-
getProcessTaskCustomFolderPath
-
getCaseCustomFolderPath
protected PlatformContentItemService.CustomFolderPath getCaseCustomFolderPath(String caseInstanceId) -
getProcessCustomFolderPath
protected PlatformContentItemService.CustomFolderPath getProcessCustomFolderPath(String processInstanceId) -
getCustomFolderPathForParentEntityLink
protected PlatformContentItemService.CustomFolderPath getCustomFolderPathForParentEntityLink(HistoricEntityLink parentEntityLink, String tenantId) -
getCaseTaskCustomFolderPath
-
createFolderFromPath
public CoreContentItem createFolderFromPath(PlatformContentItemService.CustomFolderPath path, String scopeType, String scopeId) -
createCustomFolderHierarchy
protected CoreContentItem createCustomFolderHierarchy(List<HierarchyLevel> hierarchy, String parentFolderId, String tenantId) -
createFolderFromInstance
-
createCaseFolderHierarchy
-
createProcessFolderHierarchy
-
createTaskFolderHierarchy
-
getHierarchyFromEntityLinks
-
buildHierarchy
-
getParentEntityLink
-
getHierarchyLevel
-
getCaseInstance
-
getProcessInstance
-
getTask
-
createWorkFolderHierarchy
protected CoreContentItem createWorkFolderHierarchy(List<HierarchyLevel> hierarchyLevels, String parentFolderId) -
createContentItemQueryForHierarchyLevel
protected CoreContentItemQuery createContentItemQueryForHierarchyLevel(HierarchyLevel hierarchyLevel, String currentParentFolderId, String tenantId) -
validateContentItemPermissions
-
createProvisionalContentItemOnTask
public ContentItemRepresentation createProvisionalContentItemOnTask(String taskId, String userId, MultipartFile file, boolean provisional) -
createContentItemOnTask
public ContentItemRepresentation createContentItemOnTask(String taskId, String userId, MultipartFile file) -
createNewContentItemVersionOnTask
public ContentItemRepresentation createNewContentItemVersionOnTask(String taskId, String contentItemId, MultipartFile file) -
createContentItemOnProcessInstance
public ContentItemRepresentation createContentItemOnProcessInstance(String processInstanceId, String userId, MultipartFile file) -
createNewContentItemVersionOnProcessInstance
public ContentItemRepresentation createNewContentItemVersionOnProcessInstance(String processInstanceId, String contentItemId, MultipartFile file) -
createContentItemOnCaseInstance
public ContentItemRepresentation createContentItemOnCaseInstance(String caseInstanceId, String userId, MultipartFile file) -
createNewContentItemVersionOnCaseInstance
public ContentItemRepresentation createNewContentItemVersionOnCaseInstance(String caseInstanceId, String contentItemId, MultipartFile file) -
getContentItem
-
validateViewPermissions
-
getContentItemWithFolderPath
-
getContentItemsForTask
-
validateTaskPermissions
-
getContentItemsForCase
-
validateCasePermissions
-
validateUserPermissions
-
getContentItemsForProcessInstance
-
validateProcessPermissions
-
handleContentItem
-
findContentItem
-
findContentItem
-
findLatestContentItemByVersionParentId
public ContentItem findLatestContentItemByVersionParentId(String contentItemId, Map<String, Object> variables) -
findLatestContentItemByVersionParentId
public ContentItem findLatestContentItemByVersionParentId(String versionParentId, Object variableValue) -
copyAndTransformSavedFormInstanceValues
-
getContentItemVersions
-
createResultRepresentation
-
createContentItem
protected ContentItemRepresentation createContentItem(MultipartFile file, String userId, String taskId, String processInstanceId, String caseId, boolean provisional) -
createNewContentItemVersion
protected ContentItemRepresentation createNewContentItemVersion(MultipartFile file, CoreContentItem dbContentItem) -
revertContentItemVersion
protected ContentItemRepresentation revertContentItemVersion(CoreContentItem dbContentItem, CoreContentItem previousDbContentItem) -
fillContentItemInJsonNode
protected void fillContentItemInJsonNode(com.fasterxml.jackson.databind.JsonNode itemNode) -
findLatestContentItemInJsonNodeByVersionParentID
protected ContentItem findLatestContentItemInJsonNodeByVersionParentID(String versionParentId, com.fasterxml.jackson.databind.JsonNode itemNode) -
findContentItemInJsonNode
protected ContentItem findContentItemInJsonNode(String contentItemId, com.fasterxml.jackson.databind.JsonNode itemNode) -
getFileName
-
createContentItemResponse
-
createContentItemResponse
protected ContentItemRepresentation createContentItemResponse(CoreContentItem contentItem, Map<String, Object> metadataValues) -
getContentTypeForFileExtension
-
getFolderItemsForScope
public FolderResponse getFolderItemsForScope(String scopeId, String scopeType, String sort, String order) -
documentsOnlyOnRoot
-
getRootEntityLink
-
getChildFolderItems
-
getChildFolderTreeItems
-
createSimpleContentItem
-
createBinaryContentItem
-
isReadOnly
-
isReadOnly
-
getParentPaths
-
getFirstLevelContentItems
-
createPersonalFolder
-
getChildContentItems
-
validateAllowedFileUploadSuffixes
-
validateAllowedFileUploadConfiguration
-
validateAllowedFileUploadConfiguration
-
validateAllowedFileUploadConfiguration
-
validateAllowedFileMediaType
-
getContentComparator
-
validateContentItemPermission
-
validateContentItemPermission
-
addChildFiles
-
addGroupIdentityLink
-