public Map<Location, Property> on( Collection<Location> locations ) {
CheckArg.isNotNull(locations, "locations");
final List<ReadPropertyRequest> requests = new LinkedList<ReadPropertyRequest>();
String workspace = getCurrentWorkspaceName();
for (Location location : locations) {
requests.add(new ReadPropertyRequest(location, workspace, name));
}
return execute(requests);
}
public Map<Location, Property> on( Location first,
Location... additional ) {
CheckArg.isNotNull(first, "first");
final List<ReadPropertyRequest> requests = new LinkedList<ReadPropertyRequest>();
String workspace = getCurrentWorkspaceName();
requests.add(new ReadPropertyRequest(first, workspace, name));
for (Location location : additional) {
requests.add(new ReadPropertyRequest(location, workspace, name));
}
return execute(requests);
}
public Map<Location, Property> on( String first,
String... additional ) {
CheckArg.isNotNull(first, "first");
final List<ReadPropertyRequest> requests = new LinkedList<ReadPropertyRequest>();
String workspace = getCurrentWorkspaceName();
requests.add(new ReadPropertyRequest(Location.create(createPath(first)), workspace, name));
for (String path : additional) {
requests.add(new ReadPropertyRequest(Location.create(createPath(path)), workspace, name));
}
return execute(requests);
}
public Map<Location, Property> on( Path first,
Path... additional ) {
CheckArg.isNotNull(first, "first");
final List<ReadPropertyRequest> requests = new LinkedList<ReadPropertyRequest>();
String workspace = getCurrentWorkspaceName();
requests.add(new ReadPropertyRequest(Location.create(first), workspace, name));
for (Path path : additional) {
requests.add(new ReadPropertyRequest(Location.create(path), workspace, name));
}
return execute(requests);
}
public Map<Location, Property> on( UUID first,
UUID... additional ) {
CheckArg.isNotNull(first, "first");
final List<ReadPropertyRequest> requests = new LinkedList<ReadPropertyRequest>();
String workspace = getCurrentWorkspaceName();
requests.add(new ReadPropertyRequest(Location.create(first), workspace, name));
for (UUID uuid : additional) {
requests.add(new ReadPropertyRequest(Location.create(uuid), workspace, name));
}
return execute(requests);
}
protected Map<Location, Property> execute( List<ReadPropertyRequest> requests ) {