import org.opendaylight.yangtools.yang.data.tree.impl.node.MutableTreeNode;
import org.opendaylight.yangtools.yang.data.tree.impl.node.TreeNode;
import org.opendaylight.yangtools.yang.data.tree.impl.node.Version;
-import org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-abstract class AbstractNodeContainerModificationStrategy<T extends WithStatus>
+abstract class AbstractNodeContainerModificationStrategy<T extends DataSchemaNode>
extends SchemaAwareApplyOperation<T> {
- abstract static class Invisible<T extends WithStatus> extends AbstractNodeContainerModificationStrategy<T> {
+ abstract static class Invisible<T extends DataSchemaNode> extends AbstractNodeContainerModificationStrategy<T> {
private final @NonNull SchemaAwareApplyOperation<T> entryStrategy;
Invisible(final NormalizedNodeContainerSupport<?, ?> support, final DataTreeConfiguration treeConfig,
}
}
- abstract static class Visible<T extends WithStatus> extends AbstractNodeContainerModificationStrategy<T> {
+ abstract static class Visible<T extends DataSchemaNode> extends AbstractNodeContainerModificationStrategy<T> {
private final @NonNull T schema;
Visible(final NormalizedNodeContainerSupport<?, ?> support, final DataTreeConfiguration treeConfig,
- final T schema) {
+ final T schema) {
super(support, treeConfig);
this.schema = requireNonNull(schema);
}
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeConfiguration;
import org.opendaylight.yangtools.yang.data.tree.impl.AbstractNodeContainerModificationStrategy.Visible;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
-import org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
*
* @param <T> Type of the container node
*/
-class DataNodeContainerModificationStrategy<T extends DataNodeContainer & WithStatus> extends Visible<T> {
+class DataNodeContainerModificationStrategy<T extends DataSchemaNode & DataNodeContainer> extends Visible<T> {
private static final Logger LOG = LoggerFactory.getLogger(DataNodeContainerModificationStrategy.class);
private static final VarHandle CHILDREN;
}
private ModificationApplyOperation resolveChild(final PathArgument identifier) {
- final T schema = getSchema();
+ final var schema = getSchema();
final var qname = identifier.getNodeType();
final var child = schema.dataChildByName(qname);
if (child == null) {
import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus;
import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-abstract class SchemaAwareApplyOperation<T extends WithStatus> extends ModificationApplyOperation {
+abstract class SchemaAwareApplyOperation<T extends DataSchemaNode> extends ModificationApplyOperation {
private static final Logger LOG = LoggerFactory.getLogger(SchemaAwareApplyOperation.class);
static ModificationApplyOperation from(final DataSchemaNode schemaNode,
Optional<? extends TreeNode> current, Version version) throws DataValidationFailedException;
/**
- * Return the {@link WithStatus}-subclass schema associated with this operation.
+ * Return the {@link DataSchemaNode}-subclass schema associated with this operation.
+ *
* @return A model node
*/
abstract @NonNull T getSchema();