Package google.registry.model.poll
Class PollMessageExternalKeyConverter
java.lang.Object
google.registry.model.poll.PollMessageExternalKeyConverter
A converter between external key strings for
PollMessage
s (i.e. what registrars use to
identify and ACK them) and VKey
s to the resource.
The format of the key string is A-B as follows:
A = PollMessage.id (decimal) B = PollMessage.eventTime (decimal, year only)
A typical poll message ID might thus look like: 10072612074-2018
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An exception thrown when an external key cannot be parsed. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
makePollMessageExternalId
(PollMessage pollMessage) Returns an external poll message ID for the given poll message.static VKey
<PollMessage> parsePollMessageExternalId
(String externalKey) Returns aVKey
to aPollMessage
corresponding with the external ID.
-
Method Details
-
makePollMessageExternalId
Returns an external poll message ID for the given poll message. -
parsePollMessageExternalId
Returns aVKey
to aPollMessage
corresponding with the external ID.Note that the year field that is included at the end of the poll message isn't actually used for anything; it exists solely to create unique externally visible IDs for autorenews. We thus ignore it (for now) for backwards compatibility reasons, so that registrars can still ACK existing poll message IDs they may have lying around.
- Throws:
PollMessageExternalKeyConverter.PollMessageExternalKeyParseException
- if the external key has an invalid format.
-