Class PlatformContentItemService

  • All Implemented Interfaces:
    com.flowable.platform.security.permission.PermissionServiceRegistryAware, org.springframework.beans.factory.Aware

    @Transactional
    public class PlatformContentItemService
    extends com.flowable.platform.security.service.AbstractPlatformSecurityService
    • Field Detail

      • contentService

        @Autowired
        protected com.flowable.core.content.api.CoreContentService contentService
      • contentEngine

        @Autowired
        protected com.flowable.content.engine.ContentEngine contentEngine
      • historyService

        @Autowired
        protected org.flowable.engine.HistoryService historyService
      • cmmnHistoryService

        @Autowired
        protected org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService
      • taskPermissionService

        @Autowired
        protected com.flowable.platform.security.permission.TaskPermissionService taskPermissionService
      • processPermissionService

        @Autowired
        protected com.flowable.platform.security.permission.ProcessPermissionService processPermissionService
      • casePermissionService

        @Autowired
        protected com.flowable.platform.security.permission.CasePermissionService casePermissionService
      • renditionService

        @Autowired
        protected com.flowable.core.content.api.RenditionService renditionService
      • metadataService

        @Autowired
        protected com.flowable.core.content.api.MetadataService metadataService
      • objectMapper

        @Autowired
        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • PlatformContentItemService

        public PlatformContentItemService()
    • Method Detail

      • 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,
                                                                     boolean validateContentItemPermissions)
      • 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

        public java.util.List<ContentItemRepresentation> getContentItemsForTask​(java.lang.String taskId)
      • 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)