From a1f0ecbb6a2bea6aa214322c412af2f3c5ce124b Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 7 May 2014 17:33:13 +0200 Subject: Agent now extends Item, so they can have workflows. All traces of the old 'Entity' superclasses should be removed, including proxies and paths. Very large change, breaks API compatibility with CRISTAL 2.x. Fixes #135 --- src/main/java/com/c2kernel/entity/CorbaServer.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/CorbaServer.java') diff --git a/src/main/java/com/c2kernel/entity/CorbaServer.java b/src/main/java/com/c2kernel/entity/CorbaServer.java index 3d7c79b..4a129ae 100644 --- a/src/main/java/com/c2kernel/entity/CorbaServer.java +++ b/src/main/java/com/c2kernel/entity/CorbaServer.java @@ -14,8 +14,8 @@ import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.entity.agent.ActiveEntity; import com.c2kernel.entity.agent.ActiveLocator; import com.c2kernel.lookup.AgentPath; -import com.c2kernel.lookup.EntityPath; -import com.c2kernel.lookup.InvalidEntityPathException; +import com.c2kernel.lookup.ItemPath; +import com.c2kernel.lookup.InvalidItemPathException; import com.c2kernel.process.Gateway; import com.c2kernel.utils.Logger; import com.c2kernel.utils.SoftCache; @@ -31,14 +31,14 @@ import com.c2kernel.utils.SoftCache; public class CorbaServer { - private final Map mEntityCache; + private final Map mEntityCache; private POA mRootPOA; private POA mItemPOA; private POA mAgentPOA; private POAManager mPOAManager; public CorbaServer() throws InvalidDataException { - mEntityCache = new SoftCache(50); + mEntityCache = new SoftCache(50); // init POA try { @@ -119,7 +119,7 @@ public class CorbaServer { **************************************************************************/ private Servant getEntity(int sysKey, org.omg.PortableServer.POA poa) throws ObjectNotFoundException { try { - EntityPath entityPath = new EntityPath(sysKey); + ItemPath entityPath = new ItemPath(sysKey); Servant entity = null; synchronized (mEntityCache) { entity = mEntityCache.get(entityPath); @@ -141,7 +141,7 @@ public class CorbaServer { } return entity; - } catch (InvalidEntityPathException ex) { + } catch (InvalidItemPathException ex) { throw new ObjectNotFoundException("Invalid Entity Key", ""); } } @@ -164,7 +164,7 @@ public class CorbaServer { * @param entityPath * @return */ - public Servant createEntity(EntityPath entityPath) throws CannotManageException, ObjectAlreadyExistsException { + public Servant createEntity(ItemPath entityPath) throws CannotManageException, ObjectAlreadyExistsException { try { if (entityPath == null) entityPath = Gateway.getLDAPLookup().getNextKeyManager().generateNextEntityKey(); -- cgit v1.2.3