Class RegistrarPocBase
- All Implemented Interfaces:
Jsonifiable
,UnsafeSerializable
,Serializable
,Cloneable
- Direct Known Subclasses:
RegistrarPoc
IMPORTANT NOTE: Any time that you change, update, or delete RegistrarContact entities, you
*MUST* also modify the persisted Registrar entity with RegistrarBase.contactsRequireSyncing
set to true.
This class deliberately does not include an Id
so that any foreign-keyed fields can
refer to the proper parent entity's ID, whether we're storing this in the DB itself or as part of
another entity.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
RegistrarPocBase.Builder<T extends RegistrarPocBase,
B extends RegistrarPocBase.Builder<T, B>> A builder for constructing aRegistrarPoc
, since it is immutable.static enum
Registrar contacts types for partner communication tracking.Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRegistrarPocBase.Builder
<? extends RegistrarPocBase, ?> getName()
com.google.common.collect.ImmutableSortedSet
<RegistrarPocBase.Type> getTypes()
boolean
boolean
boolean
boolean
boolean
void
setEmailAddress
(String emailAddress) These methods set the email address and registrar IDvoid
setRegistrarId
(String registrarId) Returns a JSON representation of this object.Returns a string representation that's human friendly.static void
updateContacts
(Registrar registrar, com.google.common.collect.ImmutableSet<RegistrarPoc> contacts) Helper to update the contacts associated with a Registrar.boolean
verifyRegistryLockPassword
(String registryLockPassword) Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Field Details
-
registrarId
-
-
Constructor Details
-
RegistrarPocBase
public RegistrarPocBase()
-
-
Method Details
-
updateContacts
public static void updateContacts(Registrar registrar, com.google.common.collect.ImmutableSet<RegistrarPoc> contacts) Helper to update the contacts associated with a Registrar. This requires querying for the existing contacts, deleting existing contacts that are not part of the givencontacts
set, and then saving the givencontacts
.IMPORTANT NOTE: If you call this method then it is your responsibility to also persist the relevant Registrar entity with the
RegistrarBase.contactsRequireSyncing
field set to true. -
getName
-
getEmailAddress
-
getRegistryLockEmailAddress
-
getPhoneNumber
-
getFaxNumber
-
getTypes
-
getVisibleInWhoisAsAdmin
public boolean getVisibleInWhoisAsAdmin() -
getVisibleInWhoisAsTech
public boolean getVisibleInWhoisAsTech() -
getVisibleInDomainWhoisAsAbuse
public boolean getVisibleInDomainWhoisAsAbuse() -
asBuilder
-
isAllowedToSetRegistryLockPassword
public boolean isAllowedToSetRegistryLockPassword() -
isRegistryLockAllowed
public boolean isRegistryLockAllowed() -
verifyRegistryLockPassword
-
toStringMultilinePlainText
Returns a string representation that's human friendly.The output will look something like this:
Some Person person@example.com Tel: +1.2125650666 Types: [ADMIN, WHOIS] Visible in WHOIS as Admin contact: Yes Visible in WHOIS as Technical contact: No Registrar-Console access: Yes Login Email Address: person@registry.example
-
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
-
setEmailAddress
These methods set the email address and registrar IDThis should only be used for restoring the fields of an object being loaded in a PostLoad method (effectively, when it is still under construction by Hibernate). In all other cases, the object should be regarded as immutable and changes should go through a Builder.
In addition to this special case use, this method must exist to satisfy Hibernate.
-
setRegistrarId
-