fix/MNT-24891-BackPort - Skip actionContext to classify as an adhoc property in add-features action logic

This commit is contained in:
Belal Ansari
2025-04-08 19:55:20 +05:30
parent 6c044ae374
commit 3c565ea928
2 changed files with 10 additions and 11 deletions

View File

@@ -67,7 +67,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase
* Set the node service
*
* @param nodeService
* the node service
* the node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -78,7 +78,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase
* Set the transaction service
*
* @param transactionService
* the transaction service
* the transaction service
*/
public void setTransactionService(TransactionService transactionService)
{
@@ -102,8 +102,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase
if (this.nodeService.exists(actionedUponNodeRef))
{
transactionService.getRetryingTransactionHelper().doInTransaction(
new RetryingTransactionCallback<Void>()
{
new RetryingTransactionCallback<Void>() {
public Void execute() throws Throwable
{
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
@@ -137,8 +136,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase
nodeService.addAspect(actionedUponNodeRef, aspectQName, properties);
return null;
}
}
);
});
}
}

View File

@@ -28,6 +28,11 @@ package org.alfresco.repo.action.executer;
import java.util.List;
import java.util.Locale;
import org.junit.Before;
import org.junit.Test;
import org.springframework.extensions.surf.util.I18NUtil;
import org.springframework.transaction.annotation.Transactional;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionImpl;
import org.alfresco.repo.action.access.ActionAccessRestriction;
@@ -40,10 +45,6 @@ import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.BaseSpringTest;
import org.alfresco.util.GUID;
import org.junit.Before;
import org.junit.Test;
import org.springframework.extensions.surf.util.I18NUtil;
import org.springframework.transaction.annotation.Transactional;
/**
* Add features action execution test
@@ -102,7 +103,7 @@ public class AddFeaturesActionExecuterTest extends BaseSpringTest
QName.createQName("{test}testnode"),
ContentModel.TYPE_CONTENT).getChildRef();
// Get the executer instance
// Get the executer instance
this.executer = (AddFeaturesActionExecuter) this.applicationContext.getBean(AddFeaturesActionExecuter.NAME);
}