Package org.somda.sdc.glue.provider.sco
Class Context
- java.lang.Object
-
- org.somda.sdc.glue.provider.sco.Context
-
public class Context extends Object
Transaction context to be used on incoming set service requests in order to send reports and the initial response.- See Also:
InvocationResponse
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocationResponsecreateSuccessfulResponse(org.somda.sdc.biceps.model.message.InvocationState invocationState)Creates a successful initial invocation response based on this context with latest MDIB version.InvocationResponsecreateSuccessfulResponse(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState)Creates a successful initial invocation response based on this context.InvocationResponsecreateUnsuccessfulResponse(org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Creates an unsuccessful initial invocation response based on this context with latest MDIB version.InvocationResponsecreateUnsuccessfulResponse(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Creates an unsuccessful initial invocation response based on this context.InstanceIdentifiergetInvocationSource()LocalMdibAccessgetMdibAccess()StringgetOperationHandle()longgetTransactionId()voidsendReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage, String operationTarget)Sends an operation invoked report with the information passed as arguments.voidsendSuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState)Sends a successful operation invoked report with latest MDIB version.voidsendSuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState, String operationTarget)Sends a successful operation invoked report with latest MDIB version.voidsendSuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState)Sends a successful operation invoked report.voidsendSuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, String operationTarget)Sends a successful operation invoked report.voidsendUnsuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Sends an unsuccessful operation invoked report with latest MDIB version.voidsendUnsuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Sends an unsuccessful operation invoked report.StringtoString()
-
-
-
Method Detail
-
getMdibAccess
public LocalMdibAccess getMdibAccess()
-
getTransactionId
public long getTransactionId()
-
getOperationHandle
public String getOperationHandle()
-
getInvocationSource
public InstanceIdentifier getInvocationSource()
-
createSuccessfulResponse
public InvocationResponse createSuccessfulResponse(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState)
Creates a successful initial invocation response based on this context.- Parameters:
mdibVersion- the MDIB version that is put to the response message.invocationState- the invocation state that is put to the response message. The enumeration is not verified.- Returns:
- the invocation response object.
-
createSuccessfulResponse
public InvocationResponse createSuccessfulResponse(org.somda.sdc.biceps.model.message.InvocationState invocationState)
Creates a successful initial invocation response based on this context with latest MDIB version.- Parameters:
invocationState- the invocation state that is put to the response message. The enumeration is not verified.- Returns:
- the invocation response object.
-
createUnsuccessfulResponse
public InvocationResponse createUnsuccessfulResponse(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)
Creates an unsuccessful initial invocation response based on this context.- Parameters:
mdibVersion- the MDIB version that is put to the response message.invocationState- the invocation state that is put to the response message. The enumeration is not verified.invocationError- the specified error.invocationErrorMessage- a human-readable text to describe the error.- Returns:
- the invocation response object.
-
createUnsuccessfulResponse
public InvocationResponse createUnsuccessfulResponse(org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)
Creates an unsuccessful initial invocation response based on this context with latest MDIB version.- Parameters:
invocationState- the invocation state that is put to the response message. The enumeration is not verified.invocationError- the specified error.invocationErrorMessage- a human-readable text to describe the error.- Returns:
- the invocation response object.
-
sendSuccessfulReport
public void sendSuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState)
Sends a successful operation invoked report.- Parameters:
mdibVersion- the MDIB version that is put to the notification message.invocationState- the invocation state that is put to the notification message. The enumeration is not verified.
-
sendSuccessfulReport
public void sendSuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, @Nullable String operationTarget)
Sends a successful operation invoked report.- Parameters:
mdibVersion- the MDIB version that is put to the notification message.invocationState- the invocation state that is put to the notification message. The enumeration is not verified.operationTarget- the operation target if available or null if unknown/irrelevant.
-
sendSuccessfulReport
public void sendSuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState, @Nullable String operationTarget)Sends a successful operation invoked report with latest MDIB version.- Parameters:
invocationState- the invocation state that is put to the notification message. The enumeration is not verified.operationTarget- the operation target if available or null if unknown/irrelevant.
-
sendSuccessfulReport
public void sendSuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState)
Sends a successful operation invoked report with latest MDIB version.- Parameters:
invocationState- the invocation state that is put to the notification message. The enumeration is not verified.
-
sendUnsuccessfulReport
public void sendUnsuccessfulReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)
Sends an unsuccessful operation invoked report.- Parameters:
mdibVersion- the MDIB version that is put to the notification message.invocationState- the invocation state that is put to the notification message. The enumeration is not verified.invocationError- the specified error.invocationErrorMessage- a human-readable text to describe the error.
-
sendUnsuccessfulReport
public void sendUnsuccessfulReport(org.somda.sdc.biceps.model.message.InvocationState invocationState, org.somda.sdc.biceps.model.message.InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Sends an unsuccessful operation invoked report with latest MDIB version.- Parameters:
invocationState- the invocation state that is put to the notification message. The enumeration is not verified.invocationError- the specified error.invocationErrorMessage- a human-readable text to describe the error.
-
sendReport
public void sendReport(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.InvocationState invocationState, @Nullable org.somda.sdc.biceps.model.message.InvocationError invocationError, @Nullable List<LocalizedText> invocationErrorMessage, @Nullable String operationTarget)
Sends an operation invoked report with the information passed as arguments.- Parameters:
mdibVersion- the invocation state that is put to the notification message. The enumeration is not verified.invocationState- the invocation state to send.invocationError- the specified error or null if this is not an error report.invocationErrorMessage- a human-readable text to describe the error or null if this is not an error report.operationTarget- the operation target if available or null if unknown/irrelevant.
-
-