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
Default
BinaryImportTask implementation.-
Field Summary
Fields inherited from class org.onehippo.forge.content.exim.core.impl.AbstractContentImportTask
contentNodeBinder, contentNodeBindingItemFilter -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBinaryImportTask(DocumentManager documentManager) Constructs withdocumentManager. -
Method Summary
Modifier and TypeMethodDescriptionprotected NodecreateBinaryHandleAndVariantNode(String primaryTypeName, Node folderNode, String name) Creates a binary handle and variant node and returns the binary handle node.createOrUpdateBinaryFolder(String folderLocation, String primaryTypeName, String[] folderTypes, String[] galleryTypes) 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 aContentNodeobject.org.onehippo.forge.content.pojo.binder.ContentNodeBindingItemFilter<org.onehippo.forge.content.pojo.model.ContentItem>ReturnsContentNodeBindingItemFilterinstance.protected voidupdateBinaryHandleAndVariantNodeFromBinaryVariantContentNode(Node binaryHandleNode, org.onehippo.forge.content.pojo.model.ContentNode contentNode) Update binary handle and variant node from theContentNodedata containing the binary variant content data.Methods inherited from class org.onehippo.forge.content.exim.core.impl.AbstractContentImportTask
getContentNodeBinder, setContentNodeBinder, setContentNodeBindingItemFilterMethods 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, writeContentNodeToXmlFileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
DefaultBinaryImportTask
Constructs withdocumentManager.- Parameters:
documentManager-DocumentManagerinstance
-
-
Method Details
-
getContentNodeBindingItemFilter
public org.onehippo.forge.content.pojo.binder.ContentNodeBindingItemFilter<org.onehippo.forge.content.pojo.model.ContentItem> getContentNodeBindingItemFilter()ReturnsContentNodeBindingItemFilterinstance. If not set, returns a default implementation.- Overrides:
getContentNodeBindingItemFilterin classAbstractContentImportTask- Returns:
ContentNodeBindingItemFilterinstance. If not set, returns a default implementation
-
createOrUpdateBinaryFolder
public String createOrUpdateBinaryFolder(String folderLocation, String primaryTypeName, String[] folderTypes, String[] galleryTypes) throws ContentMigrationException - Specified by:
createOrUpdateBinaryFolderin 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 aContentNodeobject.- Specified by:
createOrUpdateBinaryFromContentNodein interfaceBinaryImportTask- Parameters:
contentNode- aContentNodeobject 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 Node createBinaryHandleAndVariantNode(String primaryTypeName, Node folderNode, String name) throws DocumentManagerException, 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 nodeRepositoryException- if it fails to create the binary handle and variant node
-
updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode
protected void updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode(Node binaryHandleNode, org.onehippo.forge.content.pojo.model.ContentNode contentNode) throws DocumentManagerException, RepositoryException Update binary handle and variant node from theContentNodedata containing the binary variant content data.- Parameters:
binaryHandleNode- binary handle nodecontentNode-ContentNodedata containing the binary variant content data- Throws:
DocumentManagerException- if it fails to update the binary handle and variant nodeRepositoryException- if it fails to update the binary handle and variant node
-