mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add visibleInWhoisAsAbuse field in RegistrarContact
Also added corresponding getters and setters for the new field. Note that nothing has changed on the RDAP front for now, as the CL&D only concerns WHOIS. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155116134
This commit is contained in:
parent
354e1fb8b2
commit
7a3852b5a5
6 changed files with 145 additions and 83 deletions
|
@ -123,15 +123,22 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
String gaeUserId;
|
||||
|
||||
/**
|
||||
* Whether this contact is publicly visible in WHOIS results as an Admin contact.
|
||||
* Whether this contact is publicly visible in WHOIS registrar query results as an Admin contact.
|
||||
*/
|
||||
boolean visibleInWhoisAsAdmin = false;
|
||||
|
||||
/**
|
||||
* Whether this contact is publicly visible in WHOIS results as a Technical contact.
|
||||
* Whether this contact is publicly visible in WHOIS registrar query results as a Technical
|
||||
* contact.
|
||||
*/
|
||||
boolean visibleInWhoisAsTech = false;
|
||||
|
||||
/**
|
||||
* Whether this contact's phone number and email address is publicly visible in WHOIS domain query
|
||||
* results as registrar abuse contact info.
|
||||
*/
|
||||
boolean visibleInDomainWhoisAsAbuse = false;
|
||||
|
||||
public static ImmutableSet<Type> typesFromCSV(String csv) {
|
||||
return typesFromStrings(Arrays.asList(csv.split(",")));
|
||||
}
|
||||
|
@ -193,6 +200,10 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
return visibleInWhoisAsTech;
|
||||
}
|
||||
|
||||
public boolean getVisibleInDomainWhoisAsAbuse() {
|
||||
return visibleInDomainWhoisAsAbuse;
|
||||
}
|
||||
|
||||
public String getGaeUserId() {
|
||||
return gaeUserId;
|
||||
}
|
||||
|
@ -225,12 +236,20 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
result.append("Fax: ").append(getFaxNumber()).append('\n');
|
||||
}
|
||||
result.append("Types: ").append(getTypes()).append('\n');
|
||||
result.append("Visible in WHOIS as Admin contact: ")
|
||||
result
|
||||
.append("Visible in registrar WHOIS query as Admin contact: ")
|
||||
.append(getVisibleInWhoisAsAdmin() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
result.append("Visible in WHOIS as Technical contact: ")
|
||||
result
|
||||
.append("Visible in registrar WHOIS query as Technical contact: ")
|
||||
.append(getVisibleInWhoisAsTech() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
result
|
||||
.append(
|
||||
"Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: ")
|
||||
.append(getVisibleInDomainWhoisAsAbuse() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
if (getGaeUserId() != null) {
|
||||
result.append("GAE-UserID: ").append(getGaeUserId()).append('\n');
|
||||
}
|
||||
|
@ -247,6 +266,7 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
.put("types", Joiner.on(',').join(transform(getTypes(), toStringFunction())))
|
||||
.put("visibleInWhoisAsAdmin", visibleInWhoisAsAdmin)
|
||||
.put("visibleInWhoisAsTech", visibleInWhoisAsTech)
|
||||
.put("visibleInDomainWhoisAsAbuse", visibleInDomainWhoisAsAbuse)
|
||||
.put("gaeUserId", gaeUserId)
|
||||
.build();
|
||||
}
|
||||
|
@ -311,6 +331,11 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setVisibleInDomainWhoisAsAbuse(boolean visible) {
|
||||
getInstance().visibleInDomainWhoisAsAbuse = visible;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setGaeUserId(String gaeUserId) {
|
||||
getInstance().gaeUserId = gaeUserId;
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue