刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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;
            }
        };
    }
}