add
yj
2024-12-05 b9900893177c78fc559223521fe839aa21000017
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
61
62
63
64
65
66
67
68
69
70
71
72
package com.dobbinsoft.fw.support.component.open;
 
import com.dobbinsoft.fw.support.component.open.model.OPClient;
import com.dobbinsoft.fw.support.component.open.model.OPClientPermission;
import com.dobbinsoft.fw.support.component.open.model.OPNotify;
 
import java.util.List;
 
/**
 * ClassName: OpenPlatformStorageStrategy
 * Description: 持久化策略
 *
 * @author: e-weichaozheng
 * @date: 2021-04-23
 */
public interface OpenPlatformStorageStrategy {
 
    public boolean checkClientExists(String clientCode);
 
    /**
     * 初始化客户,并产生 服务器公私钥,并将公钥返回
     * @param clientCode
     * @param notifyUrl
     * @param publicKey
     * @return
     */
    public OPClient initClient(String clientCode, String notifyUrl, String publicKey);
 
    public boolean setClientNotifyUrl(String clientCode, String notifyUrl);
 
    public boolean setClientPublicKey(String clientCode, String publicKey);
 
    public OPClient getClient(String clientCode);
 
    public boolean setClientPermissionList(String clientCode, List<OPClientPermission> permissionList);
 
    public boolean checkApiPermission(String clientCode, String group, String method);
 
    /**
     * 带服务器公私钥获取客户
     * @param clientCode
     * @return
     */
    public OPClient getClientWithPK(String clientCode);
 
    /**
     * 将通知实体缓存起来
     * @param notify
     * @return
     */
    public String storeNotify(OPNotify notify);
 
    /**
     * 获取需要通知的实体
     * @return
     */
    public List<OPNotify> getNeedNotify();
 
    /**
     *
     * @param updateNotify
     * @return
     */
    public boolean updateNotify(OPNotify updateNotify);
 
    /**
     * 是否自定义最大努力通知
     * @return
     */
    public boolean customTryNotify();
 
}