mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX to HEAD (4.2)
54937: MNT-9570: Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2) 54848: Merged DEV to V4.1-BUG-FIX (4.1.7) MNT-9538 : Upgrade changes cm:modified data for nodes in a workflow - Disabling/enabling auditable behavior around the FixBpmPackagesPatch patch git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55015 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -31,6 +31,7 @@ import org.alfresco.repo.admin.patch.PatchExecuter;
|
||||
import org.alfresco.repo.batch.BatchProcessWorkProvider;
|
||||
import org.alfresco.repo.batch.BatchProcessor;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.workflow.WorkflowModel;
|
||||
import org.alfresco.service.cmr.admin.PatchException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
@@ -66,6 +67,8 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
||||
private int batchSize = 1000;
|
||||
|
||||
private ImporterBootstrap importerBootstrap;
|
||||
|
||||
private BehaviourFilter policyFilter;
|
||||
|
||||
/**
|
||||
* @param batchThreads the number of threads that will write child association changes
|
||||
@@ -88,13 +91,20 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
||||
this.importerBootstrap = importerBootstrap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPolicyFilter(BehaviourFilter policyFilter) {
|
||||
this.policyFilter = policyFilter;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String applyInternal() throws Exception
|
||||
{
|
||||
|
||||
FixBpmPackagesPatchHelper helper = new FixBpmPackagesPatchHelper();
|
||||
try
|
||||
{
|
||||
// disable auditable behavior. MNT-9538 fix
|
||||
policyFilter.disableBehaviour(ContentModel.ASPECT_AUDITABLE);
|
||||
|
||||
StoreRef store = importerBootstrap.getStoreRef();
|
||||
if (store == null)
|
||||
{
|
||||
@@ -151,6 +161,9 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
||||
}
|
||||
finally
|
||||
{
|
||||
// enable auditable behavior. MNT-9538 fix
|
||||
policyFilter.enableBehaviour(ContentModel.ASPECT_AUDITABLE);
|
||||
|
||||
helper.closeWriter();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user