Class DefaultBinaryImportTask

    • Constructor Detail

      • DefaultBinaryImportTask

        public DefaultBinaryImportTask​(DocumentManager documentManager)
        Constructs with documentManager.
        Parameters:
        documentManager - DocumentManager instance
    • Method Detail

      • getContentNodeBindingItemFilter

        public org.onehippo.forge.content.pojo.binder.ContentNodeBindingItemFilter<org.onehippo.forge.content.pojo.model.ContentItem> getContentNodeBindingItemFilter()
        Returns ContentNodeBindingItemFilter instance. If not set, returns a default implementation.
        Overrides:
        getContentNodeBindingItemFilter in class AbstractContentImportTask
        Returns:
        ContentNodeBindingItemFilter instance. If not set, returns a default implementation
      • createOrUpdateBinaryFromContentNode

        public String createOrUpdateBinaryFromContentNode​(org.onehippo.forge.content.pojo.model.ContentNode contentNode,
                                                          String primaryTypeName,
                                                          String folderPath,
                                                          String name)
                                                   throws ContentMigrationException
        Creates an imageset (e.g, hippogallery:imageset) content or an assetset (e.g, hippogallery:exampleAssetSet) content from a ContentNode object.
        Specified by:
        createOrUpdateBinaryFromContentNode in interface BinaryImportTask
        Parameters:
        contentNode - a ContentNode object containing an imageset (e.g, hippogallery:imageset) content or an assetset (e.g, hippogallery:exampleAssetSet) content
        primaryTypeName - primary node type of binary content. e.g, hippogallery:imageset, hippogallery:exampleAssetSet, etc.
        folderPath - folder node path where this binary content should be created or updated
        name - binary content node name
        Returns:
        created or updated binary handle node path
        Throws:
        ContentMigrationException - if importing fails
      • createBinaryHandleAndVariantNode

        protected javax.jcr.Node createBinaryHandleAndVariantNode​(String primaryTypeName,
                                                                  javax.jcr.Node folderNode,
                                                                  String name)
                                                           throws DocumentManagerException,
                                                                  javax.jcr.RepositoryException
        Creates a binary handle and variant node and returns the binary handle node.
        Parameters:
        primaryTypeName - primary node type name of the binary variant node
        folderNode - folder node
        name - binary node name
        Returns:
        created binary handle node
        Throws:
        DocumentManagerException - if it fails to create the binary handle and variant node
        javax.jcr.RepositoryException - if it fails to create the binary handle and variant node
      • updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode

        protected void updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode​(javax.jcr.Node binaryHandleNode,
                                                                                    org.onehippo.forge.content.pojo.model.ContentNode contentNode)
                                                                             throws DocumentManagerException,
                                                                                    javax.jcr.RepositoryException
        Update binary handle and variant node from the ContentNode data containing the binary variant content data.
        Parameters:
        binaryHandleNode - binary handle node
        contentNode - ContentNode data containing the binary variant content data
        Throws:
        DocumentManagerException - if it fails to update the binary handle and variant node
        javax.jcr.RepositoryException - if it fails to update the binary handle and variant node