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:
@@ -71,6 +71,7 @@
|
|||||||
<property name="actionTrackingService" ref="actionTrackingService" />
|
<property name="actionTrackingService" ref="actionTrackingService" />
|
||||||
<property name="transactionService" ref="transactionService" />
|
<property name="transactionService" ref="transactionService" />
|
||||||
<property name="replicationDefinitionPersister" ref="replicationDefinitionPersister" />
|
<property name="replicationDefinitionPersister" ref="replicationDefinitionPersister" />
|
||||||
|
<property name="readOnly" value="true" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- JavaScript API support -->
|
<!-- JavaScript API support -->
|
||||||
|
@@ -69,6 +69,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
|||||||
private ActionTrackingService actionTrackingService;
|
private ActionTrackingService actionTrackingService;
|
||||||
private TransactionService transactionService;
|
private TransactionService transactionService;
|
||||||
private ReplicationDefinitionPersisterImpl replicationDefinitionPersister;
|
private ReplicationDefinitionPersisterImpl replicationDefinitionPersister;
|
||||||
|
private Boolean readOnly;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default, we lock for 30 minutes
|
* By default, we lock for 30 minutes
|
||||||
@@ -134,6 +135,16 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
|||||||
this.replicationDefinitionPersister = replicationDefinitionPersister;
|
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
|
@Override
|
||||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
|
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
|
||||||
// Not used - our definitions hold everything on them
|
// Not used - our definitions hold everything on them
|
||||||
@@ -176,7 +187,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
|
|||||||
new TransferDefinition();
|
new TransferDefinition();
|
||||||
transferDefinition.setNodes(toTransfer);
|
transferDefinition.setNodes(toTransfer);
|
||||||
transferDefinition.setSync(true);
|
transferDefinition.setSync(true);
|
||||||
transferDefinition.setReadOnly(true);
|
transferDefinition.setReadOnly(readOnly == null ? true : readOnly);
|
||||||
|
|
||||||
// Exclude aspects from transfer
|
// Exclude aspects from transfer
|
||||||
// NOTE: this list of aspects should be synced up with the NodeCrawler in expandPayload to
|
// NOTE: this list of aspects should be synced up with the NodeCrawler in expandPayload to
|
||||||
|
Reference in New Issue
Block a user