Package google.registry.model.registrar
Class RegistrarPoc
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.registrar.RegistrarPoc
-
- All Implemented Interfaces:
Jsonifiable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
@Entity public class RegistrarPoc extends ImmutableObject implements Jsonifiable, UnsafeSerializable
A contact for a Registrar. Note, equality, hashCode and comparable have been overridden to only enable key equality.IMPORTANT NOTE: Any time that you change, update, or delete RegistrarContact entities, you *MUST* also modify the persisted Registrar entity with
Registrar.contactsRequireSyncing
set to true.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegistrarPoc.Builder
A builder for constructing aRegistrarPoc
, since it is immutable.static class
RegistrarPoc.RegistrarPocId
Class to represent the composite primary key forRegistrarPoc
entity.static class
RegistrarPoc.Type
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 Modifier and Type Field Description java.lang.String
registrarId
-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description RegistrarPoc()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RegistrarPoc.Builder
asBuilder()
VKey<RegistrarPoc>
createVKey()
java.lang.String
getEmailAddress()
java.lang.String
getFaxNumber()
java.lang.String
getLoginEmailAddress()
java.lang.String
getName()
java.lang.String
getPhoneNumber()
java.util.Optional<java.lang.String>
getRegistryLockEmailAddress()
com.google.common.collect.ImmutableSortedSet<RegistrarPoc.Type>
getTypes()
boolean
getVisibleInDomainWhoisAsAbuse()
boolean
getVisibleInWhoisAsAdmin()
boolean
getVisibleInWhoisAsTech()
boolean
isAllowedToSetRegistryLockPassword()
boolean
isRegistryLockAllowed()
java.util.Map<java.lang.String,java.lang.Object>
toJsonMap()
Returns a JSON representation of this object.java.lang.String
toStringMultilinePlainText()
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(java.lang.String registryLockPassword)
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
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
Registrar.contactsRequireSyncing
field set to true.
-
getName
public java.lang.String getName()
-
getEmailAddress
public java.lang.String getEmailAddress()
-
getRegistryLockEmailAddress
public java.util.Optional<java.lang.String> getRegistryLockEmailAddress()
-
getPhoneNumber
public java.lang.String getPhoneNumber()
-
getFaxNumber
public java.lang.String getFaxNumber()
-
getTypes
public com.google.common.collect.ImmutableSortedSet<RegistrarPoc.Type> getTypes()
-
getVisibleInWhoisAsAdmin
public boolean getVisibleInWhoisAsAdmin()
-
getVisibleInWhoisAsTech
public boolean getVisibleInWhoisAsTech()
-
getVisibleInDomainWhoisAsAbuse
public boolean getVisibleInDomainWhoisAsAbuse()
-
getLoginEmailAddress
public java.lang.String getLoginEmailAddress()
-
asBuilder
public RegistrarPoc.Builder asBuilder()
-
isAllowedToSetRegistryLockPassword
public boolean isAllowedToSetRegistryLockPassword()
-
isRegistryLockAllowed
public boolean isRegistryLockAllowed()
-
verifyRegistryLockPassword
public boolean verifyRegistryLockPassword(java.lang.String registryLockPassword)
-
toStringMultilinePlainText
public java.lang.String 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
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
-
createVKey
public VKey<RegistrarPoc> createVKey()
- Overrides:
createVKey
in classImmutableObject
-
-