- public Object toSerializable() {
- return PersistentMessages.Modification.newBuilder().setType(this.getClass().toString())
- .setPath(InstanceIdentifierUtils.toSerializable(this.path)).build();
+ public void writeExternal(final ObjectOutput out) throws IOException {
+ SerializationUtils.writePath(out, getPath());
+ }
+
+ @Override
+ public void writeTo(final NormalizedNodeDataOutput out) throws IOException {
+ out.writeYangInstanceIdentifier(getPath());
+ }
+
+ @Deprecated
+ public static DeleteModification fromStream(final ObjectInput in, final short version) {
+ DeleteModification mod = new DeleteModification(version);
+ try {
+ mod.readExternal(in);
+ } catch (IOException e) {
+ throw new IllegalArgumentException("Error deserializing DeleteModification", e);
+ }
+ return mod;