Mashables and Mashups : Mashups in EMML : Advanced Mashup Techniques : Wrapping POJO Classes with Mashups
Wrapping POJO Classes with Mashups
 
Using Java Classes in a <script> Statement
You can use any Java class accessible to the Business Analytics Server within the mashup <script> statement using JavaScript. Because of this feature, you can easily use POJO classes as Business Analytics mashables by wrapping them in mashup scripts.
Note:  
Based on the JDK version used with the application server that hosts the Business Analytics Server, Java language classes are also available within mashup <script> statements.
To wrap POJO classes in mashup scripts
1. Include the POJO classes in the Business Analytics Server classpath by copying the compiled class file or JAR file to one of these folders:
*The external configuration folder, if any, for the Business Analytics Server.
Important:  
Deploying additional resources, such ascustom XPath classes, to an external configuration folder simplifies futuredeployments or Business Analytics Serverclusters.
*web-apps-home/presto/WEB-INF/classes.This is the default location, but is not recommended as it complicates Business Analytics Serverdeployments.
*web-apps-home/presto/WEB-INF/lib.This is the default location, but is not recommended as it complicates Business Analytics Serverdeployments.
2. Create a separate wrapper mashup script for each POJO method that you want to expose as a Business Analytics mashable information source.
3. In the wrapper mashup script:
*Add <input> declarations, if needed, to accept inputparameters for the Java method and an <output> declaration to receive themethod return, if any.
*Add a <script> statement to invoke the Java code. See Using Java Classes in a <script> Statementfor instructions and examples.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback