mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Exported some Repo functionality via RMI. First (still broken) Repo
based CLT. Some cleanup and modification to other CLTs. WIP. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4500 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -12,6 +12,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* Copy out a file or a directory recursively from the repository
|
||||
@@ -40,13 +41,9 @@ public class AVMCopyOut extends CltBase
|
||||
{
|
||||
fVerbose = false;
|
||||
}
|
||||
String [] versionPath = args.get(0).split("@");
|
||||
if (versionPath.length != 2)
|
||||
{
|
||||
usage(USAGE);
|
||||
}
|
||||
String path = versionPath[0];
|
||||
int version = Integer.parseInt(versionPath[1]);
|
||||
Pair<String, Integer> versionPath = splitPathVersion(args.get(0));
|
||||
String path = versionPath.getFirst();
|
||||
int version = versionPath.getSecond();
|
||||
AVMNodeDescriptor desc = fAVMRemote.lookup(version, path);
|
||||
if (flags.containsKey("-r"))
|
||||
{
|
||||
@@ -55,13 +52,13 @@ public class AVMCopyOut extends CltBase
|
||||
}
|
||||
if (desc == null)
|
||||
{
|
||||
System.err.println(versionPath[0] + " does not exist.");
|
||||
System.err.println(path + " does not exist.");
|
||||
fContext.close();
|
||||
System.exit(1);
|
||||
}
|
||||
if (!desc.isFile())
|
||||
{
|
||||
System.err.println(versionPath[0] + " is not a file.");
|
||||
System.err.println(path + " is not a file.");
|
||||
fContext.close();
|
||||
System.exit(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user