Package com.veeva.vault.sdk.api.picklist
Interface PicklistRequest.Builder
- Enclosing interface:
- PicklistRequest
public static interface PicklistRequest.Builder
Creates an instance of
PicklistRequest. Returned from PicklistRequest.Builder.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validates and retrieves a completedPicklistRequest.withLabelSet(String labelSet) Optional: Given alabelSet, builds a request for picklist with the request label set.withLanguage(String language) Optional: Given alanguage, builds a request for this picklist with the request language.Given a picklistname, builds a request for this picklist.
-
Method Details
-
withName
Given a picklistname, builds a request for this picklist.- Parameters:
name- name of the picklist to retrieve. Cannot be null or empty.- Returns:
- this
PicklistRequest.Builder
-
withLanguage
Optional: Given alanguage, 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
Optional: Given alabelSet, 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
PicklistRequest build()Validates and retrieves a completedPicklistRequest.- Returns:
- this completed
PicklistRequest
-