summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-12 11:36:57 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-23 14:18:59 +0200
commit4c4da2ce679efc0d53b7e62fa26d43c164cae7d4 (patch)
treedff764ff8fe72c1ca66d5d65228798b938f37e4d /src
parentc45ee34928eaa7d148c60fb520f279362414af5a (diff)
Combine various Lookup.search methods into a general search(Path,
Property...)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyManager.java2
-rw-r--r--src/main/java/com/c2kernel/lookup/Lookup.java19
2 files changed, 3 insertions, 18 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
index 2b2e0e9..ae02fc5 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
@@ -40,7 +40,7 @@ public class ProxyManager
{
Logger.msg(5, "ProxyManager - Starting.....");
- Iterator<Path> servers = Gateway.getLookup().searchEntities(new DomainPath("/servers"));
+ Iterator<Path> servers = Gateway.getLookup().search(new DomainPath("/servers"));
while(servers.hasNext()) {
Path thisServerPath = servers.next();
try {
diff --git a/src/main/java/com/c2kernel/lookup/Lookup.java b/src/main/java/com/c2kernel/lookup/Lookup.java
index d71034f..1c7c6c7 100644
--- a/src/main/java/com/c2kernel/lookup/Lookup.java
+++ b/src/main/java/com/c2kernel/lookup/Lookup.java
@@ -7,6 +7,7 @@ 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.Property;
import com.c2kernel.property.PropertyDescriptionList;
/**
@@ -115,7 +116,7 @@ public interface Lookup {
* @param propvalue The property value to search for
* @return An Iterator of matching Paths
*/
- public Iterator<Path> search(Path start, String propname, String propvalue);
+ public Iterator<Path> search(Path start, Property... props);
/**
* Search for Items of a particular type, based on its PropertyDescription outcome
@@ -124,22 +125,6 @@ public interface Lookup {
* @return An Iterator of matching Paths
*/
public Iterator<Path> search(Path start, PropertyDescriptionList props);
-
- /**
- * Find all ItemPaths in a given subtree of the directory.
- *
- * @param start Search root
- * @return An Iterator of matching Paths
- */
- public Iterator<Path> searchEntities(Path start);
-
- /**
- * Find all DomainPaths in a given subtree of the directory
- *
- * @param start Search root
- * @return An Iterator of matching Paths
- */
- public Iterator<Path> searchAliases(DomainPath start);
/**
* Find all DomainPaths that are aliases for a particular Item or Agent