- @Deprecated
- public static WriteModification fromSerializable(final Object serializable) {
- PersistentMessages.Modification o = (PersistentMessages.Modification) serializable;
- Decoded decoded = new NormalizedNodeToNodeCodec(null).decode(o.getPath(), o.getData());
- return new WriteModification(decoded.getDecodedPath(), decoded.getDecodedNode());
- }
-
- public static WriteModification fromStream(ObjectInput in, short version)
- throws ClassNotFoundException, IOException {
- WriteModification mod = new WriteModification(version);
- mod.readExternal(in);
- return mod;
+ @Override
+ public void writeTo(final NormalizedNodeDataOutput out) throws IOException {
+ // FIXME: this should be inverted, as the path helps receivers in establishment of context
+ out.writeNormalizedNode(data);
+ out.writeYangInstanceIdentifier(getPath());