org.imixs.workflow.jaxrs
Class ReportRestService

java.lang.Object
  extended by org.imixs.workflow.jaxrs.ReportRestService

public class ReportRestService
extends Object

The WorkflowService Handler supports methods to process different kind of request URIs

Author:
rsoika

Constructor Summary
ReportRestService()
           
 
Method Summary
 void deleteModel(String name)
          Deletes a report by name or by uniqueid
static void fopTranformation(String xmlSource, String xslSource, String aEncoding, OutputStream output)
          This method dos a apache FOP transformation using the FopFactory
 org.imixs.workflow.xml.EntityCollection getAllReports(int start, int count)
           
 javax.ws.rs.core.Response getExcecuteReport(String name, int start, int count, String encoding, javax.ws.rs.core.UriInfo uriInfo)
          Executes a single report defined by name or uniqueid The output depends on the requested media format Since 2.1.2: the ReportService also supports FOP Transformation.
 org.imixs.workflow.xml.EntityTable getExcecuteReportHTML(String name, int start, int count, javax.ws.rs.core.UriInfo uriInfo)
          Returns an HTML Stream with a HTML Datatable corresponding to the report query.
 org.imixs.workflow.xml.EntityCollection getExcecuteReportXML(String name, int start, int count, javax.ws.rs.core.UriInfo uriInfo)
          Returns a xml stream from a report execution
 javax.ws.rs.core.StreamingOutput getHelpHTML()
           
 javax.ws.rs.core.Response getPdfReport(String name, int start, int count, String encoding, javax.ws.rs.core.UriInfo uriInfo)
          helper method for .pdf file extention
 org.imixs.workflow.xml.XMLItemCollection getReport(String name)
          Returns a single report by name or by uniqueid
 void postReport(org.imixs.workflow.xml.XMLItemCollection reportCol)
           
 void putReport(org.imixs.workflow.xml.XMLItemCollection reportCol)
          This method updates or creates a Report object provided in a XMLItemCollection object
static void xslTranformation(String xmlSource, String xslSource, String aEncoding, OutputStream output)
          This method transforms an xml string with a provided xsl String The XMLSource will be read from a InputStreamReader object to provide the XSLTransformer with a inputsream in expected encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportRestService

public ReportRestService()
Method Detail

getHelpHTML

public javax.ws.rs.core.StreamingOutput getHelpHTML()

getAllReports

public org.imixs.workflow.xml.EntityCollection getAllReports(int start,
                                                             int count)

getReport

public org.imixs.workflow.xml.XMLItemCollection getReport(String name)
Returns a single report by name or by uniqueid

Parameters:
name - reportname or uniqueid of report
Returns:

getExcecuteReport

public javax.ws.rs.core.Response getExcecuteReport(String name,
                                                   int start,
                                                   int count,
                                                   String encoding,
                                                   @Context
                                                   javax.ws.rs.core.UriInfo uriInfo)
Executes a single report defined by name or uniqueid The output depends on the requested media format Since 2.1.2: the ReportService also supports FOP Transformation. If the ContentType is 'application/pdf' the method will call fopTransofrmation instat of xslTransformation. The FOP API need to be provided by the main application.

Parameters:
name - reportname of the report to be executed
Returns:
a collection of entiteis

getPdfReport

public javax.ws.rs.core.Response getPdfReport(String name,
                                              int start,
                                              int count,
                                              String encoding,
                                              @Context
                                              javax.ws.rs.core.UriInfo uriInfo)
helper method for .pdf file extention

Parameters:
name - reportname of the report to be executed
Returns:
a collection of entiteis

getExcecuteReportHTML

public org.imixs.workflow.xml.EntityTable getExcecuteReportHTML(String name,
                                                                int start,
                                                                int count,
                                                                @Context
                                                                javax.ws.rs.core.UriInfo uriInfo)
Returns an HTML Stream with a HTML Datatable corresponding to the report query.

Parameters:
name -
start -
count -
Returns:

getExcecuteReportXML

public org.imixs.workflow.xml.EntityCollection getExcecuteReportXML(String name,
                                                                    int start,
                                                                    int count,
                                                                    @Context
                                                                    javax.ws.rs.core.UriInfo uriInfo)
                                                             throws Exception
Returns a xml stream from a report execution

Parameters:
name - reportname of the report to be executed
start -
count -
Returns:
Throws:
Exception

deleteModel

public void deleteModel(String name)
Deletes a report by name or by uniqueid

Parameters:
name - of report or uniqueid

putReport

public void putReport(org.imixs.workflow.xml.XMLItemCollection reportCol)
This method updates or creates a Report object provided in a XMLItemCollection object

Parameters:
reportCol - - report data

postReport

public void postReport(org.imixs.workflow.xml.XMLItemCollection reportCol)

xslTranformation

public static void xslTranformation(String xmlSource,
                                    String xslSource,
                                    String aEncoding,
                                    OutputStream output)
                             throws Exception
This method transforms an xml string with a provided xsl String The XMLSource will be read from a InputStreamReader object to provide the XSLTransformer with a inputsream in expected encoding.

Parameters:
xmlSource -
xsltSourceFile -
Throws:
Exception

fopTranformation

public static void fopTranformation(String xmlSource,
                                    String xslSource,
                                    String aEncoding,
                                    OutputStream output)
                             throws Exception
This method dos a apache FOP transformation using the FopFactory

Parameters:
xmlSource -
xslSource -
aEncoding -
outputWriter -
Throws:
Exception


Copyright © 2010-2011 Imixs Software Solutions GmbH. All Rights Reserved.