We are moving away from SchemaContext, start using its replacement.
Change-Id: If222b7ac2fa2004d1af72504d63b139cb42bd4ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
LOG.info("Shutdown of blueprint containers complete");
}
- private List<Bundle> getBundlesToDestroy(final Collection<Bundle> containerBundles) {
+ private static List<Bundle> getBundlesToDestroy(final Collection<Bundle> containerBundles) {
List<Bundle> bundlesToDestroy = new ArrayList<>();
// Find all container bundles that either have no registered services or whose services are no
return bundlesToDestroy;
}
- private @Nullable Bundle findBundleWithHighestUsedServiceId(final Collection<Bundle> containerBundles) {
+ private static @Nullable Bundle findBundleWithHighestUsedServiceId(final Collection<Bundle> containerBundles) {
ServiceReference<?> highestServiceRef = null;
for (Bundle bundle : containerBundles) {
ServiceReference<?>[] references = bundle.getRegisteredServices();
import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.osgi.service.blueprint.container.ComponentDefinitionException;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
}
public NormalizedNode<?, ?> parseDataElement(final Element element, final DataSchemaNode dataSchema,
- final SchemaContext schemaContext) throws XMLStreamException, IOException, ParserConfigurationException,
- SAXException, URISyntaxException {
+ final EffectiveModelContext schemaContext) throws XMLStreamException, IOException,
+ ParserConfigurationException, SAXException, URISyntaxException {
final NormalizedNodeResult resultHolder = new NormalizedNodeResult();
final NormalizedNodeStreamWriter writer = ImmutableNormalizedNodeStreamWriter.from(resultHolder);
final XmlParserStream xmlParser = XmlParserStream.create(writer, schemaContext, dataSchema);
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
@FunctionalInterface
public interface FallbackConfigProvider {
- NormalizedNode<?,?> get(SchemaContext schemaContext, DataSchemaNode dataSchema) throws IOException,
+ NormalizedNode<?,?> get(EffectiveModelContext schemaContext, DataSchemaNode dataSchema) throws IOException,
XMLStreamException, ParserConfigurationException, SAXException, URISyntaxException;
}
checkNotNull(schemaService, "%s: Could not obtain the SchemaService OSGi service", logName);
- SchemaContext schemaContext = schemaService.getGlobalContext();
+ EffectiveModelContext schemaContext = schemaService.getGlobalContext();
Module module = schemaContext.findModule(bindingContext.bindingQName.getModule()).orElse(null);
checkNotNull(module, "%s: Could not obtain the module schema for namespace %s, revision %s",
}
}
- private NormalizedNode<?, ?> parsePossibleDefaultAppConfigXMLFile(final SchemaContext schemaContext,
+ private NormalizedNode<?, ?> parsePossibleDefaultAppConfigXMLFile(final EffectiveModelContext schemaContext,
final DataSchemaNode dataSchema) throws ConfigXMLReaderException {
String appConfigFileName = defaultAppConfigFileName;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.osgi.service.blueprint.container.ComponentDefinitionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
}
- private @Nullable NormalizedNode<?, ?> parsePossibleDefaultAppConfigElement(final SchemaContext schemaContext,
- final DataSchemaNode dataSchema) throws URISyntaxException, IOException, ParserConfigurationException,
- SAXException, XMLStreamException {
+ private @Nullable NormalizedNode<?, ?> parsePossibleDefaultAppConfigElement(
+ final EffectiveModelContext schemaContext, final DataSchemaNode dataSchema) throws URISyntaxException,
+ IOException, ParserConfigurationException, SAXException, XMLStreamException {
if (defaultAppConfigElement == null) {
return null;
}