Class DefaultPromptQueryImportSpec.Builder

java.lang.Object
de.xima.fc.prompt.mgmt.defaults.DefaultPromptQueryImportSpec.Builder
Enclosing class:
DefaultPromptQueryImportSpec

public static final class DefaultPromptQueryImportSpec.Builder extends Object
A builder for a prompt query import specification.
Since:
8.5.0
  • Method Details

    • alternativeConnectionId

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder alternativeConnectionId(PromptObjectIdentifier alternativeConnectionId)
      Sets the optional alternative connection identifier to use instead of the one stored in the prompt query export (if any). Needs to be provided when the prompt connection is not part of the import data and therefore cannot be created alongside the query.
      Parameters:
      alternativeConnectionId - The ID of the alternative connection, if any.
      Returns:
      The builder instance for chaining method calls.
    • build

      public IPromptQueryImportSpec build()
      Builds the prompt query import specification with the provided data.
      Returns:
      The built prompt query import specification.
    • connectionTargetScope

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder connectionTargetScope(PromptScope connectionTargetScope)
      Get the optional scope to import the prompt connection into, if the connection is created alongside the query. Needs to be provided if no alternative connection ID is given.
      Parameters:
      connectionTargetScope - The scope to import the prompt connection into, if applicable.
      Returns:
      The builder instance for chaining method calls.
    • password

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder password(char[] password)
      Gets the password to decrypt the prompt query data. May be null or empty, in which case no decryption is applied.
      Parameters:
      password - The password to decrypt the prompt query data, or null/empty if no decryption is applied.
      Returns:
      The builder instance for chaining method calls.
    • password

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder password(String password)
      Gets the password to decrypt the prompt query data. May be null or empty, in which case no decryption is applied.
      Parameters:
      password - The password to decrypt the prompt query data, or null/empty if no decryption is applied.
      Returns:
      The builder instance for chaining method calls.
    • queryTargetScope

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder queryTargetScope(PromptScope queryTargetScope)
      Gets the scope to import the prompt query into.
      Parameters:
      queryTargetScope - The scope of the query.
      Returns:
      The builder instance for chaining method calls.
    • updateConnectionIfExists

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder updateConnectionIfExists(boolean updateConnectionIfExists)
      Sets whether to update the prompt connection if it already exists in the target scope (identified by its UUID). Only applies when an alternative connection ID is not provided and the connection is created alongside the query. If false and the prompt connection already exists, an error is raised.
      Parameters:
      updateConnectionIfExists - true if the prompt connection should be updated if it already exists, false otherwise.
      Returns:
      The builder instance for chaining method calls.
    • updateQueryIfExists

      @CanIgnoreReturnValue public DefaultPromptQueryImportSpec.Builder updateQueryIfExists(boolean updateQueryIfExists)
      Sets whether to update the prompt query if it already exists in the target scope (identified by its UUID). If false and the prompt query already exists, an error is raised.
      Parameters:
      updateQueryIfExists - true if the prompt query should be updated if it already exists, false otherwise.
      Returns:
      The builder instance for chaining method calls.