public void setSelectedHostnames(final List<String> hosts, final List<String> profiles, final boolean allowOneTimeHosts) {
// figure out which hosts exist in the system and which should be one-time hosts
JSONObject params = new JSONObject();
params.put("hostname__in", Utils.stringsToJSON(hosts));
hostDataSource.query(params, new DefaultDataCallback () {
@Override
public void onQueryReady(Query query) {
query.getPage(null, null, null, this);
}