Class PlatformContentItemService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.content.PlatformContentItemService
- All Implemented Interfaces:
PermissionServiceRegistryAware
,org.springframework.beans.factory.Aware
@Transactional public class PlatformContentItemService extends AbstractPlatformSecurityService
-
Field Summary
Fields Modifier and Type Field Description protected CasePermissionService
casePermissionService
protected org.flowable.cmmn.api.CmmnHistoryService
cmmnHistoryService
protected com.flowable.content.engine.ContentEngine
contentEngine
protected com.flowable.core.content.api.CoreContentService
contentService
protected PlatformFolderItemService
folderItemService
protected org.flowable.engine.HistoryService
historyService
protected com.flowable.core.content.api.MetadataService
metadataService
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected PlatformFolderItemService
platformFolderItemService
protected ProcessPermissionService
processPermissionService
protected com.flowable.core.content.api.RenditionService
renditionService
protected SimpleContentTypeMapper
simpleTypeMapper
protected TaskPermissionService
taskPermissionService
Fields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService
-
Constructor Summary
Constructors Constructor Description PlatformContentItemService()
-
Method Summary
Modifier and Type Method Description void
copyAndTransformSavedFormInstanceValues(java.util.Map<java.lang.String,java.lang.Object> startFormVariables, java.util.Map<java.lang.String,java.lang.Object> variableMap)
ContentItemRepresentation
createContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId)
protected ContentItemRepresentation
createContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId, java.lang.String taskId, java.lang.String processInstanceId, java.lang.String caseId, boolean provisional)
ContentItemRepresentation
createContentItemOnCaseInstance(java.lang.String caseInstanceId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file)
ContentItemRepresentation
createContentItemOnProcessInstance(java.lang.String processInstanceId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file)
ContentItemRepresentation
createContentItemOnTask(java.lang.String taskId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file)
protected ContentItemRepresentation
createContentItemResponse(com.flowable.core.content.api.CoreContentItem contentItem)
ContentItemRepresentation
createNewContentItemVersion(java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file)
protected ContentItemRepresentation
createNewContentItemVersion(org.springframework.web.multipart.MultipartFile file, com.flowable.core.content.api.CoreContentItem dbContentItem)
ContentItemRepresentation
createNewContentItemVersionOnCaseInstance(java.lang.String caseInstanceId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file)
ContentItemRepresentation
createNewContentItemVersionOnProcessInstance(java.lang.String processInstanceId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file)
ContentItemRepresentation
createNewContentItemVersionOnTask(java.lang.String taskId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file)
ContentItemRepresentation
createProvisionalContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId)
ContentItemRepresentation
createProvisionalContentItemOnTask(java.lang.String taskId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file, boolean provisional)
protected java.util.List<ContentItemRepresentation>
createResultRepresentation(java.util.List<com.flowable.core.content.api.CoreContentItem> results)
protected void
fillContentItemInJsonNode(com.fasterxml.jackson.databind.JsonNode itemNode)
org.flowable.content.api.ContentItem
findContentItem(java.lang.String contentItemId, java.lang.Object variableValue)
org.flowable.content.api.ContentItem
findContentItem(java.lang.String contentItemId, java.util.Map<java.lang.String,java.lang.Object> variables)
protected org.flowable.content.api.ContentItem
findContentItemInJsonNode(java.lang.String contentItemId, com.fasterxml.jackson.databind.JsonNode itemNode)
org.flowable.content.api.ContentItem
findContentItemInSavedFormInstanceValues(java.lang.String contentItemId, java.util.Map<java.lang.String,java.lang.Object> startFormVariables)
com.flowable.core.content.api.CoreContentItem
getContentItem(java.lang.String contentItemId)
java.util.List<ContentItemRepresentation>
getContentItemsForCase(java.lang.String caseInstanceId)
java.util.List<ContentItemRepresentation>
getContentItemsForProcessInstance(java.lang.String processInstanceId)
java.util.List<ContentItemRepresentation>
getContentItemsForTask(java.lang.String taskId)
java.util.List<ContentItemRepresentation>
getContentItemVersions(java.lang.String contentItemId)
protected java.lang.String
getContentTypeForFileExtension(org.springframework.web.multipart.MultipartFile file)
protected java.lang.String
getFileName(org.springframework.web.multipart.MultipartFile file)
void
handleContentItem(java.lang.String variableName, java.lang.Object variableValue, java.util.Map<java.lang.String,java.lang.Object> variables)
protected ContentItemRepresentation
revertContentItemVersion(com.flowable.core.content.api.CoreContentItem dbContentItem, com.flowable.core.content.api.CoreContentItem previousDbContentItem)
ContentItemRepresentation
revertContentItemVersion(java.lang.String contentItemId, java.lang.String previousContentItemId)
protected void
validateCasePermissions(java.lang.String caseInstanceId)
void
validateContentItemPermissions(com.flowable.core.content.api.CoreContentItem dbContentItem, boolean requiresScope)
protected void
validateProcessPermissions(java.lang.String processInstanceId)
protected void
validateTaskPermissions(java.lang.String taskId)
protected void
validateUserPermissions(java.lang.String userId)
protected void
validateViewPermissions(com.flowable.core.content.api.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, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
-
Field Details
-
contentService
@Autowired protected com.flowable.core.content.api.CoreContentService contentService -
contentEngine
@Autowired protected com.flowable.content.engine.ContentEngine contentEngine -
folderItemService
-
historyService
@Autowired protected org.flowable.engine.HistoryService historyService -
cmmnHistoryService
@Autowired protected org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService -
taskPermissionService
-
processPermissionService
-
casePermissionService
-
simpleTypeMapper
-
renditionService
@Autowired protected com.flowable.core.content.api.RenditionService renditionService -
metadataService
@Autowired protected com.flowable.core.content.api.MetadataService metadataService -
platformFolderItemService
-
objectMapper
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
PlatformContentItemService
public PlatformContentItemService()
-
-
Method Details
-
createProvisionalContentItem
public ContentItemRepresentation createProvisionalContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId) -
createContentItem
public ContentItemRepresentation createContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId) -
createNewContentItemVersion
public ContentItemRepresentation createNewContentItemVersion(java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file) -
revertContentItemVersion
public ContentItemRepresentation revertContentItemVersion(java.lang.String contentItemId, java.lang.String previousContentItemId) -
validateContentItemPermissions
public void validateContentItemPermissions(com.flowable.core.content.api.CoreContentItem dbContentItem, boolean requiresScope) -
createProvisionalContentItemOnTask
public ContentItemRepresentation createProvisionalContentItemOnTask(java.lang.String taskId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file, boolean provisional) -
createContentItemOnTask
public ContentItemRepresentation createContentItemOnTask(java.lang.String taskId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file) -
createNewContentItemVersionOnTask
public ContentItemRepresentation createNewContentItemVersionOnTask(java.lang.String taskId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file) -
createContentItemOnProcessInstance
public ContentItemRepresentation createContentItemOnProcessInstance(java.lang.String processInstanceId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file) -
createNewContentItemVersionOnProcessInstance
public ContentItemRepresentation createNewContentItemVersionOnProcessInstance(java.lang.String processInstanceId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file) -
createContentItemOnCaseInstance
public ContentItemRepresentation createContentItemOnCaseInstance(java.lang.String caseInstanceId, java.lang.String userId, org.springframework.web.multipart.MultipartFile file) -
createNewContentItemVersionOnCaseInstance
public ContentItemRepresentation createNewContentItemVersionOnCaseInstance(java.lang.String caseInstanceId, java.lang.String contentItemId, org.springframework.web.multipart.MultipartFile file) -
getContentItem
public com.flowable.core.content.api.CoreContentItem getContentItem(java.lang.String contentItemId) -
validateViewPermissions
protected void validateViewPermissions(com.flowable.core.content.api.CoreContentItem contentItem) -
getContentItemsForTask
-
validateTaskPermissions
protected void validateTaskPermissions(java.lang.String taskId) -
getContentItemsForCase
public java.util.List<ContentItemRepresentation> getContentItemsForCase(java.lang.String caseInstanceId) -
validateCasePermissions
protected void validateCasePermissions(java.lang.String caseInstanceId) -
validateUserPermissions
protected void validateUserPermissions(java.lang.String userId) -
getContentItemsForProcessInstance
public java.util.List<ContentItemRepresentation> getContentItemsForProcessInstance(java.lang.String processInstanceId) -
validateProcessPermissions
protected void validateProcessPermissions(java.lang.String processInstanceId) -
handleContentItem
public void handleContentItem(java.lang.String variableName, java.lang.Object variableValue, java.util.Map<java.lang.String,java.lang.Object> variables) -
findContentItem
public org.flowable.content.api.ContentItem findContentItem(java.lang.String contentItemId, java.util.Map<java.lang.String,java.lang.Object> variables) -
findContentItem
public org.flowable.content.api.ContentItem findContentItem(java.lang.String contentItemId, java.lang.Object variableValue) -
copyAndTransformSavedFormInstanceValues
public void copyAndTransformSavedFormInstanceValues(java.util.Map<java.lang.String,java.lang.Object> startFormVariables, java.util.Map<java.lang.String,java.lang.Object> variableMap) -
findContentItemInSavedFormInstanceValues
public org.flowable.content.api.ContentItem findContentItemInSavedFormInstanceValues(java.lang.String contentItemId, java.util.Map<java.lang.String,java.lang.Object> startFormVariables) -
getContentItemVersions
public java.util.List<ContentItemRepresentation> getContentItemVersions(java.lang.String contentItemId) -
createResultRepresentation
protected java.util.List<ContentItemRepresentation> createResultRepresentation(java.util.List<com.flowable.core.content.api.CoreContentItem> results) -
createContentItem
protected ContentItemRepresentation createContentItem(org.springframework.web.multipart.MultipartFile file, java.lang.String userId, java.lang.String taskId, java.lang.String processInstanceId, java.lang.String caseId, boolean provisional) -
createNewContentItemVersion
protected ContentItemRepresentation createNewContentItemVersion(org.springframework.web.multipart.MultipartFile file, com.flowable.core.content.api.CoreContentItem dbContentItem) -
revertContentItemVersion
protected ContentItemRepresentation revertContentItemVersion(com.flowable.core.content.api.CoreContentItem dbContentItem, com.flowable.core.content.api.CoreContentItem previousDbContentItem) -
fillContentItemInJsonNode
protected void fillContentItemInJsonNode(com.fasterxml.jackson.databind.JsonNode itemNode) -
findContentItemInJsonNode
protected org.flowable.content.api.ContentItem findContentItemInJsonNode(java.lang.String contentItemId, com.fasterxml.jackson.databind.JsonNode itemNode) -
getFileName
protected java.lang.String getFileName(org.springframework.web.multipart.MultipartFile file) -
createContentItemResponse
protected ContentItemRepresentation createContentItemResponse(com.flowable.core.content.api.CoreContentItem contentItem) -
getContentTypeForFileExtension
protected java.lang.String getContentTypeForFileExtension(org.springframework.web.multipart.MultipartFile file)
-