mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
106496: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud) 106441: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.3) 106391: MNT-14209: Merged V4.2.1 (4.2.1.19) to V4.2-BUG-FIX (4.2.5) 106130: Merged DEV to V4.2.1 (4.2.1.19) 106126: MNT-14059 : Replication job reports list all content eligible for replication, not just content that was replicated that job run - added code for the a new simplified (summary) transfer report on the destination server side - updated the jUnit test to check that the new report is generated only when the property: transferservice.simple-report= true - reusing the same format as the old destination side report for the new simplified report, but have only the relevant content - did not modify/break compatibility of the code; did not changes methods in existing interfaces or communication protocols - added a property for the transfer summary report location git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@106632 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -48,7 +48,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* some utility methods for sub-classes.
|
||||
* @author Brian
|
||||
*/
|
||||
public abstract class AbstractManifestProcessorBase implements TransferManifestProcessor
|
||||
public abstract class AbstractManifestProcessorBase implements TransferManifestProcessor,TransferSummaryAware
|
||||
{
|
||||
private static final Log log = LogFactory.getLog(AbstractManifestProcessorBase.class);
|
||||
private static final String MSG_ERROR_WHILE_COMMITTING_TRANSFER = "transfer_service.receiver.error_committing_transfer";
|
||||
@@ -57,6 +57,7 @@ public abstract class AbstractManifestProcessorBase implements TransferManifestP
|
||||
private String transferId;
|
||||
private int targetEndProgress;
|
||||
private int currProgress;
|
||||
private TransferSummaryReport transferSummaryReport;
|
||||
|
||||
public AbstractManifestProcessorBase(TransferReceiver receiver, String transferId)
|
||||
{
|
||||
@@ -311,4 +312,60 @@ public abstract class AbstractManifestProcessorBase implements TransferManifestP
|
||||
|
||||
log.trace(message.toString());
|
||||
}
|
||||
|
||||
// summary report actions
|
||||
public void setTransferSummaryReport(TransferSummaryReport transferSummaryReport)
|
||||
{
|
||||
this.transferSummaryReport = transferSummaryReport;
|
||||
}
|
||||
|
||||
public TransferSummaryReport getTransferSummaryReport()
|
||||
{
|
||||
return transferSummaryReport;
|
||||
}
|
||||
|
||||
protected void logSummaryComment(String message)
|
||||
{
|
||||
TransferSummaryReport transferSummaryReport = getTransferSummaryReport();
|
||||
if (transferSummaryReport != null)
|
||||
{
|
||||
transferSummaryReport.logSummaryComment(message);
|
||||
}
|
||||
}
|
||||
|
||||
protected void logSummaryCreated(NodeRef sourceNode, NodeRef destNode, NodeRef newParentNode, String parentPath, boolean orphan)
|
||||
{
|
||||
TransferSummaryReport transferSummaryReport = getTransferSummaryReport();
|
||||
if (transferSummaryReport != null)
|
||||
{
|
||||
transferSummaryReport.logSummaryCreated(sourceNode, destNode, newParentNode, parentPath, orphan);
|
||||
}
|
||||
}
|
||||
|
||||
protected void logSummaryDeleted(NodeRef sourceNode, NodeRef destNode, String parentPath)
|
||||
{
|
||||
TransferSummaryReport transferSummaryReport = getTransferSummaryReport();
|
||||
if (transferSummaryReport != null)
|
||||
{
|
||||
transferSummaryReport.logSummaryDeleted(sourceNode, destNode, parentPath);
|
||||
}
|
||||
}
|
||||
|
||||
protected void logSummaryUpdated(NodeRef sourceNode, NodeRef destNode, String newPath)
|
||||
{
|
||||
TransferSummaryReport transferSummaryReport = getTransferSummaryReport();
|
||||
if (transferSummaryReport != null)
|
||||
{
|
||||
transferSummaryReport.logSummaryUpdated(sourceNode, destNode, newPath);
|
||||
}
|
||||
}
|
||||
|
||||
protected void logSummaryMoved(NodeRef sourceNode, NodeRef destNode, String oldPath, NodeRef newParent, String newPath)
|
||||
{
|
||||
TransferSummaryReport transferSummaryReport = getTransferSummaryReport();
|
||||
if (transferSummaryReport != null)
|
||||
{
|
||||
transferSummaryReport.logSummaryMoved(sourceNode, destNode, oldPath, newParent, newPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user