getValue
getValue(audienceID, configData, arguments)
getValue 方法执行调出的核心功能并返回结果。
getValue 方法需要以下参数:
*
audienceID - 用于标识受众标识的值。
*
configData - 一个映射,包含调出所必需的配置数据的键值对。
*
arguments - 调出所必需的参数。每个参数可以是一个字符串、双精度类型、日期或它们其中一个的列表。 列表参数可以包含空值,但是列表不能包含字符串和双精度类型(举例而言)。
应在您的实现中进行参数类型检查。
如果 getValue 方法由于任何原因而失败,那么将返回 CalloutException
返回值
getValue 方法返回字符串的列表。
示例
public List<String> getValue(AudienceId audienceId, Map<String, 
String> configurationData, Object... arguments) throws CalloutException
{
Long customerId = (Long) audienceId.getComponentValue("Customer");
// now query scoreQueryUtility for the credit score of customerId
Double score = scoreQueryUtility.query(customerId);
String str = Double.toString(score);
List<String> list = new LinkedList<String>();
list.add(str);
return list;
}