Package google.registry.flows.poll
Class PollFlowUtils
java.lang.Object
google.registry.flows.poll.PollFlowUtils
Static utility functions for poll flows.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
ackPollMessage
(PollMessage pollMessage) Acknowledges the givenPollMessage
and returns whether we should include the current acked message in the updated message count that's returned to the user.static QueryComposer
<PollMessage> createPollMessageQuery
(String registrarId, org.joda.time.DateTime now) Returns the QueryComposer for poll messages from the given registrar that are not in the future.static Optional
<PollMessage> getFirstPollMessage
(String registrarId, org.joda.time.DateTime now) Returns the first (by event time) poll message not in the future for this registrar.static int
getPollMessageCount
(String registrarId, org.joda.time.DateTime now) Returns the number of poll messages for the given registrar that are not in the future.
-
Method Details
-
getPollMessageCount
Returns the number of poll messages for the given registrar that are not in the future. -
getFirstPollMessage
public static Optional<PollMessage> getFirstPollMessage(String registrarId, org.joda.time.DateTime now) Returns the first (by event time) poll message not in the future for this registrar. -
ackPollMessage
Acknowledges the givenPollMessage
and returns whether we should include the current acked message in the updated message count that's returned to the user.The only case where we do so is if an autorenew poll message is acked, but its next event is already ready to be delivered.
-
createPollMessageQuery
public static QueryComposer<PollMessage> createPollMessageQuery(String registrarId, org.joda.time.DateTime now) Returns the QueryComposer for poll messages from the given registrar that are not in the future.
-