I'm trying to use the Java SDK provided by Prediction.io but am running into some trouble. Basically, to make use of the Java SDK, the Java code is as below.
import com.google.common.collect.ImmutableMap;
import io.prediction.EventClient;
import org.joda.time.DateTime;
EventClient eventClient = new EventClient(1);
eventClient.setUser("id_1", ImmutableMap.<String, Object>of(), new DateTime("2004-12-13T21:39:45.618-07:00"));
What I've done is:
1) Compiled the Java SDK and copied the resulting jar file and dependencies to /opt/railo/lib/
2) Managed to get a dump of the EventClient class using the code below:
<cfset MyTest = CreateObject("java", "io.prediction.EventClient")>
<cfdump var="#MyTest#">
I'm pretty much lost after that. Although I'm pretty used to Coldfusion, I'm a total Java newbie. How do I use/replicate the Java code above into Coldfusion?