public void execute() {
Pair<List<? extends Configuration>, Integer> result = _mgr.searchForConfigurations(this);
ListResponse<ConfigurationResponse> response = new ListResponse<ConfigurationResponse>();
List<ConfigurationResponse> configResponses = new ArrayList<ConfigurationResponse>();
for (Configuration cfg : result.first()) {
ConfigurationResponse cfgResponse = _responseGenerator.createConfigurationResponse(cfg);
cfgResponse.setObjectName("configuration");
if (getZoneId() != null) {
cfgResponse.setScope("zone");
}
if (getClusterId() != null) {
cfgResponse.setScope("cluster");
}
if (getStoragepoolId() != null) {
cfgResponse.setScope("storagepool");
}
if (getAccountId() != null) {
cfgResponse.setScope("account");
}
configResponses.add(cfgResponse);
}
response.setResponses(configResponses, result.second());