summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/RolePath.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-30 23:03:03 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-30 23:03:03 +0200
commit2495be9ecfa8aea47e285f63b5bb27b0c133b1f8 (patch)
treed85f6df165386a86683de6ccee4c1767723573dd /src/main/java/com/c2kernel/lookup/RolePath.java
parentdc2bbfdda8ee4f32937c3e91f77e52dc4501f0f1 (diff)
Separated modifying Lookup methods into LookupManager, which is only
present in a server process. This stops clients trying to write to the directory without relying on their permissions.
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/RolePath.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/RolePath.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/c2kernel/lookup/RolePath.java b/src/main/java/com/c2kernel/lookup/RolePath.java
index bd23991..fa37fb3 100644
--- a/src/main/java/com/c2kernel/lookup/RolePath.java
+++ b/src/main/java/com/c2kernel/lookup/RolePath.java
@@ -13,6 +13,7 @@ package com.c2kernel.lookup;
import java.util.ArrayList;
import java.util.Iterator;
+import com.c2kernel.common.CannotManageException;
import com.c2kernel.common.ObjectCannotBeUpdated;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.process.Gateway;
@@ -51,10 +52,11 @@ public class RolePath extends DomainPath
* @param hasJobList The hasJobList to set.
* @throws ObjectCannotBeUpdated
* @throws ObjectNotFoundException
+ * @throws CannotManageException
*/
- public void setHasJobList(boolean hasJobList) throws ObjectNotFoundException, ObjectCannotBeUpdated {
+ public void setHasJobList(boolean hasJobList) throws ObjectNotFoundException, ObjectCannotBeUpdated, CannotManageException {
this.hasJobList = hasJobList;
- Gateway.getLookup().setHasJobList(this, hasJobList);
+ Gateway.getLookupManager().setHasJobList(this, hasJobList);
}
@@ -80,12 +82,12 @@ public class RolePath extends DomainPath
}
}
- public void addAgent(AgentPath agent) throws ObjectCannotBeUpdated, ObjectNotFoundException {
- Gateway.getLookup().addRole(agent, this);
+ public void addAgent(AgentPath agent) throws ObjectCannotBeUpdated, CannotManageException, ObjectNotFoundException {
+ Gateway.getLookupManager().addRole(agent, this);
}
- public void removeAgent(AgentPath agent) throws ObjectCannotBeUpdated, ObjectNotFoundException {
- Gateway.getLookup().removeRole(agent, this);
+ public void removeAgent(AgentPath agent) throws ObjectCannotBeUpdated, CannotManageException, ObjectNotFoundException {
+ Gateway.getLookupManager().removeRole(agent, this);
}
@Override