summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/Lookup.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:02:07 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:02:07 +0200
commitd4fa3bd9dd48f4d5e26850a23f5ba48a9c10ad64 (patch)
tree5ad7bfbce8ba9df9aad53ef33a8b908ca0680fc4 /src/main/java/com/c2kernel/lookup/Lookup.java
parent8bb86312d4f07dcb343ca2d212f4020906dbdb52 (diff)
LDAP refactored behind interfaces. All functions of LDAP now hidden
behind interfaces: Authenticator, Lookup and NextKeyManager (LDAP property storage was already a ClusterStorage). Gateway holds additional objects, and Fixes #26 #191. Refs #27 (needs additional work for read perms and auth tokens)
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/Lookup.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/Lookup.java77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/main/java/com/c2kernel/lookup/Lookup.java b/src/main/java/com/c2kernel/lookup/Lookup.java
new file mode 100644
index 0000000..026ad19
--- /dev/null
+++ b/src/main/java/com/c2kernel/lookup/Lookup.java
@@ -0,0 +1,77 @@
+package com.c2kernel.lookup;
+
+import java.security.NoSuchAlgorithmException;
+import java.util.Iterator;
+
+import com.c2kernel.common.ObjectAlreadyExistsException;
+import com.c2kernel.common.ObjectCannotBeUpdated;
+import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.process.auth.Authenticator;
+import com.c2kernel.property.PropertyDescriptionList;
+
+public interface Lookup {
+
+ public void initializeDirectory() throws ObjectNotFoundException;
+
+ public void open(Authenticator user);
+
+ public void close();
+
+ // Path resolution
+
+ public Class<?> getItemClass(Path path) throws ObjectNotFoundException;
+
+ public ItemPath resolvePath(DomainPath domainPath) throws InvalidItemPathException, ObjectNotFoundException;
+
+ public org.omg.CORBA.Object resolve(Path path) throws ObjectNotFoundException;
+
+ // Path management
+
+ public void add(Path newPath) throws ObjectCannotBeUpdated, ObjectAlreadyExistsException;
+
+ public void delete(Path path) throws ObjectCannotBeUpdated;
+
+ // Path finding and searching
+
+ public boolean exists(Path path);
+
+ public Iterator<Path> getChildren(Path path);
+
+ public Iterator<Path> search(Path path, String name);
+
+ public Iterator<Path> search(Path start, String propname, String propvalue);
+
+ public Iterator<Path> search(Path start, PropertyDescriptionList props);
+
+ public Iterator<Path> searchEntities(Path path);
+
+ public Iterator<Path> searchAliases(DomainPath start);
+
+ public Iterator<Path> searchAliases(ItemPath itemPath);
+
+ // Role and agent management
+
+ public AgentPath getAgentPath(String agentName) throws ObjectNotFoundException;
+
+ public RolePath getRolePath(String roleName) throws ObjectNotFoundException;
+
+ public RolePath createRole(String role, boolean b) throws ObjectAlreadyExistsException, ObjectCannotBeUpdated;
+
+ public void addRole(AgentPath agent, RolePath rolePath) throws ObjectCannotBeUpdated, ObjectNotFoundException;
+
+ public AgentPath[] getAgents(RolePath rolePath) throws ObjectNotFoundException;
+
+ public RolePath[] getRoles(AgentPath agentPath);
+
+ public boolean hasRole(AgentPath agentPath, RolePath role);
+
+ public void removeRole(AgentPath agent, RolePath role) throws ObjectCannotBeUpdated, ObjectNotFoundException;
+
+ public String getAgentName(AgentPath agentPath) throws ObjectNotFoundException;
+
+ public void setAgentPassword(AgentPath agent, String newPassword) throws ObjectNotFoundException, ObjectCannotBeUpdated, NoSuchAlgorithmException;
+
+ public void setHasJobList(RolePath role, boolean hasJobList) throws ObjectNotFoundException, ObjectCannotBeUpdated;
+
+
+}