public abstract class AbstractManifestProcessorBase extends Object implements TransferManifestProcessor, TransferSummaryAware
Constructor and Description |
---|
AbstractManifestProcessorBase(TransferReceiver receiver,
String transferId) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
endManifest() |
void |
endTransferManifest()
Signals the end of a transfer manifest
|
protected TransferReceiver |
getReceiver() |
protected File |
getStagingFolder() |
protected org.alfresco.service.cmr.repository.ChildAssociationRef |
getTemporaryLocation(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Given the node ref, this method constructs the appropriate ChildAssociationRef that would place this node in the
transfer's temporary folder.
|
protected String |
getTransferId() |
TransferSummaryReport |
getTransferSummaryReport() |
protected void |
localHandleException(TransferManifestNode node,
Throwable ex)
This method is invoked if an exception or error occurs while processing the manifest.
|
protected void |
logComment(String message) |
protected void |
logCreated(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
org.alfresco.service.cmr.repository.NodeRef newParentNode,
String parentPath,
boolean orphan) |
protected void |
logDeleted(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String parentPath) |
protected void |
logInvasionHierarchy(org.alfresco.service.cmr.repository.NodeRef parentRef,
org.alfresco.service.cmr.repository.NodeRef childRef,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.apache.commons.logging.Log log)
Puts information about current
childRef and its parentRef into log in TRACE level. |
protected void |
logMoved(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String oldPath,
org.alfresco.service.cmr.repository.NodeRef newParent,
String newPath) |
protected void |
logSummaryComment(String message) |
protected void |
logSummaryCreated(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
org.alfresco.service.cmr.repository.NodeRef newParentNode,
String parentPath,
boolean orphan) |
protected void |
logSummaryDeleted(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String parentPath) |
protected void |
logSummaryMoved(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String oldPath,
org.alfresco.service.cmr.repository.NodeRef newParent,
String newPath) |
protected void |
logSummaryUpdated(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String newPath) |
protected void |
logUpdated(org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String newPath) |
protected abstract void |
processHeader(TransferManifestHeader header) |
protected abstract void |
processNode(TransferManifestDeletedNode node) |
protected abstract void |
processNode(TransferManifestNormalNode node) |
void |
processTransferManifestNode(TransferManifestDeletedNode node)
Gives a deleted manifest node to be processed
|
void |
processTransferManifestNode(TransferManifestNormalNode node)
Gives a manifest node to be processed
|
void |
processTransferManifiestHeader(TransferManifestHeader header)
Gives the header to be proceessed
|
void |
setTransferSummaryReport(TransferSummaryReport transferSummaryReport) |
protected abstract void |
startManifest() |
void |
startTransferManifest()
Signals the start of a transfer manifest
|
public AbstractManifestProcessorBase(TransferReceiver receiver, String transferId)
public final void endTransferManifest()
TransferManifestProcessor
endTransferManifest
in interface TransferManifestProcessor
protected abstract void endManifest()
public final void processTransferManifestNode(TransferManifestNormalNode node)
TransferManifestProcessor
processTransferManifestNode
in interface TransferManifestProcessor
node
- the nodeprotected abstract void processNode(TransferManifestNormalNode node) throws TransferProcessingException
TransferProcessingException
public final void processTransferManifestNode(TransferManifestDeletedNode node)
TransferManifestProcessor
processTransferManifestNode
in interface TransferManifestProcessor
node
- the nodeprotected abstract void processNode(TransferManifestDeletedNode node) throws TransferProcessingException
TransferProcessingException
public final void processTransferManifiestHeader(TransferManifestHeader header)
TransferManifestProcessor
processTransferManifiestHeader
in interface TransferManifestProcessor
header
- the headerprotected abstract void processHeader(TransferManifestHeader header)
public final void startTransferManifest()
TransferManifestProcessor
startTransferManifest
in interface TransferManifestProcessor
protected abstract void startManifest()
protected org.alfresco.service.cmr.repository.ChildAssociationRef getTemporaryLocation(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRefprotected File getStagingFolder()
protected TransferReceiver getReceiver()
protected String getTransferId()
protected void localHandleException(TransferManifestNode node, Throwable ex)
node
- TransferManifestNodeex
- Throwableprotected void logComment(String message)
protected void logCreated(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef newParentNode, String parentPath, boolean orphan)
protected void logDeleted(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String parentPath)
protected void logUpdated(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String newPath)
protected void logMoved(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String oldPath, org.alfresco.service.cmr.repository.NodeRef newParent, String newPath)
protected void logInvasionHierarchy(org.alfresco.service.cmr.repository.NodeRef parentRef, org.alfresco.service.cmr.repository.NodeRef childRef, org.alfresco.service.cmr.repository.NodeService nodeService, org.apache.commons.logging.Log log)
childRef
and its parentRef
into log in TRACE level. Information includes 'name', 'fromRepositoryId', 'aliened' and
'invadedBy' properties. Additionally, collects the same information for children of childRef
parentRef
- - NodeRef
instance of child nodechildRef
- - NodeRef
instance of parent of the childRef
nodeService
- - NodeService
instance to get properties and checking other stateslog
- - Log
instance to put log for appropriate classpublic void setTransferSummaryReport(TransferSummaryReport transferSummaryReport)
public TransferSummaryReport getTransferSummaryReport()
getTransferSummaryReport
in interface TransferSummaryAware
protected void logSummaryComment(String message)
protected void logSummaryCreated(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef newParentNode, String parentPath, boolean orphan)
protected void logSummaryDeleted(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String parentPath)
protected void logSummaryUpdated(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String newPath)
Copyright © 2005–2017 Alfresco Software. All rights reserved.