Refactor constants relating to restconf-monitoring
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfDataServiceImpl.java
index cce8ebc8c1dafa8befe6399240399b6d4f84f2cb..5b12419e517580c033aced06f96d2cd295be0d57 100644 (file)
@@ -66,7 +66,6 @@ import org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfInvokeOperations
 import org.opendaylight.restconf.nb.rfc8040.streams.Configuration;
 import org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationListenerAdapter;
 import org.opendaylight.restconf.nb.rfc8040.utils.mapping.RestconfMappingNodeUtil;
-import org.opendaylight.restconf.nb.rfc8040.utils.parser.IdentifierCodec;
 import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
 import org.opendaylight.yang.gen.v1.urn.sal.restconf.event.subscription.rev140708.NotificationOutputTypeGrouping.NotificationOutputType;
 import org.opendaylight.yangtools.concepts.Immutable;
@@ -221,10 +220,8 @@ public class RestconfDataServiceImpl implements RestconfDataService {
                 listener.getSchemaPath().lastNodeIdentifier(), schemaContext.getNotifications(), null,
                 listener.getOutputType(), uri);
 
-        final String name = listener.getSchemaPath().lastNodeIdentifier().getLocalName();
         transaction.merge(LogicalDatastoreType.OPERATIONAL,
-            IdentifierCodec.deserialize(Rfc8040.MonitoringModule.PATH_TO_STREAM_WITHOUT_KEY + name, schemaContext),
-            mapToStreams);
+            Rfc8040.restconfStateStreamPath(mapToStreams.getIdentifier()), mapToStreams);
     }
 
     @Override