mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Cleaned up a seriously unnecessary ugliness.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4378 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -252,11 +252,11 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
final ActionImpl action = new ActionImpl(null,
|
||||
GUID.generate(),
|
||||
AVMRevertListAction.NAME);
|
||||
VersionPathStuffer stuffer = new VersionPathStuffer();
|
||||
stuffer.add(-1, "area:/a/b");
|
||||
String nodeList = stuffer.toString();
|
||||
List<Pair<Integer, String>> versionPaths =
|
||||
new ArrayList<Pair<Integer, String>>();
|
||||
versionPaths.add(new Pair<Integer, String>(-1, "area:/a/b"));
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_VERSION, fService.getLatestSnapshotID("area"));
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_NODE_LIST, nodeList);
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_NODE_LIST, (Serializable)versionPaths);
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_FLATTEN, true);
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_STORE, "area");
|
||||
action.setParameterValue(AVMRevertListAction.PARAM_STAGING, "main");
|
||||
@@ -304,10 +304,10 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
final ActionImpl action = new ActionImpl(null,
|
||||
GUID.generate(),
|
||||
AVMUndoSandboxListAction.NAME);
|
||||
VersionPathStuffer stuffer = new VersionPathStuffer();
|
||||
stuffer.add(-1, "area:/a/b/c/bar");
|
||||
String nodeList = stuffer.toString();
|
||||
action.setParameterValue(AVMUndoSandboxListAction.PARAM_NODE_LIST, nodeList);
|
||||
List<Pair<Integer, String>> versionPaths =
|
||||
new ArrayList<Pair<Integer, String>>();
|
||||
versionPaths.add(new Pair<Integer, String>(-1, "area:/a/b/c/bar"));
|
||||
action.setParameterValue(AVMUndoSandboxListAction.PARAM_NODE_LIST, (Serializable)versionPaths);
|
||||
final AVMUndoSandboxListAction revert = (AVMUndoSandboxListAction)fContext.getBean("avm-undo-list");
|
||||
class TxnWork implements TransactionUtil.TransactionWork<Object>
|
||||
{
|
||||
|
@@ -8,7 +8,6 @@ import java.util.List;
|
||||
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.avm.util.VersionPathUnstuffer;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
||||
@@ -62,9 +61,8 @@ public class AVMRevertListAction extends ActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
int revertVersion = (Integer)action.getParameterValue(PARAM_VERSION);
|
||||
String packedNodes = (String)action.getParameterValue(PARAM_NODE_LIST);
|
||||
VersionPathUnstuffer unstuffer = new VersionPathUnstuffer(packedNodes);
|
||||
List<Pair<Integer, String>> versionPaths = unstuffer.getVersionPaths();
|
||||
List<Pair<Integer, String>> versionPaths =
|
||||
(List<Pair<Integer, String>>)action.getParameterValue(PARAM_NODE_LIST);
|
||||
List<AVMDifference> diffs = new ArrayList<AVMDifference>();
|
||||
for (Pair<Integer, String> item : versionPaths)
|
||||
{
|
||||
@@ -99,7 +97,7 @@ public class AVMRevertListAction extends ActionExecuterAbstractBase
|
||||
getParamDisplayLabel(PARAM_VERSION)));
|
||||
paramList.add(
|
||||
new ParameterDefinitionImpl(PARAM_NODE_LIST,
|
||||
DataTypeDefinition.TEXT,
|
||||
DataTypeDefinition.ANY,
|
||||
true,
|
||||
getParamDisplayLabel(PARAM_NODE_LIST)));
|
||||
paramList.add(
|
||||
|
@@ -8,12 +8,10 @@ import java.util.List;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.avm.util.VersionPathUnstuffer;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.Pair;
|
||||
@@ -49,9 +47,8 @@ public class AVMUndoSandboxListAction extends ActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
String packedNodes = (String)action.getParameterValue(PARAM_NODE_LIST);
|
||||
VersionPathUnstuffer unstuffer = new VersionPathUnstuffer(packedNodes);
|
||||
List<Pair<Integer, String>> versionPaths = unstuffer.getVersionPaths();
|
||||
List<Pair<Integer, String>> versionPaths =
|
||||
(List<Pair<Integer, String>>)action.getParameterValue(PARAM_NODE_LIST);
|
||||
for (Pair<Integer, String> item : versionPaths)
|
||||
{
|
||||
AVMNodeDescriptor desc = fAVMService.lookup(-1, item.getSecond(), true);
|
||||
@@ -80,7 +77,7 @@ public class AVMUndoSandboxListAction extends ActionExecuterAbstractBase
|
||||
{
|
||||
paramList.add(
|
||||
new ParameterDefinitionImpl(PARAM_NODE_LIST,
|
||||
DataTypeDefinition.TEXT,
|
||||
DataTypeDefinition.ANY,
|
||||
true,
|
||||
getParamDisplayLabel(PARAM_NODE_LIST)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user