Interface IdConverter

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface IdConverter
    extends java.io.Closeable
    This is a service that can be used to convert IDs across different formats.

    Typical usage will be to add extensions, tailor IDs for different use-cases, encrypt/obfuscate IDs or get name mappings.
    • Method Detail

      • convert

        java.util.concurrent.Future<java.lang.String> convert​(RestRequest restRequest,
                                                              java.lang.String input,
                                                              Callback<java.lang.String> callback)
        Converts an ID.
        Parameters:
        restRequest - RestRequest representing the request.
        input - the ID that needs to be converted.
        callback - the Callback to invoke once the converted ID is available. Can be null.
        Returns:
        a Future that will eventually contain the converted ID.
      • convert

        default java.util.concurrent.Future<java.lang.String> convert​(RestRequest restRequest,
                                                                      java.lang.String input,
                                                                      BlobInfo blobInfo,
                                                                      Callback<java.lang.String> callback)
        Converts an ID.
        Parameters:
        restRequest - RestRequest representing the request.
        input - the ID that needs to be converted.
        blobInfo - the BlobInfo for an uploaded blob. Can be null for non-upload use cases.
        callback - the Callback to invoke once the converted ID is available. Can be null.
        Returns:
        a Future that will eventually contain the converted ID.