package jnpf.elnService;
|
|
import jnpf.elnEntity.runtime.ElnRecordVos;
|
|
public interface ElnRecordSourceSyncOperationCoordinator {
|
ElnRecordVos.SourceSynchronized begin(
|
String tenantId, String userId, String operationCode, String requestDigest);
|
|
ElnRecordVos.SourceSynchronized complete(
|
String tenantId, String userId, String operationCode, String requestDigest,
|
ElnRecordVos.SourceSynchronized result);
|
|
ElnRecordVos.SourceSynchronized prepare(
|
String tenantId, String userId, String operationCode, String requestDigest,
|
ElnRecordVos.SourceSynchronized result);
|
|
ElnRecordVos.SourceSynchronized pending(
|
String tenantId, String userId, String recordId);
|
|
boolean confirm(String tenantId, String userId, String operationCode);
|
|
default boolean hasPendingDocumentConfirmation(String tenantId, String recordId) {
|
return false;
|
}
|
|
static ElnRecordSourceSyncOperationCoordinator none() {
|
return new ElnRecordSourceSyncOperationCoordinator() {
|
@Override
|
public ElnRecordVos.SourceSynchronized begin(
|
String tenantId, String userId, String operationCode, String requestDigest) {
|
return null;
|
}
|
|
@Override
|
public ElnRecordVos.SourceSynchronized complete(
|
String tenantId, String userId, String operationCode, String requestDigest,
|
ElnRecordVos.SourceSynchronized result) {
|
return result;
|
}
|
|
@Override
|
public ElnRecordVos.SourceSynchronized prepare(
|
String tenantId, String userId, String operationCode, String requestDigest,
|
ElnRecordVos.SourceSynchronized result) {
|
return result;
|
}
|
|
@Override
|
public ElnRecordVos.SourceSynchronized pending(
|
String tenantId, String userId, String recordId) {
|
return null;
|
}
|
|
@Override
|
public boolean confirm(String tenantId, String userId, String operationCode) {
|
return true;
|
}
|
};
|
}
|
}
|