import static java.util.Objects.requireNonNull;
import javax.ws.rs.Path;
+import org.opendaylight.mdsal.dom.api.DOMMountPointService;
import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
import org.opendaylight.restconf.common.schema.SchemaExportContext;
-import org.opendaylight.restconf.nb.rfc8040.handlers.DOMMountPointServiceHandler;
import org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler;
import org.opendaylight.restconf.nb.rfc8040.services.simple.api.RestconfSchemaService;
import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
@Path("/")
public class RestconfSchemaServiceImpl implements RestconfSchemaService {
private final SchemaContextHandler schemaContextHandler;
- private final DOMMountPointServiceHandler domMountPointServiceHandler;
+ private final DOMMountPointService mountPointService;
private final DOMYangTextSourceProvider sourceProvider;
/**
- * Set {@link SchemaContextHandler} for getting actual {@link SchemaContext}
- * .
+ * Set {@link SchemaContextHandler} for getting actual {@link SchemaContext}.
*
* @param schemaContextHandler handling schema context
- * @param domMountPointServiceHandler handling dom mount point service
+ * @param mountPointService dom mount point service
*/
public RestconfSchemaServiceImpl(final SchemaContextHandler schemaContextHandler,
- final DOMMountPointServiceHandler domMountPointServiceHandler,
+ final DOMMountPointService mountPointService,
final DOMYangTextSourceProvider sourceProvider) {
this.schemaContextHandler = requireNonNull(schemaContextHandler);
- this.domMountPointServiceHandler = requireNonNull(domMountPointServiceHandler);
+ this.mountPointService = requireNonNull(mountPointService);
this.sourceProvider = requireNonNull(sourceProvider);
}
@Override
public SchemaExportContext getSchema(final String identifier) {
- return ParserIdentifier.toSchemaExportContextFromIdentifier(this.schemaContextHandler.get(), identifier,
- this.domMountPointServiceHandler.get(), sourceProvider);
+ return ParserIdentifier.toSchemaExportContextFromIdentifier(schemaContextHandler.get(), identifier,
+ mountPointService, sourceProvider);
}
}