wxr
2022-11-23 1e7b3abd15d37f6c6bc97ac14922457b9604c275
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
package com.mm.android.deviceaddmodule;
 
import android.app.Application;
 
import java.io.Serializable;
 
public class CommonParam implements Serializable {
    private Application context;
    private String userId;
    private String appId;
    private String appSecret;
 
    private String envirment= "";
 
    public String getEnvirment() {
        return envirment;
    }
 
    public void setEnvirment(String envirment) {
        this.envirment = envirment;
    }
 
    public Application getContext() {
        return context;
    }
 
    public void setContext(Application context) {
        this.context = context;
    }
 
    public String getAppId() {
        return appId;
    }
 
    public void setAppId(String appId) {
        this.appId = appId;
    }
 
    public String getAppSecret() {
        return appSecret;
    }
 
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }
 
    public String getUserId() {
        return userId;
    }
 
    public void setUserId(String userId) {
        this.userId = userId;
    }
 
    public void checkParam() throws Exception {
        if (context == null) {
            throw new Exception("context must not null");
        }
 
        if (appId == null || appId.isEmpty()) {
            throw new Exception("appId must not empty");
        }
 
        if (appSecret == null || appSecret.isEmpty()) {
            throw new Exception("appSecret must not empty");
        }
    }
}