Changed AVMNodeConverter.ToAVMVersionPath() to return a

Pair<Integer, String>.  
Fixed avm.jsp which got busted by last checkin.
Added implementation of AddChild to AVMNodeService.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3983 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-30 17:51:15 +00:00
parent 0db9ace91f
commit c2e407165e
8 changed files with 136 additions and 107 deletions

View File

@@ -29,6 +29,7 @@ import org.alfresco.service.cmr.avmsync.AVMSyncException;
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;
/**
* An ActionExecuter that promotes content from one store to another.
@@ -75,9 +76,9 @@ public class SimpleAVMPromoteAction extends ActionExecuterAbstractBase
{
String targetStoreName = (String)action.getParameterValue(PARAM_TARGET_STORE);
// Crack the NodeRef.
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
int version = (Integer)avmVersionPath[0];
String path = (String)avmVersionPath[1];
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
int version = avmVersionPath.getFirst();
String path = avmVersionPath.getSecond();
// Get store name and path parts.
String [] storePath = path.split(":");
if (storePath.length != 2)

View File

@@ -31,6 +31,7 @@ import org.alfresco.service.cmr.avmsync.AVMSyncException;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.apache.log4j.Logger;
/**
@@ -89,9 +90,9 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
// Crack the NodeRef.
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
int version = (Integer)avmVersionPath[0];
String path = (String)avmVersionPath[1];
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
int version = avmVersionPath.getFirst();
String path = avmVersionPath.getSecond();
// Get store name and path parts.
String [] storePath = path.split(":");
if (storePath.length != 2)