Class ScoUtil

java.lang.Object
org.somda.sdc.glue.consumer.sco.ScoUtil

public class ScoUtil extends Object
Utility class for SCO processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart>
    getFinalReport(Collection<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportParts)
    Finds a final report in a collection of reports.
    boolean
    hasFinalReport(Collection<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportParts)
    Checks if a collection of invocation report parts includes a final report.
    boolean
    isFinalReport(org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart reportPart)
    Checks whether a report is a final report or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hasFinalReport

      public boolean hasFinalReport(Collection<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportParts)
      Checks if a collection of invocation report parts includes a final report.
      Parameters:
      reportParts - the collection to skim.
      Returns:
      true if there is a final report, false otherwise.
      See Also:
    • getFinalReport

      public Optional<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> getFinalReport(Collection<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportParts)
      Finds a final report in a collection of reports.
      Parameters:
      reportParts - the collection to skim.
      Returns:
      first final report part that could be found or Optional.empty() if no final report exists.
      See Also:
    • isFinalReport

      public boolean isFinalReport(org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart reportPart)
      Checks whether a report is a final report or not.

      A report is defined as final if no more reports are expected to be delivered. This applies for

        InvocationState.CNCLLD
      • InvocationState.CNCLLD_MAN
      • InvocationState.FIN
      • InvocationState.FIN_MOD
      • InvocationState.FAIL
      Parameters:
      reportPart - the report part to check.
      Returns:
      true if the report is a final report, otherwise false.