From 9bd010f09cff41f5d25763406a0ac4d61815a8c5 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 9 Apr 2014 16:37:26 +0200 Subject: Expanded server predefined steps to include server and agent maintenance steps. Fixes #174 Fixed schema of CreateNewItem and CreateNewAgent. --- .../java/com/c2kernel/lifecycle/instance/predefined/Erase.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/main/java/com/c2kernel/lifecycle/instance/predefined/Erase.java') diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/Erase.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/Erase.java index 84b1b78..c26d5b8 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/Erase.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/Erase.java @@ -22,9 +22,7 @@ import com.c2kernel.lookup.AgentPath; import com.c2kernel.lookup.DomainPath; import com.c2kernel.lookup.EntityPath; import com.c2kernel.lookup.Path; -import com.c2kernel.persistency.ClusterStorage; import com.c2kernel.process.Gateway; -import com.c2kernel.property.Property; import com.c2kernel.utils.Logger; @@ -53,12 +51,8 @@ public class Erase extends PredefinedStep try { EntityPath entityPath = getItemEntityPath(); - // FIXME: This should search for the entity key. Name shouldn't be unique. - // find entity name - Property name = (Property)Gateway.getStorage().get(entityPath.getSysKey(), ClusterStorage.PROPERTY+"/Name", null); - // get all domain paths - Enumeration domPaths = Gateway.getLDAPLookup().search(new DomainPath(), name.getValue()); + Enumeration domPaths = Gateway.getLDAPLookup().searchAliases(new EntityPath(entityPath.getSysKey())); while (domPaths.hasMoreElements()) { DomainPath path = (DomainPath)domPaths.nextElement(); // delete them -- cgit v1.2.3