org.demac.process.base.service
Interface CompensableServiceObject

All Superinterfaces:
ServiceObject

public interface CompensableServiceObject
extends ServiceObject

Interface of undoable (compensable) service objects, for a strategy pattern, so that the org.demac.process.base.exe.BaseExecutionService is able to execute all kinds of applications and services, which are compensable.

Since:
1.0
See Also:
ServiceObject, BaseExecutionService

Method Summary
 DataField compensate(FormalParameter[] fp, DataField[] df, java.lang.String uuid)
          Method to execute a generic service.
 java.lang.String getUUID()
          Returns Unique Unified Identificator (UUID) of particular service
 boolean isCompensable()
          Proves whether this Service is compensable
 
Methods inherited from interface org.demac.process.base.service.ServiceObject
connectionResetOccured, exceptionOccured, execute
 

Method Detail

compensate

DataField compensate(FormalParameter[] fp,
                     DataField[] df,
                     java.lang.String uuid)
                     throws java.lang.IllegalStateException
Method to execute a generic service. For execution of the compensation action on the particular Service Object identified by uuid. FormalParameters have to be mapped to the actual parameters by sequence. If theFormalParameters of the actual service differ from the FormalParameters of the process, the parameters have to be mapped again, preserving the logical sequence for invocation.

Both formal and actual parameters can be null in case the application does not expect parameters.

Parameters:
fp - the FormalParameters
df - the actual parameters as DataFields.
Returns:
the output parameter. Returns null if the service is void.
Throws:
IllegalStateException - is thrown if Service has no proper State, e.g. in case the service is not compensable.
java.lang.IllegalStateException

isCompensable

boolean isCompensable()
Proves whether this Service is compensable

Returns:
Returns true if Service Object provides compensation operation.

getUUID

java.lang.String getUUID()
Returns Unique Unified Identificator (UUID) of particular service

Returns:
UUID