summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/agent/AgentImplementation.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-10-03 17:30:41 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-10-03 17:30:41 +0200
commit275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (patch)
treeddcc6b14077d90d1b970b67829f07120547dbb62 /src/main/java/com/c2kernel/entity/agent/AgentImplementation.java
parenta139f95bfeca603333b8c0310ae09c6805e58584 (diff)
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.
Diffstat (limited to 'src/main/java/com/c2kernel/entity/agent/AgentImplementation.java')
-rw-r--r--src/main/java/com/c2kernel/entity/agent/AgentImplementation.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/c2kernel/entity/agent/AgentImplementation.java b/src/main/java/com/c2kernel/entity/agent/AgentImplementation.java
index c9eee73..97f5ae4 100644
--- a/src/main/java/com/c2kernel/entity/agent/AgentImplementation.java
+++ b/src/main/java/com/c2kernel/entity/agent/AgentImplementation.java
@@ -20,9 +20,9 @@
*/
package com.c2kernel.entity.agent;
-import com.c2kernel.common.CannotManageException;
+import com.c2kernel.common.CannotManage;
import com.c2kernel.common.ObjectCannotBeUpdated;
-import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.ObjectNotFound;
import com.c2kernel.common.SystemKey;
import com.c2kernel.entity.AgentOperations;
import com.c2kernel.entity.ItemImplementation;
@@ -77,22 +77,22 @@ public class AgentImplementation extends ItemImplementation implements
}
@Override
- public void addRole(String roleName) throws CannotManageException, ObjectNotFoundException {
+ public void addRole(String roleName) throws CannotManage, ObjectNotFound {
RolePath newRole = Gateway.getLookup().getRolePath(roleName);
try {
Gateway.getLookupManager().addRole(mAgentPath, newRole);
} catch (ObjectCannotBeUpdated ex) {
- throw new CannotManageException("Could not update role");
+ throw new CannotManage("Could not update role");
}
}
@Override
- public void removeRole(String roleName) throws CannotManageException, ObjectNotFoundException {
+ public void removeRole(String roleName) throws CannotManage, ObjectNotFound {
RolePath rolePath = Gateway.getLookup().getRolePath(roleName);
try {
Gateway.getLookupManager().removeRole(mAgentPath, rolePath);
} catch (ObjectCannotBeUpdated ex) {
- throw new CannotManageException("Could not update role");
+ throw new CannotManage("Could not update role");
}
}