|
|
@ -51,6 +51,7 @@ public class PrivacyParameters { |
|
|
|
private PrivacyStorageProvider privateStorageProvider; |
|
|
|
private PrivacyStorageProvider privateStorageProvider; |
|
|
|
private WorldStateArchive privateWorldStateArchive; |
|
|
|
private WorldStateArchive privateWorldStateArchive; |
|
|
|
private PrivateStateStorage privateStateStorage; |
|
|
|
private PrivateStateStorage privateStateStorage; |
|
|
|
|
|
|
|
private boolean multiTenancyEnabled; |
|
|
|
|
|
|
|
|
|
|
|
public Integer getPrivacyAddress() { |
|
|
|
public Integer getPrivacyAddress() { |
|
|
|
return privacyAddress; |
|
|
|
return privacyAddress; |
|
|
@ -132,9 +133,25 @@ public class PrivacyParameters { |
|
|
|
this.enclave = enclave; |
|
|
|
this.enclave = enclave; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setMultiTenancyEnabled(final boolean multiTenancyEnabled) { |
|
|
|
|
|
|
|
this.multiTenancyEnabled = multiTenancyEnabled; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isMultiTenancyEnabled() { |
|
|
|
|
|
|
|
return multiTenancyEnabled; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return "PrivacyParameters{" + "enabled=" + enabled + ", enclaveUri='" + enclaveUri + '\'' + '}'; |
|
|
|
return "PrivacyParameters{" |
|
|
|
|
|
|
|
+ "enabled=" |
|
|
|
|
|
|
|
+ enabled |
|
|
|
|
|
|
|
+ ", multiTenancyEnabled = " |
|
|
|
|
|
|
|
+ multiTenancyEnabled |
|
|
|
|
|
|
|
+ ", enclaveUri='" |
|
|
|
|
|
|
|
+ enclaveUri |
|
|
|
|
|
|
|
+ '\'' |
|
|
|
|
|
|
|
+ '}'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static class Builder { |
|
|
|
public static class Builder { |
|
|
@ -147,6 +164,7 @@ public class PrivacyParameters { |
|
|
|
private Path privateKeyPath; |
|
|
|
private Path privateKeyPath; |
|
|
|
private PrivacyStorageProvider storageProvider; |
|
|
|
private PrivacyStorageProvider storageProvider; |
|
|
|
private EnclaveFactory enclaveFactory; |
|
|
|
private EnclaveFactory enclaveFactory; |
|
|
|
|
|
|
|
private boolean multiTenancyEnabled; |
|
|
|
|
|
|
|
|
|
|
|
public Builder setPrivacyAddress(final Integer privacyAddress) { |
|
|
|
public Builder setPrivacyAddress(final Integer privacyAddress) { |
|
|
|
this.privacyAddress = privacyAddress; |
|
|
|
this.privacyAddress = privacyAddress; |
|
|
@ -178,6 +196,11 @@ public class PrivacyParameters { |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Builder setMultiTenancyEnabled(final boolean multiTenancyEnabled) { |
|
|
|
|
|
|
|
this.multiTenancyEnabled = multiTenancyEnabled; |
|
|
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PrivacyParameters build() throws IOException { |
|
|
|
public PrivacyParameters build() throws IOException { |
|
|
|
final PrivacyParameters config = new PrivacyParameters(); |
|
|
|
final PrivacyParameters config = new PrivacyParameters(); |
|
|
|
if (enabled) { |
|
|
|
if (enabled) { |
|
|
@ -204,6 +227,7 @@ public class PrivacyParameters { |
|
|
|
config.setEnabled(enabled); |
|
|
|
config.setEnabled(enabled); |
|
|
|
config.setEnclaveUri(enclaveUrl); |
|
|
|
config.setEnclaveUri(enclaveUrl); |
|
|
|
config.setPrivacyAddress(privacyAddress); |
|
|
|
config.setPrivacyAddress(privacyAddress); |
|
|
|
|
|
|
|
config.setMultiTenancyEnabled(multiTenancyEnabled); |
|
|
|
return config; |
|
|
|
return config; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|