Interface DocumentVariantImportTask

All Superinterfaces:
ContentMigrationTask
All Known Implementing Classes:
WorkflowDocumentVariantImportTask

public interface DocumentVariantImportTask extends ContentMigrationTask
ContentMigrationTask to import ContentNode objects and create or update documents.
  • Method Details

    • createOrUpdateDocumentFromVariantContentNode

      String createOrUpdateDocumentFromVariantContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, String primaryTypeName, String documentLocation, String locale, String localizedName) throws ContentMigrationException
      Creates or updates the document as primary node type of primaryTypeName at the document handle node path (documentHandlePath) with a localized document name (localizedName) for the specific locale.
      Parameters:
      contentNode - ContentNode instance as a source data to create or update a document
      primaryTypeName - primary node type name of the document to create
      documentLocation - document handle node path where the document should be created or updated
      locale - locale name for the localizedName
      localizedName - localized document name
      Returns:
      the document handle path where the document was created or updated by this operation
      Throws:
      ContentMigrationException - if creation or updating fails
    • updateDocumentFromVariantContentNode

      Node updateDocumentFromVariantContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, Node documentNode) throws ContentMigrationException
      Updates the document given by documentHandle from the POJO contentNode.
      Parameters:
      contentNode - ContentNode instance as a source data to create or update a document
      documentNode - document handle JCR node that is to be updated, or a document JCR node that has a handle as parent.
      Returns:
      the document handle node of the document updated by this operation
      Throws:
      IllegalArgumentException - if documentNode is null, not a handle nor a document
      ContentMigrationException - if updating fails