Class PollFlowUtils

java.lang.Object
google.registry.flows.poll.PollFlowUtils

public final class PollFlowUtils extends Object
Static utility functions for poll flows.
  • Method Details

    • getPollMessageCount

      public 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.
    • 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

      public static void ackPollMessage(PollMessage pollMessage)
      Acknowledges the given PollMessage 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.