Package org.somda.sdc.glue.consumer.sco
Class ScoUtil
java.lang.Object
org.somda.sdc.glue.consumer.sco.ScoUtil
Utility class for SCO processing.
-
Method Summary
Modifier and TypeMethodDescriptionOptional<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.booleanhasFinalReport(Collection<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportParts) Checks if a collection of invocation report parts includes a final report.booleanisFinalReport(org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart reportPart) Checks whether a report is a final report or not.
-
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_MANInvocationState.FINInvocationState.FIN_MODInvocationState.FAIL
InvocationState.CNCLLD- Parameters:
reportPart- the report part to check.- Returns:
- true if the report is a final report, otherwise false.
-