mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Resolve ALF-4748 Provide config flag to control if replicated content is read-only (locked) on target
- replication-services-context.xml: replicationActionExecutor <property name="readOnly" value="true|false" /> - if property not defined, defaults to true git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -69,6 +69,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
||||
private ActionTrackingService actionTrackingService;
|
||||
private TransactionService transactionService;
|
||||
private ReplicationDefinitionPersisterImpl replicationDefinitionPersister;
|
||||
private Boolean readOnly;
|
||||
|
||||
/**
|
||||
* By default, we lock for 30 minutes
|
||||
@@ -134,6 +135,16 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
||||
this.replicationDefinitionPersister = replicationDefinitionPersister;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets transfer read only default value
|
||||
*
|
||||
* @param readOnly true => mark items in destination repository as read only
|
||||
*/
|
||||
public void setReadOnly(Boolean readOnly)
|
||||
{
|
||||
this.readOnly = readOnly;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
|
||||
// Not used - our definitions hold everything on them
|
||||
@@ -176,7 +187,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
||||
new TransferDefinition();
|
||||
transferDefinition.setNodes(toTransfer);
|
||||
transferDefinition.setSync(true);
|
||||
transferDefinition.setReadOnly(true);
|
||||
transferDefinition.setReadOnly(readOnly == null ? true : readOnly);
|
||||
|
||||
// Exclude aspects from transfer
|
||||
// NOTE: this list of aspects should be synced up with the NodeCrawler in expandPayload to
|
||||
|
Reference in New Issue
Block a user