|
|
@@ -35,12 +35,14 @@ public class LongcheerConfig {
|
|
|
private java.util.Map<String, String> supplierMapping = new java.util.HashMap<String, String>();
|
|
|
|
|
|
public static class Inventory {
|
|
|
- /** 应用密钥 Key */
|
|
|
+ /** 应用密钥 Key(默认值,credentials 未匹配时使用) */
|
|
|
private String appKey;
|
|
|
- /** 应用密钥 Secret */
|
|
|
+ /** 应用密钥 Secret(默认值,credentials 未匹配时使用) */
|
|
|
private String appSecret;
|
|
|
/** 接口地址 */
|
|
|
private String url;
|
|
|
+ /** 按 master 区分的凭证映射,key=master,value=该 master 对应的 appKey/appSecret */
|
|
|
+ private java.util.Map<String, Credential> credentials = new java.util.HashMap<String, Credential>();
|
|
|
|
|
|
public String getAppKey() {
|
|
|
return appKey;
|
|
|
@@ -65,15 +67,25 @@ public class LongcheerConfig {
|
|
|
public void setUrl(String url) {
|
|
|
this.url = url;
|
|
|
}
|
|
|
+
|
|
|
+ public java.util.Map<String, Credential> getCredentials() {
|
|
|
+ return credentials;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCredentials(java.util.Map<String, Credential> credentials) {
|
|
|
+ this.credentials = credentials;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static class Po {
|
|
|
- /** 应用密钥 Key */
|
|
|
+ /** 应用密钥 Key(默认值,credentials 未匹配时使用) */
|
|
|
private String appKey;
|
|
|
- /** 应用密钥 Secret */
|
|
|
+ /** 应用密钥 Secret(默认值,credentials 未匹配时使用) */
|
|
|
private String appSecret;
|
|
|
/** 接口地址 */
|
|
|
private String url;
|
|
|
+ /** 按 elsAccount 区分的凭证映射,key=elsAccount,value=该 elsAccount 对应的 appKey/appSecret */
|
|
|
+ private java.util.Map<String, Credential> credentials = new java.util.HashMap<String, Credential>();
|
|
|
|
|
|
public String getAppKey() {
|
|
|
return appKey;
|
|
|
@@ -98,6 +110,40 @@ public class LongcheerConfig {
|
|
|
public void setUrl(String url) {
|
|
|
this.url = url;
|
|
|
}
|
|
|
+
|
|
|
+ public java.util.Map<String, Credential> getCredentials() {
|
|
|
+ return credentials;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCredentials(java.util.Map<String, Credential> credentials) {
|
|
|
+ this.credentials = credentials;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 凭证信息(appKey + appSecret)
|
|
|
+ */
|
|
|
+ public static class Credential {
|
|
|
+ /** 应用密钥 Key */
|
|
|
+ private String appKey;
|
|
|
+ /** 应用密钥 Secret */
|
|
|
+ private String appSecret;
|
|
|
+
|
|
|
+ public String getAppKey() {
|
|
|
+ return appKey;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAppKey(String appKey) {
|
|
|
+ this.appKey = appKey;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getAppSecret() {
|
|
|
+ return appSecret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAppSecret(String appSecret) {
|
|
|
+ this.appSecret = appSecret;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public Inventory getInventory() {
|