getValue
getValue(audienceID, configData, arguments)
getValue 메소드는 콜아웃의 핵심 기능을 수행하고 결과를 리턴합니다.
getValue 메소드에 필요한 매개변수는 다음과 같습니다.
*
audienceID - 대상 ID를 식별하는 값입니다.
*
configData - 콜아웃에 필요한 구성 데이터의 키-값 쌍이 있는 맵입니다.
*
arguments - 콜아웃에 필요한 인수입니다. 각 인수는 String, Double, Date 또는 이 중 하나의 List입니다. List 인수는 null 값을 포함할 수 있지만 List는 예를 들어 String 및 Double을 포함할 수 없습니다.
구현 내에서 인수 유형 검사를 수행해야 합니다.
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;
}