use of org.forgerock.openam.sm.ServiceConfigQueryFilterVisitor in project OpenAM by OpenRock.
the class ScriptConfigurationDataStore method get.
@Override
public Set<ScriptConfiguration> get(QueryFilter<String> queryFilter) throws ScriptException {
final Set<ScriptConfiguration> scriptConfigurations = new LinkedHashSet<>();
try {
ServiceConfig config = getSubOrgConfig();
Set<String> uuids = config.getSubConfigNames();
for (String uuid : uuids) {
if (queryFilter.accept(new ServiceConfigQueryFilterVisitor(), config.getSubConfig(uuid))) {
scriptConfigurations.add(get(uuid));
}
}
config = getSubGlobalConfig();
uuids = config.getSubConfigNames();
for (String uuid : uuids) {
if (queryFilter.accept(new ServiceConfigQueryFilterVisitor(), config.getSubConfig(uuid))) {
scriptConfigurations.add(get(uuid));
}
}
} catch (SMSException | SSOException e) {
throw createAndLogError(logger, RETRIEVE_ALL_FAILED, e, realm);
} catch (UnsupportedOperationException e) {
throw createAndLogError(logger, ScriptErrorCode.valueOf(e.getMessage()), e);
}
return scriptConfigurations;
}
Aggregations