com.sage.orion.sdata.servlet.accpac
Class SuperviewReportService

java.lang.Object
  extended by com.sage.orion.sdata.servlet.BaseServiceOperation
      extended by com.sage.orion.sdata.servlet.accpac.BaseService
          extended by com.sage.orion.sdata.servlet.accpac.ReportService
              extended by com.sage.orion.sdata.servlet.accpac.SuperviewReportService
All Implemented Interfaces:
ServiceOperation

public class SuperviewReportService
extends ReportService

This service is to handle the Accpac reports that require a superview to generate the report data.

The service's request fields will include all the view's fields except those read-only and calculated fields, and the report's input parameters. Two fields, reportFile and reportOutput, will be added to the list of request fields. They are optional and, if not provided by the client, the reportFile will be defaulted to the file defined in the xxRpt.ini and the reportOutput will be defaulted to "PREVIEW".

The service's response is an Atom entry containing an element responseURL that tells the client where to get the report file.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.accpac.ReportService
ReportService.ReportParamValues
 
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames
 
Constructor Summary
SuperviewReportService(ApplicationContext applicationContext, ResourceContextImpl resourceContext, Resource resource, Service service, SDataViewSet viewSet)
          Constructor which uses the view and report objects created from the viewID and reportName defined for this service operation
 
Method Summary
protected  java.util.List<ServiceField> createRequestFields(SDataRequest request)
          Create a list of input fields for Request.
protected  java.util.List<ServiceField> createTemplateFields(SDataRequest request)
          Create a list of input fields for Template.
protected  java.util.List<SDataResourceElement> getReportParamValueFromView(java.util.Map<java.lang.String,ServiceField> serviceFieldMap)
          Get some report values from the view that can be passed to the report.
protected  SDataResourceElement getReportPayload(SDataResourceElement payload, SDataRequest request, AsyncStatusListener listener)
          process the view to generate the data, then create a new payload for the report
 void shutdown()
          Release any resources allocated for this service operation.
 
Methods inherited from class com.sage.orion.sdata.servlet.accpac.ReportService
createResponseFields, execute, getReport, getReportFileField
 
Methods inherited from class com.sage.orion.sdata.servlet.accpac.BaseService
getApplicationContext, getName, getOperationName, getPath, getResource, getResourceContext, getService, getViewSet, isForMetaDataInquiry
 
Methods inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
getDescription, getResponseFields, getSchema, handleRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuperviewReportService

public SuperviewReportService(ApplicationContext applicationContext,
                              ResourceContextImpl resourceContext,
                              Resource resource,
                              Service service,
                              SDataViewSet viewSet)
Constructor which uses the view and report objects created from the viewID and reportName defined for this service operation

Parameters:
applicationContext - the application context in which the service operation will be run
resourceContext - the resource context in which the service operation will be run
resource - the resource on which the service operation will be performed
service - the service operation to be performed
viewSet - the SDataViewSet associated with the resource
Method Detail

shutdown

public void shutdown()
Description copied from interface: ServiceOperation
Release any resources allocated for this service operation.

Specified by:
shutdown in interface ServiceOperation
Overrides:
shutdown in class BaseServiceOperation

createRequestFields

protected java.util.List<ServiceField> createRequestFields(SDataRequest request)
Create a list of input fields for Request.

The list of request fields will include both the request field list of the view and the request field list of the report.

Overrides:
createRequestFields in class ReportService
Parameters:
request - the SDataRequest
Returns:
a list of service fields for Request.

createTemplateFields

protected java.util.List<ServiceField> createTemplateFields(SDataRequest request)
Create a list of input fields for Template.

The list of template fields will include both the template field list of the view and the template field list of the report.

Overrides:
createTemplateFields in class ReportService
Parameters:
request - the SDataRequest
Returns:
a list of service fields for Template.

getReportPayload

protected SDataResourceElement getReportPayload(SDataResourceElement payload,
                                                SDataRequest request,
                                                AsyncStatusListener listener)
process the view to generate the data, then create a new payload for the report

Overrides:
getReportPayload in class ReportService
Parameters:
payload - the request (input) portion of the payload from the original SData request
request - the SDataRequest
listener - the AsyncStatusListener
Returns:
a payload for the report

getReportParamValueFromView

protected java.util.List<SDataResourceElement> getReportParamValueFromView(java.util.Map<java.lang.String,ServiceField> serviceFieldMap)
Get some report values from the view that can be passed to the report. By default, no values are passed to the report. It is up to the subclass to override this default behavior.

Parameters:
serviceFieldMap - the map of ServiceField from the view processing with serviceField's name (in upper case) as its key
Returns:
a list of SDataResourceElement


Copyright © 2011 Sage Software, Inc. All rights reserved.