Interface PicklistRequest.Builder

Enclosing interface:
PicklistRequest

public static interface PicklistRequest.Builder
Creates an instance of PicklistRequest. Returned from PicklistRequest.Builder.
  • Method Details

    • withName

      Given a picklist name, builds a request for this picklist.
      Parameters:
      name - name of the picklist to retrieve. Cannot be null or empty.
      Returns:
      this PicklistRequest.Builder
    • withLanguage

      PicklistRequest.Builder withLanguage(String language)
      Optional: Given a language, builds a request for this picklist with the request language. Picklist.getLabel() will default according to the following logic in order:
      • If the request contains a label set, use the label set if the label set exists and its language is active. Otherwise, it is treated as if it is not specified.
      • If the request contains a language, use the language if it is active. Otherwise, use Vault's language.
      • Use the initiating user's label set and language based on the same rules above.
      • If a label set is used, the fallback applies to all labels in this order: label set -> label set language -> Vault language -> English.
      • If no label set is used, the fallback applies to all labels in this order: language -> Vault language -> English.

      Note: If both label set and language are set, the request label set must belong to the specified language.

      Parameters:
      language - the language that picklist labels should default to
      Returns:
      this PicklistRequest.Builder
    • withLabelSet

      PicklistRequest.Builder withLabelSet(String labelSet)
      Optional: Given a labelSet, builds a request for picklist with the request label set. Picklist.getLabel() will default according to the following logic in order:
      • If the request contains a label set, use the label set if the label set exists and its language is active. Otherwise, it is treated as if it is not specified.
      • If the request contains a language, use the language if it is active. Otherwise, use Vault's language.
      • Use the initiating user's label set and language based on the same rules above.
      • If a label set is used, the fallback applies to all labels in this order: label set -> label set language -> Vault language -> English.
      • If no label set is used, the fallback applies to all labels in this order: language -> Vault language -> English.

      Note: If both label set and language are set, the request label set must belong to the specified language.

      Parameters:
      labelSet - the name of label set for picklist labels
      Returns:
      this PicklistRequest.Builder
    • build

      Validates and retrieves a completed PicklistRequest.
      Returns:
      this completed PicklistRequest