org.imixs.workflow.jaxrs
Class ReportRestService

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

public class ReportRestService
extends java.lang.Object

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

Author:
rsoika

Constructor Summary
ReportRestService()
           
 
Method Summary
 void deleteModel(java.lang.String name)
          Deletes a report by name or by uniqueid
static void fopTranformation(java.lang.String xmlSource, java.lang.String xslSource, java.lang.String aEncoding, java.io.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(java.lang.String name, int start, int count, java.lang.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(java.lang.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 getExcecuteReportJSON(java.lang.String name, int start, int count, javax.ws.rs.core.UriInfo uriInfo)
          Returns a JSON stream from a report execution If a attribute list is defined in the report only the corresponding properties will be returend in the xml stream.
 org.imixs.workflow.xml.EntityCollection getExcecuteReportXML(java.lang.String name, int start, int count, javax.ws.rs.core.UriInfo uriInfo)
          Returns a xml stream from a report execution If a attribute list is defined in the report only the corresponding properties will be returend in the xml stream.
 javax.ws.rs.core.StreamingOutput getHelpHTML()
           
 javax.ws.rs.core.Response getPdfReport(java.lang.String name, int start, int count, java.lang.String encoding, javax.ws.rs.core.UriInfo uriInfo)
          helper method for .pdf file extention
 org.imixs.workflow.xml.XMLItemCollection getReport(java.lang.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(java.lang.String xmlSource, java.lang.String xslSource, java.lang.String aEncoding, java.io.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(java.lang.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(java.lang.String name,
                                                   int start,
                                                   int count,
                                                   java.lang.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(java.lang.String name,
                                              int start,
                                              int count,
                                              java.lang.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(java.lang.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(java.lang.String name,
                                                                    int start,
                                                                    int count,
                                                                    @Context
                                                                    javax.ws.rs.core.UriInfo uriInfo)
                                                             throws java.lang.Exception
Returns a xml stream from a report execution If a attribute list is defined in the report only the corresponding properties will be returend in the xml stream.

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

getExcecuteReportJSON

public org.imixs.workflow.xml.EntityCollection getExcecuteReportJSON(java.lang.String name,
                                                                     int start,
                                                                     int count,
                                                                     @Context
                                                                     javax.ws.rs.core.UriInfo uriInfo)
                                                              throws java.lang.Exception
Returns a JSON stream from a report execution If a attribute list is defined in the report only the corresponding properties will be returend in the xml stream.

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

deleteModel

public void deleteModel(java.lang.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(java.lang.String xmlSource,
                                    java.lang.String xslSource,
                                    java.lang.String aEncoding,
                                    java.io.OutputStream output)
                             throws java.lang.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:
java.lang.Exception

fopTranformation

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

Parameters:
xmlSource -
xslSource -
aEncoding -
outputWriter -
Throws:
java.lang.Exception


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