diff options
Diffstat (limited to 'src/main/java/com/c2kernel/entity/transfer/TransferItem.java')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/transfer/TransferItem.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/main/java/com/c2kernel/entity/transfer/TransferItem.java b/src/main/java/com/c2kernel/entity/transfer/TransferItem.java index 520063a..9a4cfc5 100644 --- a/src/main/java/com/c2kernel/entity/transfer/TransferItem.java +++ b/src/main/java/com/c2kernel/entity/transfer/TransferItem.java @@ -2,14 +2,14 @@ package com.c2kernel.entity.transfer; import java.io.File;
import java.util.ArrayList;
-import java.util.Enumeration;
+import java.util.Iterator;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.entity.TraceableEntity;
import com.c2kernel.lifecycle.instance.Workflow;
import com.c2kernel.lookup.DomainPath;
-import com.c2kernel.lookup.EntityPath;
+import com.c2kernel.lookup.ItemPath;
import com.c2kernel.lookup.Path;
import com.c2kernel.persistency.ClusterStorage;
import com.c2kernel.persistency.outcome.Outcome;
@@ -26,7 +26,7 @@ public class TransferItem { public TransferItem() throws Exception {
try {
- importAgentId = Gateway.getLDAPLookup().getRoleManager().getAgentPath("system").getSysKey();
+ importAgentId = Gateway.getLookup().getAgentPath("system").getSysKey();
} catch (ObjectNotFoundException e) {
Logger.error("TransferItem - System user not found!");
throw e;
@@ -37,9 +37,9 @@ public class TransferItem { this.sysKey = sysKey;
domainPaths = new ArrayList<String>();
Property name = (Property)Gateway.getStorage().get(sysKey, ClusterStorage.PROPERTY + "/Name", null);
- Enumeration<Path> paths = Gateway.getLDAPLookup().search(new DomainPath(), name.getValue());
- while (paths.hasMoreElements()) {
- DomainPath thisPath = (DomainPath)paths.nextElement();
+ Iterator<Path> paths = Gateway.getLookup().search(new DomainPath(), name.getValue());
+ while (paths.hasNext()) {
+ DomainPath thisPath = (DomainPath)paths.next();
domainPaths.add(thisPath.toString());
}
}
@@ -89,9 +89,9 @@ public class TransferItem { }
// create item
- EntityPath entityPath = new EntityPath(sysKey);
+ ItemPath entityPath = new ItemPath(sysKey);
TraceableEntity newItem = (TraceableEntity)Gateway.getCorbaServer().createEntity(entityPath);
- Gateway.getLDAPLookup().add(entityPath);
+ Gateway.getLookup().add(entityPath);
PropertyArrayList props = new PropertyArrayList();
Workflow wf = null;
@@ -107,7 +107,10 @@ public class TransferItem { throw new Exception("No workflow found in import for "+sysKey);
// init item
- newItem.initialise(importAgentId, Gateway.getMarshaller().marshall(props), Gateway.getMarshaller().marshall(wf.search("workflow/domain")));
+ newItem.initialise(importAgentId,
+ Gateway.getMarshaller().marshall(props),
+ Gateway.getMarshaller().marshall(wf.search("workflow/domain")),
+ null);
// store objects
importByType(ClusterStorage.COLLECTION, objects);
@@ -118,7 +121,7 @@ public class TransferItem { // add domPaths
for (String element : domainPaths) {
DomainPath newPath = new DomainPath(element, entityPath);
- Gateway.getLDAPLookup().add(newPath);
+ Gateway.getLookup().add(newPath);
}
}
|
