The supplier's get() method enters a transactionless context briefly to avoid enrolling the
* query inside an unrelated client-affecting transaction.
*/
private static final Supplier NB: We are assuming that this field is unique across all registrar entities. This is not
* formally enforced in Datastore, but should be enforced by ICANN in that no two registrars will
* be accredited with the same name.
*
* @see ICANN-Accredited
* Registrars
*/
@Index String registrarName;
/** The type of this registrar. */
Type type;
/** The state of this registrar. */
State state;
/** The set of TLDs which this registrar is allowed to access. */
Set This allows registrars to migrate certificates without downtime.
*/
String failoverClientCertificate;
/** Base64 encoded SHA256 hash of {@link #failoverClientCertificate}. */
String failoverClientCertificateHash;
/** A whitelist of netmasks (in CIDR notation) which the client is allowed to connect from. */
List A registrar can have different billing accounts that are denoted in different currencies.
* This provides flexibility for billing systems that require such distinction. When this field is
* accessed by {@link #getBillingAccountMap}, a sorted map is returned to guarantee deterministic
* behavior when serializing the map, for display purpose for instance.
*/
@Nullable
@Mapify(CurrencyMapper.class)
Map This value is specified in the initial registrar contact. It can't be edited in the web GUI
* and it must be specified when the registrar account is created.
*/
String icannReferralEmail;
/** Id of the folder in drive used to publish information for this registrar. */
String driveFolderId;
// Metadata.
/** The time when this registrar was created. */
CreateAutoTimestamp creationTime = CreateAutoTimestamp.create(null);
/** An automatically managed last-saved timestamp. */
UpdateAutoTimestamp lastUpdateTime = UpdateAutoTimestamp.create(null);
/**
* The time that the certificate was last updated.
*/
DateTime lastCertificateUpdateTime;
/**
* Telephone support passcode (5-digit numeric)
*/
String phonePasscode;
/**
* A dirty bit for whether RegistrarContact changes have been made that haven't been synced to
* Google Groups yet. When creating a new instance, contacts require syncing by default.
*/
boolean contactsRequireSyncing = true;
/**
* Method for receiving money from a registrar customer.
*
* Each registrar may opt-in to their preferred billing method. This value can be changed at
* any time using the {@code update_registrar} command.
*
* Note: This value should not be changed if the balance is non-zero.
*/
BillingMethod billingMethod;
/** Whether the registrar must acknowledge the price to register non-standard-priced domains. */
boolean premiumPriceAckRequired;
public boolean getPremiumPriceAckRequired() {
return premiumPriceAckRequired;
}
@NonFinalForTesting
private static Supplier A live registrar is one that can have live domains/contacts/hosts in the registry, meaning
* that it is either currently active or used to be active (i.e. suspended).
*/
public boolean isLive() {
return LIVE_STATES.contains(state);
}
/** Returns {@code true} if registrar should be visible in WHOIS results. */
public boolean isLiveAndPubliclyVisible() {
return LIVE_STATES.contains(state) && PUBLICLY_VISIBLE_TYPES.contains(type);
}
public String getClientCertificate() {
return clientCertificate;
}
public String getClientCertificateHash() {
return clientCertificateHash;
}
public String getFailoverClientCertificate() {
return failoverClientCertificate;
}
public String getFailoverClientCertificateHash() {
return failoverClientCertificateHash;
}
public ImmutableList Warning: {@link #setClientCertificate(String, DateTime)} sets the hash for you and
* is preferred. Calling this method will nullify the {@code clientCertificate} field.
*/
public Builder setClientCertificateHash(String clientCertificateHash) {
if (clientCertificateHash != null) {
checkArgument(
Pattern.matches("[A-Za-z0-9+/]+", clientCertificateHash),
"--cert_hash not a valid base64 (no padding) value");
checkArgument(
base64().decode(clientCertificateHash).length == 256 / 8,
"--cert_hash base64 does not decode to 256 bits");
}
getInstance().clientCertificate = null;
getInstance().clientCertificateHash = clientCertificateHash;
return this;
}
public Builder setContactsRequireSyncing(boolean contactsRequireSyncing) {
getInstance().contactsRequireSyncing = contactsRequireSyncing;
return this;
}
public Builder setIpAddressWhitelist(Iterable
*
* @see Registrar IDs
*/
@Index
@Nullable
Long ianaIdentifier;
/** Identifier of registrar used in external billing system (e.g. Oracle). */
@Nullable
Long billingIdentifier;
/**
* Map of currency-to-billing account for the registrar.
*
*