mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Inject RDAP help information in ConfigModule
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140849879
This commit is contained in:
parent
3740171bbf
commit
c59b738b5b
57 changed files with 436 additions and 306 deletions
|
@ -16,6 +16,7 @@ package google.registry.rdap;
|
|||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.config.RdapNoticeDescriptor;
|
||||
|
||||
public class RdapTestHelper {
|
||||
|
||||
|
@ -35,8 +36,8 @@ public class RdapTestHelper {
|
|||
+ " transmission of mass unsolicited, commercial advertising or"
|
||||
+ " solicitations.",
|
||||
"Don't access our Domain Database through the use of high volume, automated"
|
||||
+ " electronic processes that send queries or data to the systems of"
|
||||
+ " Charleston Road Registry or any ICANN-accredited registrar.",
|
||||
+ " electronic processes that send queries or data to the systems of any"
|
||||
+ " ICANN-accredited registrar.",
|
||||
"You may only use the information contained in the Domain Database for lawful"
|
||||
+ " purposes.",
|
||||
"Do not compile, repackage, disseminate, or otherwise use the information"
|
||||
|
@ -51,7 +52,7 @@ public class RdapTestHelper {
|
|||
ImmutableMap.of(
|
||||
"value", linkBase + "help/tos",
|
||||
"rel", "alternate",
|
||||
"href", "https://www.registry.google/about/rdap/tos.html",
|
||||
"href", "https://www.registry.tld/about/rdap/tos.html",
|
||||
"type", "text/html")))));
|
||||
}
|
||||
|
||||
|
@ -99,5 +100,75 @@ public class RdapTestHelper {
|
|||
"href", "https://www.icann.org/wicf",
|
||||
"type", "text/html")))));
|
||||
}
|
||||
}
|
||||
|
||||
static RdapJsonFormatter getTestRdapJsonFormatter() {
|
||||
RdapJsonFormatter rdapJsonFormatter = new RdapJsonFormatter();
|
||||
rdapJsonFormatter.rdapTosPath = "/tos";
|
||||
rdapJsonFormatter.rdapHelpMap = ImmutableMap.of(
|
||||
"/",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Help")
|
||||
.setDescription(ImmutableList.of(
|
||||
"RDAP Help Topics (use /help/topic for information)",
|
||||
"syntax",
|
||||
"tos (Terms of Service)"))
|
||||
.setLinkValueSuffix("help/")
|
||||
.build(),
|
||||
"/index",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Help")
|
||||
.setDescription(ImmutableList.of(
|
||||
"RDAP Help Topics (use /help/topic for information)",
|
||||
"syntax",
|
||||
"tos (Terms of Service)"))
|
||||
.setLinkValueSuffix("help/index")
|
||||
.build(),
|
||||
"/syntax",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Command Syntax")
|
||||
.setDescription(ImmutableList.of(
|
||||
"domain/XXXX",
|
||||
"nameserver/XXXX",
|
||||
"entity/XXXX",
|
||||
"domains?name=XXXX",
|
||||
"domains?nsLdhName=XXXX",
|
||||
"domains?nsIp=XXXX",
|
||||
"nameservers?name=XXXX",
|
||||
"nameservers?ip=XXXX",
|
||||
"entities?fn=XXXX",
|
||||
"entities?handle=XXXX",
|
||||
"help/XXXX"))
|
||||
.setLinkValueSuffix("help/syntax")
|
||||
.setLinkHrefUrlString("https://www.registry.tld/about/rdap/syntax.html")
|
||||
.build(),
|
||||
"/tos",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Terms of Service")
|
||||
.setDescription(ImmutableList.of(
|
||||
"By querying our Domain Database, you are agreeing to comply with these terms so"
|
||||
+ " please read them carefully.",
|
||||
"Any information provided is 'as is' without any guarantee of accuracy.",
|
||||
"Please do not misuse the Domain Database. It is intended solely for"
|
||||
+ " query-based access.",
|
||||
"Don't use the Domain Database to allow, enable, or otherwise support the"
|
||||
+ " transmission of mass unsolicited, commercial advertising or"
|
||||
+ " solicitations.",
|
||||
"Don't access our Domain Database through the use of high volume, automated"
|
||||
+ " electronic processes that send queries or data to the systems of any"
|
||||
+ " ICANN-accredited registrar.",
|
||||
"You may only use the information contained in the Domain Database for lawful"
|
||||
+ " purposes.",
|
||||
"Do not compile, repackage, disseminate, or otherwise use the information"
|
||||
+ " contained in the Domain Database in its entirety, or in any substantial"
|
||||
+ " portion, without our prior written permission.",
|
||||
"We may retain certain details about queries to our Domain Database for the"
|
||||
+ " purposes of detecting and preventing misuse.",
|
||||
"We reserve the right to restrict or deny your access to the database if we"
|
||||
+ " suspect that you have failed to comply with these terms.",
|
||||
"We reserve the right to modify this agreement at any time."))
|
||||
.setLinkValueSuffix("help/tos")
|
||||
.setLinkHrefUrlString("https://www.registry.tld/about/rdap/tos.html")
|
||||
.build());
|
||||
return rdapJsonFormatter;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue