use of org.codice.ddf.admin.query.dev.system.fields.ServiceReferenceField 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.ServiceReferenceField in project admin-console-beta by connexta.
the class BundleUtils method populateServiceRef.
private void populateServiceRef(ReferenceMetadata refMeta, Bundle bundle, BundleField toPopulate) {
String searchFilter = formatFilter(refMeta.getFilter());
List<ServiceReference> refs = new ArrayList<>();
try {
refs.addAll(getServiceReferences(refMeta.getInterface(), searchFilter));
} catch (InvalidSyntaxException e) {
LOGGER.warn("Failed to parse filter for bundle {} during service reference look up. Filter was {}.", bundle.getSymbolicName(), searchFilter);
}
for (ServiceReference ref : refs) {
toPopulate.addServiceRef(new ServiceReferenceField().serviceInterface(refMeta.getInterface()).filter(searchFilter).resolution(refMeta.getAvailability()).service(createServiceField(ref)));
}
}
Aggregations