Interface DocumentVariantImportTask
-
- All Superinterfaces:
ContentMigrationTask
- All Known Implementing Classes:
WorkflowDocumentVariantImportTask
public interface DocumentVariantImportTask extends ContentMigrationTask
ContentMigrationTask
to importContentNode
objects and create or update documents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createOrUpdateDocumentFromVariantContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, String primaryTypeName, String documentLocation, String locale, String localizedName)
Creates or updates the document as primary node type ofprimaryTypeName
at the document handle node path (documentHandlePath
) with a localized document name (localizedName
) for the specificlocale
.javax.jcr.Node
updateDocumentFromVariantContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, javax.jcr.Node documentNode)
Updates the document given bydocumentHandle
from the POJOcontentNode
.-
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
-
-
-
-
Method Detail
-
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 ofprimaryTypeName
at the document handle node path (documentHandlePath
) with a localized document name (localizedName
) for the specificlocale
.- Parameters:
contentNode
-ContentNode
instance as a source data to create or update a documentprimaryTypeName
- primary node type name of the document to createdocumentLocation
- document handle node path where the document should be created or updatedlocale
- locale name for thelocalizedName
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
javax.jcr.Node updateDocumentFromVariantContentNode(org.onehippo.forge.content.pojo.model.ContentNode contentNode, javax.jcr.Node documentNode) throws ContentMigrationException
Updates the document given bydocumentHandle
from the POJOcontentNode
.- Parameters:
contentNode
-ContentNode
instance as a source data to create or update a documentdocumentNode
- 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 documentContentMigrationException
- if updating fails
-
-