Class ResourceTransferUtils

  • public final class ResourceTransferUtils
    extends java.lang.Object
    Static utility functions for resource transfers.
    • Method Detail

      • createPendingTransferNotificationResponse

        public static PendingActionNotificationResponse createPendingTransferNotificationResponse​(EppResource eppResource,
                                                                                                  Trid transferRequestTrid,
                                                                                                  boolean actionResult,
                                                                                                  org.joda.time.DateTime processedDate)
        Create a pending action notification response indicating the resolution of a transfer.

        The returned object will use the id and type of this resource, the trid of the resource's last transfer request, and the specified status and date.

      • updateForeignKeyIndexDeletionTime

        public static <R extends EppResource> void updateForeignKeyIndexDeletionTime​(R resource)
        Update the relevant ForeignKeyIndex to cache the new deletion time.
      • handlePendingTransferOnDelete

        public static <R extends EppResource & EppResource.ResourceWithTransferData> void handlePendingTransferOnDelete​(R resource,
                                                                                                                        R newResource,
                                                                                                                        org.joda.time.DateTime now,
                                                                                                                        HistoryEntry historyEntry)
        If there is a transfer out, delete the server-approve entities and enqueue a poll message.
      • denyPendingTransfer

        public static <R extends EppResource & EppResource.ResourceWithTransferData> R denyPendingTransfer​(R resource,
                                                                                                           TransferStatus transferStatus,
                                                                                                           org.joda.time.DateTime now,
                                                                                                           java.lang.String lastEppUpdateClientId)
        Resolve a pending transfer by denying it.

        This removes the StatusValue.PENDING_TRANSFER status, sets the TransferStatus, clears all the server-approve fields on the TransferData, sets the expiration time of the last pending transfer to now, sets the last EPP update time to now, and sets the last EPP update client id to the given client id.