Class Comparisons.Side

java.lang.Object
com.draftable.api.client.Comparisons.Side
Enclosing class:
Comparisons

public static final class Comparisons.Side extends Object
Represents a file passed in as one side of a comparison. Comparisons.Side instances provided to Comparisons.createComparison(com.draftable.api.client.Comparisons.Side, com.draftable.api.client.Comparisons.Side) to provide the left and right files.
  • Method Details

    • create

      @Nonnull public static Comparisons.Side create(@Nonnull String sourceURL, @Nonnull String fileType, @Nullable String displayName)
      Creates a Comparisons.Side for a file provided by a URL.
      Parameters:
      sourceURL - The URL at which the file can be accessed by the Draftable servers.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      displayName - An optional name for the file, to be displayed in the comparison.
      Returns:
      A Comparisons.Side instance representing the given source URL and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull String sourceURL, @Nonnull String fileType)
      Creates a Comparisons.Side for a file provided by a URL.
      Parameters:
      sourceURL - The URL at which the file can be accessed by the Draftable servers.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      Returns:
      A Comparisons.Side instance representing the given source URL and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull URI sourceURI, @Nonnull String fileType, @Nullable String displayName)
      Creates a Comparisons.Side for a file provided by a URI.
      Parameters:
      sourceURI - The URI at which the file can be accessed by the Draftable servers.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      displayName - An optional name for the file, to be displayed in the comparison.
      Returns:
      A Comparisons.Side instance representing the given source URI and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull URI sourceURI, @Nonnull String fileType)
      Creates a Comparisons.Side for a file provided by a URI.
      Parameters:
      sourceURI - The URI at which the file can be accessed by the Draftable servers.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      Returns:
      A Comparisons.Side instance representing the given source URI and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull File file, @Nonnull String fileType, @Nullable String displayName)
      Creates a Comparisons.Side for a file provided by a given File instance.
      Parameters:
      file - The File object providing the content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      displayName - An optional name for the file, to be displayed in the comparison.
      Returns:
      A Comparisons.Side instance representing the given File and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull File file, @Nonnull String fileType)
      Creates a Comparisons.Side for a file provided by a given File instance.
      Parameters:
      file - The File object providing the content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      Returns:
      A Comparisons.Side instance representing the given File and file information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull File file)
      Creates a Comparisons.Side for a file provided by a given File instance, with an inferred file type and no display name.
      Parameters:
      file - The File object providing the content.
      Returns:
      A Comparisons.Side instance representing the given File, with an inferred file type and no display name.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull byte[] fileBytes, @Nonnull String fileType, @Nullable String displayName)
      Creates a Comparisons.Side for a file provided by as a byte array.
      Parameters:
      fileBytes - The byte array providing the file's content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      displayName - An optional name for the file, to be displayed in the comparison.
      Returns:
      A Comparisons.Side instance representing the a file with the given content and information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull byte[] fileBytes, @Nonnull String fileType)
      Creates a Comparisons.Side for a file provided by as a byte array.
      Parameters:
      fileBytes - The byte array providing the file's content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      Returns:
      A Comparisons.Side instance representing the a file with the given content and information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull InputStream fileStream, @Nonnull String fileType, @Nullable String displayName)
      Creates a Comparisons.Side for a file provided by as an InputStream.
      Parameters:
      fileStream - The InputStream providing the file's content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      displayName - An optional name for the file, to be displayed in the comparison.
      Returns:
      A Comparisons.Side instance representing the a file with the given content and information.
    • create

      @Nonnull public static Comparisons.Side create(@Nonnull InputStream fileStream, @Nonnull String fileType)
      Creates a Comparisons.Side for a file provided by as an InputStream.
      Parameters:
      fileStream - The InputStream providing the file's content.
      fileType - The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).
      Returns:
      A Comparisons.Side instance representing the a file with the given content and information.