Move otn link update from renderer to SH
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / provisiondevice / OtnDeviceRenderingResult.java
index d773e017127e640da9c54b79630375c0480a5ad8..4441e9d6d043c381280fb91a881166b2893f6a3e 100644 (file)
@@ -11,30 +11,44 @@ package org.opendaylight.transportpce.renderer.provisiondevice;
 import java.util.Collections;
 import java.util.List;
 import org.opendaylight.transportpce.common.OperationResult;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210618.link.tp.LinkTp;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210618.node.interfaces.NodeInterface;
 
 public final class OtnDeviceRenderingResult extends OperationResult {
     private final List<NodeInterface> renderedNodeInterfaces;
+    private final List<LinkTp> otnLinkTps;
 
-    private OtnDeviceRenderingResult(boolean success, String message, List<NodeInterface> renderedNodeInterfaces) {
+
+    private OtnDeviceRenderingResult(boolean success, String message, List<NodeInterface> renderedNodeInterfaces,
+        List<LinkTp> otnLinkTps) {
         super(success, message);
         if (renderedNodeInterfaces != null) {
             this.renderedNodeInterfaces = Collections.unmodifiableList(renderedNodeInterfaces);
         } else {
             this.renderedNodeInterfaces = Collections.emptyList();
         }
+        if (otnLinkTps != null) {
+            this.otnLinkTps = Collections.unmodifiableList(otnLinkTps);
+        } else {
+            this.otnLinkTps = Collections.emptyList();
+        }
     }
 
     public List<NodeInterface> getRenderedNodeInterfaces() {
         return this.renderedNodeInterfaces;
     }
 
+    public List<LinkTp> getOtnLinkTps() {
+        return this.otnLinkTps;
+    }
+
     public static OtnDeviceRenderingResult failed(String message) {
-        return new OtnDeviceRenderingResult(false, message, null);
+        return new OtnDeviceRenderingResult(false, message, null, null);
     }
 
-    public static OtnDeviceRenderingResult ok(List<NodeInterface> renderedNodeInterfaces) {
-        return new OtnDeviceRenderingResult(true, "", renderedNodeInterfaces);
+    public static OtnDeviceRenderingResult ok(List<NodeInterface> renderedNodeInterfaces,
+            List<LinkTp> otnLinkTps) {
+        return new OtnDeviceRenderingResult(true, "", renderedNodeInterfaces, otnLinkTps);
     }
 
 }