Class ContentServiceImpl

java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<ContentEngineConfiguration>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ContentEngineConfiguration>
com.flowable.content.engine.impl.ContentServiceImpl
All Implemented Interfaces:
CoreContentService, org.flowable.content.api.ContentService

public class ContentServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ContentEngineConfiguration> implements CoreContentService
Author:
Tijs Rademakers
  • Constructor Details

  • Method Details

    • newContentItem

      public org.flowable.content.api.ContentItem newContentItem()
      Specified by:
      newContentItem in interface org.flowable.content.api.ContentService
    • newCoreContentItem

      public CoreContentItem newCoreContentItem()
      Specified by:
      newCoreContentItem in interface CoreContentService
    • saveContentItem

      public void saveContentItem(org.flowable.content.api.ContentItem contentItem)
      Specified by:
      saveContentItem in interface org.flowable.content.api.ContentService
    • saveContentItem

      public void saveContentItem(org.flowable.content.api.ContentItem contentItem, InputStream inputStream)
      Specified by:
      saveContentItem in interface org.flowable.content.api.ContentService
    • getContentItemData

      public InputStream getContentItemData(String contentItemId)
      Specified by:
      getContentItemData in interface org.flowable.content.api.ContentService
    • findContentItemsByTaskId

      public List<CoreContentItem> findContentItemsByTaskId(String taskId)
      Specified by:
      findContentItemsByTaskId in interface CoreContentService
    • findContentItemsByProcessInstanceId

      public List<CoreContentItem> findContentItemsByProcessInstanceId(String processInstanceId)
      Specified by:
      findContentItemsByProcessInstanceId in interface CoreContentService
    • findContentItemsByScopeIdAndType

      public List<CoreContentItem> findContentItemsByScopeIdAndType(String scopeId, String scopeType)
      Specified by:
      findContentItemsByScopeIdAndType in interface CoreContentService
    • deleteContentItem

      public void deleteContentItem(String contentItemId)
      Specified by:
      deleteContentItem in interface org.flowable.content.api.ContentService
    • deleteContentItemsByProcessInstanceId

      public void deleteContentItemsByProcessInstanceId(String processInstanceId)
      Specified by:
      deleteContentItemsByProcessInstanceId in interface org.flowable.content.api.ContentService
    • deleteContentItemsByTaskId

      public void deleteContentItemsByTaskId(String taskId)
      Specified by:
      deleteContentItemsByTaskId in interface org.flowable.content.api.ContentService
    • deleteContentItemsByScopeIdAndScopeType

      public void deleteContentItemsByScopeIdAndScopeType(String scopeId, String scopeType)
      Specified by:
      deleteContentItemsByScopeIdAndScopeType in interface org.flowable.content.api.ContentService
    • deleteContentItemsByVersionParentId

      public void deleteContentItemsByVersionParentId(String versionParentId)
      Specified by:
      deleteContentItemsByVersionParentId in interface CoreContentService
    • copyContentItem

      public CoreContentItem copyContentItem(String contentItemId, String parentFolderId)
      Specified by:
      copyContentItem in interface CoreContentService
    • renameContentItem

      public CoreContentItem renameContentItem(String contentItemId, String newName)
      Description copied from interface: CoreContentService
      Renames a content item and returns the updated entity. A no-op (no event, returned entity unchanged) is performed when the new name equals the current one. Fires a DOCUMENT_RENAMED event when the name actually changes, except for folders and provisional items which are not considered documents — those are renamed silently.
      Specified by:
      renameContentItem in interface CoreContentService
    • moveContentItem

      public CoreContentItem moveContentItem(String contentItemId, String newParentFolderId)
      Description copied from interface: CoreContentService
      Moves a non-folder content item to a different parent folder and returns the updated entity. Fires a DOCUMENT_MOVED event when the parent folder actually changes and the content item is non-provisional.
      Specified by:
      moveContentItem in interface CoreContentService
    • updateContentItemContent

      public CoreContentItem updateContentItemContent(String contentItemId, InputStream inputStream)
      Description copied from interface: CoreContentService
      Replaces the binary content of an existing content item and returns the updated entity. Fires a DOCUMENT_CONTENT_UPDATED event when the content item is non-provisional. The previous binary in the content store is left in place.
      Specified by:
      updateContentItemContent in interface CoreContentService
    • setContentItemDefinition

      public CoreContentItem setContentItemDefinition(String contentItemId, String definitionId)
      Description copied from interface: CoreContentService
      Sets, replaces, or unsets the document definition assigned to a content item and returns the updated entity. Fires a DOCUMENT_DEFINITION_SET event when the definition id actually changes and the content item is non-provisional. Pass null to unset.
      Specified by:
      setContentItemDefinition in interface CoreContentService
    • createNewVersionContentItem

      public CoreContentItem createNewVersionContentItem(String originalContentItemId, String name, String mimeType, InputStream inputStream)
      Description copied from interface: CoreContentService
      Creates a new version of an existing content item by inserting a new content item row that shares the version parent id of the original and copying the chain fields (scope, folder, definition, tenant) from the original. The new item gets version = max(existingVersion) + 1, name and mimeType from the arguments, and inherits the original item's metadata. Fires a DOCUMENT_NEW_VERSION_CREATED event.
      Specified by:
      createNewVersionContentItem in interface CoreContentService
    • revertContentItemVersion

      public CoreContentItem revertContentItemVersion(String currentContentItemId, String revertToContentItemId)
      Description copied from interface: CoreContentService
      Reverts a content item to a previous version by inserting a new content item row that shares the version parent id of currentContentItemId, has version = current.version + 1, and contains the binary, name and mime-type of revertToContentItemId. Inherits the chain fields and metadata from the current item. Fires a DOCUMENT_REVERTED_TO_VERSION event.
      Specified by:
      revertContentItemVersion in interface CoreContentService
    • createContentItemQuery

      public org.flowable.content.api.ContentItemQuery createContentItemQuery()
      Specified by:
      createContentItemQuery in interface org.flowable.content.api.ContentService
    • createCoreContentItemQuery

      public CoreContentItemQuery createCoreContentItemQuery()
      Specified by:
      createCoreContentItemQuery in interface CoreContentService
    • addUserIdentityLink

      public void addUserIdentityLink(String contentItemId, String userId, String identityLinkType)
      Specified by:
      addUserIdentityLink in interface CoreContentService
    • addGroupIdentityLink

      public void addGroupIdentityLink(String contentItemId, String groupId, String identityLinkType)
      Specified by:
      addGroupIdentityLink in interface CoreContentService
    • deleteUserIdentityLink

      public void deleteUserIdentityLink(String contentItemId, String userId, String identityLinkType)
      Specified by:
      deleteUserIdentityLink in interface CoreContentService
    • deleteGroupIdentityLink

      public void deleteGroupIdentityLink(String contentItemId, String groupId, String identityLinkType)
      Specified by:
      deleteGroupIdentityLink in interface CoreContentService
    • createProvisionalRenditionItems

      public void createProvisionalRenditionItems(String contentItemId, String documentAgentDefinitionId)
      Specified by:
      createProvisionalRenditionItems in interface CoreContentService