ExamGecko
Question list
Search
Search

Question 23 - Certified B2B Commerce Developer discussion

Report
Export

The ccUtil apex class in Salesforce B2B Commerce provides numerous utility functions that can be leveraged in subscriber classes.

What are two ways to check the input or return data of the Global API's? (2 answers)

A.
ccrz.ccUtil.isNotEmpty(Map<String, Object>) andccrz.ccUtil.isNotEmpty(List<Object>)
Answers
A.
ccrz.ccUtil.isNotEmpty(Map<String, Object>) andccrz.ccUtil.isNotEmpty(List<Object>)
B.
ccrz.ccUtil.isNotValid(Map<String, Object>) andccrz.ccUtil.isNotValid(List<Object>)
Answers
B.
ccrz.ccUtil.isNotValid(Map<String, Object>) andccrz.ccUtil.isNotValid(List<Object>)
C.
ccrz.ccUtil.isValid(Map<String, Object>) and ccrz.ccUtil.isValid(List<Object>)
Answers
C.
ccrz.ccUtil.isValid(Map<String, Object>) and ccrz.ccUtil.isValid(List<Object>)
D.
ccrz.ccUtil.isEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(List<Object>)
Answers
D.
ccrz.ccUtil.isEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(List<Object>)
Suggested answer: A, D

Explanation:

The ccUtil apex class provides two methods to check the input or return data of the Global API's: ccrz.ccUtil.isNotEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(Map<String, Object>). These methods return true if the map is not null and contains at least one entry, or if the map is null or empty, respectively. Similarly, ccrz.ccUtil.isNotEmpty(List<Object>) and ccrz.ccUtil.isEmpty(List<Object>) return true if the list is not null and contains at least one element, or if the list is null or empty, respectively. These methods are useful for validating the input parameters or the output results of the Global API's.

asked 23/09/2024
Arthur la Feber
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first