org.pentaho.platform.web.servlet
Class AdhocWebService
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.pentaho.platform.web.servlet.ServletBase
org.pentaho.platform.web.servlet.AdhocWebService
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ILogger
public class AdhocWebService
- extends ServletBase
Servlet Class
web.servlet name="ViewAction" display-name="Name for ViewAction" description="Description for ViewAction" web.servlet-mapping url-pattern="/ViewAction" web.servlet-init-param name="A parameter" value="A value"
- See Also:
- Serialized Form
Fields inherited from interface org.pentaho.platform.api.engine.ILogger |
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN |
Method Summary |
void |
createJFreeReportDefinitionAsStream(String reportXML,
String templatePath,
org.dom4j.Element mqlNode,
ISolutionRepository repository,
IPentahoSession userSession,
OutputStream jfreeMergedOutputStream)
Create the JFreeReport file. |
void |
createMQLQueryActionSequence(String domainId,
String modelId,
String tableId,
String columnId,
String searchStr,
OutputStream outputStream,
String userSessionName)
|
ByteArrayOutputStream |
createMQLReportActionSequenceAsStream(String reportName,
String reportDescription,
org.dom4j.Element mqlNode,
String[] outputTypeList,
String xactionName,
String jfreeReportXML,
String jfreeReportFilename,
String loggingLevel,
IPentahoSession userSession)
|
static IRuntimeContext |
executeActionSequence(String xactionStr,
String xActionName,
IParameterProvider parameterProvider,
IPentahoSession session,
OutputStream outputStream)
|
void |
getBusinessModel(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
org.apache.commons.logging.Log |
getLogger()
|
String |
getPayloadAsString(javax.servlet.http.HttpServletRequest request)
|
org.dom4j.Document |
getSolutionRepositoryDoc(String solutionName,
String path,
IPentahoSession userSession)
|
void |
getTemplateReportSpec(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
void |
getWaqrReportSpecDoc(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
void |
listBusinessModels(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
void |
lookupValues(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
static void |
main(String[] args)
|
void |
searchTable(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
|
Methods inherited from class org.pentaho.platform.web.servlet.ServletBase |
debug, debug, error, error, fatal, fatal, getLoggingLevel, getObjectName, info, info, setLoggingLevel, trace, trace, warn, warn |
Methods inherited from class javax.servlet.http.HttpServlet |
service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
AdhocWebService
public AdhocWebService()
getLogger
public org.apache.commons.logging.Log getLogger()
- Specified by:
getLogger
in class ServletBase
getPayloadAsString
public String getPayloadAsString(javax.servlet.http.HttpServletRequest request)
throws IOException
- Throws:
IOException
executeActionSequence
public static IRuntimeContext executeActionSequence(String xactionStr,
String xActionName,
IParameterProvider parameterProvider,
IPentahoSession session,
OutputStream outputStream)
createJFreeReportDefinitionAsStream
public void createJFreeReportDefinitionAsStream(String reportXML,
String templatePath,
org.dom4j.Element mqlNode,
ISolutionRepository repository,
IPentahoSession userSession,
OutputStream jfreeMergedOutputStream)
throws IOException,
AdhocWebServiceException,
org.pentaho.pms.core.exception.PentahoMetadataException
- Create the JFreeReport file.
NOTE on the merge precedence: this method should use properties set by the
WAQR UI. If the waqr UI did not set the property, then the property
should be set by the metadata. If the metadata did not set a property,
then the property should be set by the template. If the template
did not set the property, then use the default.
NOTE on the merge algorithm:
For each of the attributes in the fields (aka columns) of the reportspec,
if the attribute is present in the reportspec that comes in from the client
(ie reportXML param), and the attribute has a non-default value, do not change it.
If the attribute is not present or has a default value, and if there is metadata
for that attribute, merge the metadata attribute. This take place inline in the
main loop of this method. If after the metadata merge the attribute
still does not have a value, merge the template value. This takes place
in the AdhocWebService.applyTemplate() method.
If the template does not have a value, do nothing (the default will be used).
- Parameters:
reportDoc
- reportXML
- templatePath
- mqlNode
- repository
- userSession
-
- Throws:
IOException
AdhocWebServiceException
org.pentaho.pms.core.exception.PentahoMetadataException
createMQLQueryActionSequence
public void createMQLQueryActionSequence(String domainId,
String modelId,
String tableId,
String columnId,
String searchStr,
OutputStream outputStream,
String userSessionName)
throws IOException
- Throws:
IOException
createMQLReportActionSequenceAsStream
public ByteArrayOutputStream createMQLReportActionSequenceAsStream(String reportName,
String reportDescription,
org.dom4j.Element mqlNode,
String[] outputTypeList,
String xactionName,
String jfreeReportXML,
String jfreeReportFilename,
String loggingLevel,
IPentahoSession userSession)
throws IOException,
AdhocWebServiceException
- Throws:
IOException
AdhocWebServiceException
lookupValues
public void lookupValues(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws IOException
- Throws:
IOException
listBusinessModels
public void listBusinessModels(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws IOException
- Throws:
IOException
getBusinessModel
public void getBusinessModel(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws IOException
- Throws:
IOException
searchTable
public void searchTable(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws IOException
- Throws:
IOException
getTemplateReportSpec
public void getTemplateReportSpec(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws AdhocWebServiceException,
IOException
- Throws:
AdhocWebServiceException
IOException
getWaqrReportSpecDoc
public void getWaqrReportSpecDoc(IParameterProvider parameterProvider,
OutputStream outputStream,
IPentahoSession userSession,
boolean wrapWithSoap)
throws AdhocWebServiceException,
IOException
- Throws:
AdhocWebServiceException
IOException
getSolutionRepositoryDoc
public org.dom4j.Document getSolutionRepositoryDoc(String solutionName,
String path,
IPentahoSession userSession)
main
public static void main(String[] args)