use of org.codice.ddf.admin.query.dev.system.fields.ServiceReferenceListField in project admin-console-beta by connexta.
the class CreateServiceDependencyGraph method populateGraphWithServices.
private void populateGraphWithServices(BundleField bundle, DirectedGraph graph, List<BundleField> allBundles) {
bundle.serviceRefs().forEach(ref -> createEdgeFromServiceRef(bundle, ref, graph, allBundles));
for (ServiceReferenceListField refList : bundle.serviceRefLists()) {
for (ServiceField service : refList.services()) {
ServiceReferenceField tempServRef = new ServiceReferenceField().serviceInterface(refList.referenceListInterface()).filter(refList.filter()).resolution(refList.resolution()).service(service);
createEdgeFromServiceRef(bundle, tempServRef, graph, allBundles);
}
}
}
use of org.codice.ddf.admin.query.dev.system.fields.ServiceReferenceListField in project admin-console-beta by connexta.
the class BundleUtils method populateServiceRefLists.
private void populateServiceRefLists(ReferenceListMetadata refListMeta, Bundle bundle, BundleField toPopulate) {
ServiceReferenceListField refListF = new ServiceReferenceListField();
String searchFilter = formatFilter(refListMeta.getFilter());
refListF.filter(searchFilter).referenceListInterface(refListMeta.getInterface()).resolution(refListMeta.getAvailability());
List<ServiceReference> refs = new ArrayList<>();
try {
refs.addAll(getServiceReferences(refListMeta.getInterface(), searchFilter));
} catch (InvalidSyntaxException e) {
LOGGER.warn("Failed to parse filter for bundle {} during service reference look up. Filter was {}.", bundle.getSymbolicName(), searchFilter);
}
refs.forEach(ref -> refListF.addService(createServiceField(ref)));
toPopulate.addServiceRefList(refListF);
}
Aggregations