Class DefaultBinaryImportTask
- java.lang.Object
-
- org.onehippo.forge.content.exim.core.impl.AbstractContentMigrationTask
-
- org.onehippo.forge.content.exim.core.impl.AbstractContentImportTask
-
- org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask
-
- All Implemented Interfaces:
BinaryImportTask
,ContentMigrationTask
public class DefaultBinaryImportTask extends AbstractContentImportTask implements BinaryImportTask
DefaultBinaryImportTask
implementation.
-
-
Field Summary
-
Fields inherited from class org.onehippo.forge.content.exim.core.impl.AbstractContentImportTask
contentNodeBinder, contentNodeBindingItemFilter
-
-
Constructor Summary
Constructors Constructor Description DefaultBinaryImportTask(DocumentManager documentManager)
Constructs withdocumentManager
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.jcr.Node
createBinaryHandleAndVariantNode(String primaryTypeName, javax.jcr.Node folderNode, String name)
Creates a binary handle and variant node and returns the binary handle node.String
createOrUpdateBinaryFolder(String folderLocation, String primaryTypeName, String[] folderTypes, String[] galleryTypes)
String
createOrUpdateBinaryFromContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, String primaryTypeName, String folderPath, String name)
Creates an imageset (e.g,hippogallery:imageset
) content or an assetset (e.g,hippogallery:exampleAssetSet
) content from aContentNode
object.org.onehippo.forge.content.pojo.binder.ContentNodeBindingItemFilter<org.onehippo.forge.content.pojo.model.ContentItem>
getContentNodeBindingItemFilter()
ReturnsContentNodeBindingItemFilter
instance.protected void
updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode(javax.jcr.Node binaryHandleNode, org.onehippo.forge.content.pojo.model.ContentNode contentNode)
Update binary handle and variant node from theContentNode
data containing the binary variant content data.-
Methods inherited from class org.onehippo.forge.content.exim.core.impl.AbstractContentImportTask
getContentNodeBinder, setContentNodeBinder, setContentNodeBindingItemFilter
-
Methods inherited from class org.onehippo.forge.content.exim.core.impl.AbstractContentMigrationTask
beginRecord, endRecord, findFilesByNamePattern, getBinaryValueFileFolder, getContentMigrationRecords, getContentValueConverter, getCurrentContentMigrationRecord, getDataUrlSizeThreashold, getDocumentManager, getLogger, getObjectMapper, getStartedTimeMillis, getStoppedTimeMillis, getSummary, logSummary, readContentNodeFromJsonFile, readContentNodeFromXmlFile, setBinaryValueFileFolder, setContentValueConverter, setDataUrlSizeThreashold, setLogger, setObjectMapper, start, stop, writeContentNodeToJsonFile, writeContentNodeToXmlFile
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onehippo.forge.content.exim.core.ContentMigrationTask
beginRecord, endRecord, getContentMigrationRecords, getLogger, getStartedTimeMillis, getStoppedTimeMillis, getSummary, logSummary, readContentNodeFromJsonFile, readContentNodeFromXmlFile, setLogger, start, stop, writeContentNodeToJsonFile, writeContentNodeToXmlFile
-
-
-
-
Constructor Detail
-
DefaultBinaryImportTask
public DefaultBinaryImportTask(DocumentManager documentManager)
Constructs withdocumentManager
.- Parameters:
documentManager
-DocumentManager
instance
-
-
Method Detail
-
getContentNodeBindingItemFilter
public org.onehippo.forge.content.pojo.binder.ContentNodeBindingItemFilter<org.onehippo.forge.content.pojo.model.ContentItem> getContentNodeBindingItemFilter()
ReturnsContentNodeBindingItemFilter
instance. If not set, returns a default implementation.- Overrides:
getContentNodeBindingItemFilter
in classAbstractContentImportTask
- Returns:
ContentNodeBindingItemFilter
instance. If not set, returns a default implementation
-
createOrUpdateBinaryFolder
public String createOrUpdateBinaryFolder(String folderLocation, String primaryTypeName, String[] folderTypes, String[] galleryTypes) throws ContentMigrationException
- Specified by:
createOrUpdateBinaryFolder
in interfaceBinaryImportTask
- Throws:
ContentMigrationException
-
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 aContentNode
object.- Specified by:
createOrUpdateBinaryFromContentNode
in interfaceBinaryImportTask
- Parameters:
contentNode
- aContentNode
object containing an imageset (e.g,hippogallery:imageset
) content or an assetset (e.g,hippogallery:exampleAssetSet
) contentprimaryTypeName
- 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 updatedname
- 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 nodefolderNode
- folder nodename
- binary node name- Returns:
- created binary handle node
- Throws:
DocumentManagerException
- if it fails to create the binary handle and variant nodejavax.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 theContentNode
data containing the binary variant content data.- Parameters:
binaryHandleNode
- binary handle nodecontentNode
-ContentNode
data containing the binary variant content data- Throws:
DocumentManagerException
- if it fails to update the binary handle and variant nodejavax.jcr.RepositoryException
- if it fails to update the binary handle and variant node
-
-