From 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 17:30:41 +0200 Subject: Huge exception overhaul: Merged ClusterStorageException with PersistencyException. Replaced MembershipException with InvalidCollectionModification CORBA Exception. Made all predef steps throw more accurate exceptions when they go wrong, and let more exceptions bubble through from underneath. --- .../com/c2kernel/entity/agent/ActiveEntity.java | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/agent/ActiveEntity.java') diff --git a/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java b/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java index 197a360..4f3f622 100644 --- a/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java +++ b/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java @@ -21,11 +21,12 @@ package com.c2kernel.entity.agent; import com.c2kernel.common.AccessRightsException; -import com.c2kernel.common.CannotManageException; -import com.c2kernel.common.InvalidDataException; -import com.c2kernel.common.InvalidTransitionException; -import com.c2kernel.common.ObjectAlreadyExistsException; -import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.common.CannotManage; +import com.c2kernel.common.InvalidCollectionModification; +import com.c2kernel.common.InvalidData; +import com.c2kernel.common.InvalidTransition; +import com.c2kernel.common.ObjectAlreadyExists; +import com.c2kernel.common.ObjectNotFound; import com.c2kernel.common.PersistencyException; import com.c2kernel.common.SystemKey; import com.c2kernel.entity.AgentPOA; @@ -85,7 +86,7 @@ public class ActiveEntity extends AgentPOA @Override public String queryData(String path) throws AccessRightsException, - ObjectNotFoundException, + ObjectNotFound, PersistencyException { synchronized (this) { @@ -107,14 +108,14 @@ public class ActiveEntity extends AgentPOA } @Override - public void addRole(String roleName) throws CannotManageException, ObjectNotFoundException { + public void addRole(String roleName) throws CannotManage, ObjectNotFound { synchronized (this) { mAgentImpl.addRole(roleName); } } @Override - public void removeRole(String roleName) throws CannotManageException, ObjectNotFoundException { + public void removeRole(String roleName) throws CannotManage, ObjectNotFound { synchronized (this) { mAgentImpl.removeRole(roleName); } @@ -123,7 +124,7 @@ public class ActiveEntity extends AgentPOA @Override public void initialise(SystemKey agentId, String propString, String initWfString, String initCollsString) throws AccessRightsException, - InvalidDataException, PersistencyException, ObjectNotFoundException { + InvalidData, PersistencyException, ObjectNotFound { synchronized (this) { mAgentImpl.initialise(agentId, propString, initWfString, initCollsString); } @@ -133,9 +134,9 @@ public class ActiveEntity extends AgentPOA @Override public String requestAction(SystemKey agentID, String stepPath, int transitionID, String requestData) throws AccessRightsException, - InvalidTransitionException, ObjectNotFoundException, - InvalidDataException, PersistencyException, - ObjectAlreadyExistsException { + InvalidTransition, ObjectNotFound, + InvalidData, PersistencyException, + ObjectAlreadyExists, InvalidCollectionModification { synchronized (this) { return mAgentImpl.requestAction(agentID, stepPath, transitionID, requestData); @@ -145,7 +146,7 @@ public class ActiveEntity extends AgentPOA @Override public String queryLifeCycle(SystemKey agentId, boolean filter) - throws AccessRightsException, ObjectNotFoundException, + throws AccessRightsException, ObjectNotFound, PersistencyException { synchronized (this) { return mAgentImpl.queryLifeCycle(agentId, filter); -- cgit v1.2.3