Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / bpmn / infrastructure / aai / tasks / AAIFlagTasks.java
index 177e09d..12aade7 100644 (file)
@@ -35,83 +35,83 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class AAIFlagTasks {
-       private static final Logger logger = LoggerFactory.getLogger(AAIFlagTasks.class);
-       
-       @Autowired
-       private AAIVnfResources aaiVnfResources;
-       @Autowired
-       private ExceptionBuilder exceptionUtil;
-       @Autowired
-       private ExtractPojosForBB extractPojosForBB;
-       
-       public void checkVnfInMaintFlag(BuildingBlockExecution execution) {
-               boolean inMaint = false;
-               try {
-                       GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
-                       String vnfId = vnf.getVnfId();
-                       inMaint = aaiVnfResources.checkInMaintFlag(vnfId);
-               } catch (Exception ex) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
-               }
-               if (inMaint) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF is in maintenance in A&AI");
-               }
-       }       
-       
-       public void modifyVnfInMaintFlag(BuildingBlockExecution execution, boolean inMaint) {
-               try {
-                       GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+    private static final Logger logger = LoggerFactory.getLogger(AAIFlagTasks.class);
 
-                       GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();
+    @Autowired
+    private AAIVnfResources aaiVnfResources;
+    @Autowired
+    private ExceptionBuilder exceptionUtil;
+    @Autowired
+    private ExtractPojosForBB extractPojosForBB;
 
-                       copiedGenericVnf.setInMaint(inMaint);
-                       genericVnf.setInMaint(inMaint);
+    public void checkVnfInMaintFlag(BuildingBlockExecution execution) {
+        boolean inMaint = false;
+        try {
+            GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+            String vnfId = vnf.getVnfId();
+            inMaint = aaiVnfResources.checkInMaintFlag(vnfId);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+        if (inMaint) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF is in maintenance in A&AI");
+        }
+    }
 
-                       aaiVnfResources.updateObjectVnf(copiedGenericVnf);
-               } catch(Exception ex) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
-               }
-       }       
-       
-       public void checkVnfClosedLoopDisabledFlag(BuildingBlockExecution execution) {
-               boolean isClosedLoopDisabled = false;
-               try {
-                       GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
-                       String vnfId = vnf.getVnfId();
-                       isClosedLoopDisabled = aaiVnfResources.checkVnfClosedLoopDisabledFlag(vnfId);
-               } catch (Exception ex) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
-               }
-               if (isClosedLoopDisabled) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF Close Loop Disabled in A&AI");
-               }
-       }       
-               
-       public void modifyVnfClosedLoopDisabledFlag(BuildingBlockExecution execution, boolean closedLoopDisabled) {
-               try {
-                       GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+    public void modifyVnfInMaintFlag(BuildingBlockExecution execution, boolean inMaint) {
+        try {
+            GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
 
-                       GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();
-                       copiedGenericVnf.setClosedLoopDisabled(closedLoopDisabled);
-                       genericVnf.setClosedLoopDisabled(closedLoopDisabled);
+            GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();
 
-                       aaiVnfResources.updateObjectVnf(copiedGenericVnf);
-               } catch(Exception ex) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
-               }
-       }       
-       
-       public void checkVnfPserversLockedFlag(BuildingBlockExecution execution) {
-               boolean inPserversLocked = false;
-               try {
-                       GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
-                       String vnfId = vnf.getVnfId();
-                       inPserversLocked = aaiVnfResources.checkVnfPserversLockedFlag(vnfId);
-               } catch (Exception ex) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
-               }
-               if (inPserversLocked) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF PServers in Locked in A&AI");
-               }
-       }       
+            copiedGenericVnf.setInMaint(inMaint);
+            genericVnf.setInMaint(inMaint);
+
+            aaiVnfResources.updateObjectVnf(copiedGenericVnf);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+    }
+
+    public void checkVnfClosedLoopDisabledFlag(BuildingBlockExecution execution) {
+        boolean isClosedLoopDisabled = false;
+        try {
+            GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+            String vnfId = vnf.getVnfId();
+            isClosedLoopDisabled = aaiVnfResources.checkVnfClosedLoopDisabledFlag(vnfId);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+        if (isClosedLoopDisabled) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF Close Loop Disabled in A&AI");
+        }
+    }
+
+    public void modifyVnfClosedLoopDisabledFlag(BuildingBlockExecution execution, boolean closedLoopDisabled) {
+        try {
+            GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+
+            GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();
+            copiedGenericVnf.setClosedLoopDisabled(closedLoopDisabled);
+            genericVnf.setClosedLoopDisabled(closedLoopDisabled);
+
+            aaiVnfResources.updateObjectVnf(copiedGenericVnf);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+    }
+
+    public void checkVnfPserversLockedFlag(BuildingBlockExecution execution) {
+        boolean inPserversLocked = false;
+        try {
+            GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+            String vnfId = vnf.getVnfId();
+            inPserversLocked = aaiVnfResources.checkVnfPserversLockedFlag(vnfId);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+        if (inPserversLocked) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF PServers in Locked in A&AI");
+        }
+    }
 }