Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
[fix][*][v0.1.0]: ROOT_DOMAIN_SPACE not final
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxyan committed Dec 27, 2023
1 parent a25ea33 commit e019411
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import javax.annotation.Resource;

import cn.hutool.core.util.StrUtil;
import com.alipay.antchain.bridge.commons.core.base.CrossChainDomain;
import com.alipay.antchain.bridge.relayer.cli.glclient.GrpcClient;
import lombok.Getter;
import org.springframework.shell.standard.*;
Expand All @@ -39,7 +38,7 @@ public String name() {

@ShellMethod(value = "Register a new BCDNS bound with specified domain space into Relayer")
Object registerBCDNSService(
@ShellOption(help = "The domain space owned by the BCDNS, default the root space \"\"", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace,
@ShellOption(help = "The domain space owned by the BCDNS, default the root space \"\"", defaultValue = "") String domainSpace,
@ShellOption(help = "The type of the BCDNS, e.g. embedded, bif") String bcdnsType,
@ShellOption(valueProvider = FileValueProvider.class, help = "The properties file path needed to initialize the service stub, e.g. /path/to/your/prop.json") String propFile,
@ShellOption(valueProvider = FileValueProvider.class, help = "The path to BCDNS trust root certificate file if you have it", defaultValue = "") String bcdnsCertPath
Expand All @@ -51,33 +50,33 @@ Object registerBCDNSService(
}

@ShellMethod(value = "Get the BCDNS data bound with specified domain space")
Object getBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace) {
Object getBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = "") String domainSpace) {
return queryAPI("getBCDNSService", domainSpace);
}

@ShellMethod(value = "Delete the BCDNS bound with specified domain space")
Object deleteBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace) {
Object deleteBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = "") String domainSpace) {
return queryAPI("deleteBCDNSService", domainSpace);
}

@ShellMethod(value = "Get the BCDNS trust root certificate bound with specified domain space")
Object getBCDNSCertificate(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace) {
Object getBCDNSCertificate(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = "") String domainSpace) {
return queryAPI("getBCDNSCertificate", domainSpace);
}

@ShellMethod(value = "Stop the local BCDNS service stub")
Object stopBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace) {
Object stopBCDNSService(@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = "") String domainSpace) {
return queryAPI("stopBCDNSService", domainSpace);
}

@ShellMethod(value = "Restart the local BCDNS service stub from stop")
Object restartBCDNSService(@ShellOption(help = "domain space, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace) {
Object restartBCDNSService(@ShellOption(help = "domain space, default the root space", defaultValue = "") String domainSpace) {
return queryAPI("restartBCDNSService", domainSpace);
}

@ShellMethod(value = "Apply a domain certificate for a blockchain from the BCDNS with specified domain space")
Object applyDomainNameCert(
@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace,
@ShellOption(help = "The domain space bound with BCDNS, default the root space", defaultValue = "") String domainSpace,
@ShellOption(help = "The domain applying") String domain,
@ShellOption(help = "The type for applicant subject, e.g. `X509_PUBLIC_KEY_INFO` or `BID`", defaultValue = "BID") String applicantOidType,
@ShellOption(valueProvider = FileValueProvider.class, help = "The subject file like public key file in PEM or BID document file") String oidFilePath
Expand All @@ -98,7 +97,7 @@ Object queryDomainCertApplicationState(@ShellOption(help = "The specified domain
@ShellMethod(value = "Fetch the certificate for a specified blockchain domain from the BCDNS with the domain space")
Object fetchDomainNameCertFromBCDNS(
@ShellOption(help = "The specified domain") String domain,
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = "") String domainSpace
) {

return queryAPI("fetchDomainNameCertFromBCDNS", domain, domainSpace);
Expand All @@ -107,7 +106,7 @@ Object fetchDomainNameCertFromBCDNS(
@ShellMethod(value = "Query the domain name certificate from the BCDNS with the domain space")
Object queryDomainNameCertFromBCDNS(
@ShellOption(help = "The specified domain") String domain,
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = "") String domainSpace
) {
return queryAPI("queryDomainNameCertFromBCDNS", domain, domainSpace);
}
Expand All @@ -120,7 +119,7 @@ Object registerDomainRouter(@ShellOption(help = "The specified domain") String d
@ShellMethod(value = "Query the domain router for the domain from the BCDNS with the domain space")
Object queryDomainRouter(
@ShellOption(help = "The specified domain") String domain,
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = CrossChainDomain.ROOT_DOMAIN_SPACE) String domainSpace
@ShellOption(help = "The BCDNS domain space, default the root space", defaultValue = "") String domainSpace
) {
return queryAPI("queryDomainRouter", domainSpace, domain);
}
Expand Down

0 comments on commit e019411

Please sign in to comment.