Package google.registry.model.registrar
Class Registrar
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.UpdateAutoTimestampEntity
-
- google.registry.model.registrar.Registrar
-
- All Implemented Interfaces:
Buildable
,Jsonifiable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
@Entity public class Registrar extends UpdateAutoTimestampEntity implements Buildable, Jsonifiable
Information about a registrar.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Registrar.Builder
A builder for constructingRegistrar
, since it is immutable.static class
Registrar.State
Represents the state of a persisted registrar entity.static class
Registrar.Type
Represents the type of a registrar entity.-
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,B extends Buildable.GenericBuilder<?,?>>, Buildable.Overlayable<T>
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.re2j.Pattern
PHONE_PASSCODE_PATTERN
Regex for telephone support passcode (5 digit string).-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description Registrar()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Registrar.Builder
asBuilder()
static java.lang.String
checkValidEmail(java.lang.String email)
Verifies that the email address in question is not null and has a valid format.VKey<Registrar>
createVKey()
Creates aVKey
for this instance.static VKey<Registrar>
createVKey(java.lang.String registrarId)
Creates aVKey
for the givenregistrarId
.com.google.common.collect.ImmutableSortedSet<java.lang.String>
getAllowedTlds()
com.google.common.collect.ImmutableSortedMap<org.joda.money.CurrencyUnit,java.lang.String>
getBillingAccountMap()
boolean
getBlockPremiumNames()
java.util.Optional<java.lang.String>
getClientCertificate()
Returns the client certificate string if it has been set, or empty otherwise.java.util.Optional<java.lang.String>
getClientCertificateHash()
Returns the client certificate hash if it has been set, or empty otherwise.com.google.common.collect.ImmutableSortedSet<RegistrarPoc>
getContacts()
Returns a list of allRegistrarPoc
objects for this registrar sorted by their email address.com.google.common.collect.ImmutableSortedSet<RegistrarPoc>
getContactsOfType(RegistrarPoc.Type type)
Returns a list ofRegistrarPoc
objects of a given type for this registrar sorted by their email address.boolean
getContactsRequireSyncing()
org.joda.time.DateTime
getCreationTime()
java.lang.String
getDriveFolderId()
java.lang.String
getEmailAddress()
java.util.Optional<java.lang.String>
getFailoverClientCertificate()
Returns the failover client certificate string if it has been set, or empty otherwise.java.util.Optional<java.lang.String>
getFailoverClientCertificateHash()
Returns the failover client certificate hash if it has been set, or empty otherwise.java.lang.String
getFaxNumber()
java.lang.Long
getIanaIdentifier()
java.lang.String
getIcannReferralEmail()
RegistrarAddress
getInternationalizedAddress()
com.google.common.collect.ImmutableList<CidrAddressBlock>
getIpAddressAllowList()
org.joda.time.DateTime
getLastCertificateUpdateTime()
org.joda.time.DateTime
getLastExpiringCertNotificationSentDate()
org.joda.time.DateTime
getLastExpiringFailoverCertNotificationSentDate()
org.joda.time.DateTime
getLastUpdateTime()
RegistrarAddress
getLocalizedAddress()
java.lang.String
getPhoneNumber()
java.lang.String
getPhonePasscode()
java.util.Optional<java.lang.String>
getPoNumber()
com.google.common.collect.ImmutableSet<java.lang.String>
getRdapBaseUrls()
java.lang.String
getRegistrarId()
java.lang.String
getRegistrarName()
Registrar.State
getState()
Registrar.Type
getType()
java.lang.String
getUrl()
java.util.Optional<RegistrarPoc>
getWhoisAbuseContact()
Returns theRegistrarPoc
that is the WHOIS abuse contact for this registrar, or empty if one does not exist.java.lang.String
getWhoisServer()
boolean
isLive()
Returnstrue
if the registrar is live.boolean
isLiveAndPubliclyVisible()
Returnstrue
if registrar should be visible in WHOIS results.boolean
isRegistryLockAllowed()
static java.lang.Iterable<Registrar>
loadAll()
Loads all registrar entities directly from the database.static java.lang.Iterable<Registrar>
loadAllCached()
Loads all registrar entities using an in-memory cache.static com.google.common.collect.ImmutableSet<VKey<Registrar>>
loadAllKeysCached()
Loads all registrar keys using an in-memory cache.static java.util.Optional<Registrar>
loadByRegistrarId(java.lang.String registrarId)
Loads and returns a registrar entity by its id directly from the database.static java.util.Optional<Registrar>
loadByRegistrarIdCached(java.lang.String registrarId)
Loads and returns a registrar entity by its id using an in-memory cache.static Registrar
loadRequiredRegistrarCached(java.lang.String registrarId)
Loads and returns a registrar entity by its id using an in-memory cache.java.util.Map<java.lang.String,java.lang.Object>
toJsonMap()
Returns a JSON representation of this object.boolean
verifyPassword(java.lang.String password)
-
Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
getRegistrarId
public java.lang.String getRegistrarId()
-
getCreationTime
public org.joda.time.DateTime getCreationTime()
-
getIanaIdentifier
@Nullable public java.lang.Long getIanaIdentifier()
-
getPoNumber
public java.util.Optional<java.lang.String> getPoNumber()
-
getBillingAccountMap
public com.google.common.collect.ImmutableSortedMap<org.joda.money.CurrencyUnit,java.lang.String> getBillingAccountMap()
-
getLastUpdateTime
public org.joda.time.DateTime getLastUpdateTime()
-
getLastCertificateUpdateTime
public org.joda.time.DateTime getLastCertificateUpdateTime()
-
getLastExpiringCertNotificationSentDate
public org.joda.time.DateTime getLastExpiringCertNotificationSentDate()
-
getLastExpiringFailoverCertNotificationSentDate
public org.joda.time.DateTime getLastExpiringFailoverCertNotificationSentDate()
-
getRegistrarName
public java.lang.String getRegistrarName()
-
getType
public Registrar.Type getType()
-
getState
public Registrar.State getState()
-
getAllowedTlds
public com.google.common.collect.ImmutableSortedSet<java.lang.String> getAllowedTlds()
-
isLive
public boolean isLive()
Returnstrue
if the registrar is live.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).
-
isLiveAndPubliclyVisible
public boolean isLiveAndPubliclyVisible()
Returnstrue
if registrar should be visible in WHOIS results.
-
getClientCertificate
public java.util.Optional<java.lang.String> getClientCertificate()
Returns the client certificate string if it has been set, or empty otherwise.
-
getClientCertificateHash
public java.util.Optional<java.lang.String> getClientCertificateHash()
Returns the client certificate hash if it has been set, or empty otherwise.
-
getFailoverClientCertificate
public java.util.Optional<java.lang.String> getFailoverClientCertificate()
Returns the failover client certificate string if it has been set, or empty otherwise.
-
getFailoverClientCertificateHash
public java.util.Optional<java.lang.String> getFailoverClientCertificateHash()
Returns the failover client certificate hash if it has been set, or empty otherwise.
-
getIpAddressAllowList
public com.google.common.collect.ImmutableList<CidrAddressBlock> getIpAddressAllowList()
-
getLocalizedAddress
public RegistrarAddress getLocalizedAddress()
-
getInternationalizedAddress
public RegistrarAddress getInternationalizedAddress()
-
getPhoneNumber
public java.lang.String getPhoneNumber()
-
getFaxNumber
public java.lang.String getFaxNumber()
-
getEmailAddress
public java.lang.String getEmailAddress()
-
getWhoisServer
public java.lang.String getWhoisServer()
-
getRdapBaseUrls
public com.google.common.collect.ImmutableSet<java.lang.String> getRdapBaseUrls()
-
getBlockPremiumNames
public boolean getBlockPremiumNames()
-
getContactsRequireSyncing
public boolean getContactsRequireSyncing()
-
isRegistryLockAllowed
public boolean isRegistryLockAllowed()
-
getUrl
public java.lang.String getUrl()
-
getIcannReferralEmail
public java.lang.String getIcannReferralEmail()
-
getDriveFolderId
public java.lang.String getDriveFolderId()
-
getContacts
public com.google.common.collect.ImmutableSortedSet<RegistrarPoc> getContacts()
Returns a list of allRegistrarPoc
objects for this registrar sorted by their email address.
-
getContactsOfType
public com.google.common.collect.ImmutableSortedSet<RegistrarPoc> getContactsOfType(RegistrarPoc.Type type)
Returns a list ofRegistrarPoc
objects of a given type for this registrar sorted by their email address.
-
getWhoisAbuseContact
public java.util.Optional<RegistrarPoc> getWhoisAbuseContact()
Returns theRegistrarPoc
that is the WHOIS abuse contact for this registrar, or empty if one does not exist.
-
toJsonMap
public java.util.Map<java.lang.String,java.lang.Object> toJsonMap()
Description copied from interface:Jsonifiable
Returns a JSON representation of this object.The returned value must not return sensitive fields, so that it may be safe to return to the client via an API response.
- Specified by:
toJsonMap
in interfaceJsonifiable
-
verifyPassword
public boolean verifyPassword(java.lang.String password)
-
getPhonePasscode
public java.lang.String getPhonePasscode()
-
asBuilder
public Registrar.Builder asBuilder()
-
createVKey
public VKey<Registrar> createVKey()
Creates aVKey
for this instance.- Overrides:
createVKey
in classImmutableObject
-
createVKey
public static VKey<Registrar> createVKey(java.lang.String registrarId)
Creates aVKey
for the givenregistrarId
.
-
checkValidEmail
public static java.lang.String checkValidEmail(java.lang.String email)
Verifies that the email address in question is not null and has a valid format.
-
loadAll
public static java.lang.Iterable<Registrar> loadAll()
Loads all registrar entities directly from the database.
-
loadAllCached
public static java.lang.Iterable<Registrar> loadAllCached()
Loads all registrar entities using an in-memory cache.
-
loadAllKeysCached
public static com.google.common.collect.ImmutableSet<VKey<Registrar>> loadAllKeysCached()
Loads all registrar keys using an in-memory cache.
-
loadByRegistrarId
public static java.util.Optional<Registrar> loadByRegistrarId(java.lang.String registrarId)
Loads and returns a registrar entity by its id directly from the database.
-
loadByRegistrarIdCached
public static java.util.Optional<Registrar> loadByRegistrarIdCached(java.lang.String registrarId)
Loads and returns a registrar entity by its id using an in-memory cache.Returns empty if the registrar isn't found.
-
loadRequiredRegistrarCached
public static Registrar loadRequiredRegistrarCached(java.lang.String registrarId)
Loads and returns a registrar entity by its id using an in-memory cache.Throws if the registrar isn't found.
-
-