|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.BaseServiceOperation
com.sage.orion.sdata.servlet.accpac.BaseService
com.sage.orion.sdata.servlet.accpac.ReportService
public class ReportService
This class is designed to handle the SData $service operation that generates an Accpac report.
The service's request fields will be created from the report's input parameters. Two fields, reportFile and reportOutput, will be added to the list of request fields. These two fields 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.
Nested Class Summary | |
---|---|
protected static class |
ReportService.ReportParamValues
a structure consisting of reportFile, reportFormat, reportName, a name to value map of report parameters, and selectFormula |
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation |
---|
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames |
Constructor Summary | |
---|---|
ReportService(ApplicationContext applicationContext,
ResourceContextImpl resourceContext,
Resource resource,
Service service,
SDataViewSet viewSet)
Constructor which uses the report object created from the report name 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> |
createResponseFields(SDataRequest request)
Create a list of output fields for Response. |
protected java.util.List<ServiceField> |
createTemplateFields(SDataRequest request)
Create a list of fields for Template. |
protected java.util.List<ServiceField> |
execute(SDataResourceElement payload,
SDataRequest request,
AsyncStatusListener listener)
generate the report and then set the value for field "responseURL" |
protected ServiceReport |
getReport()
|
protected ServiceField |
getReportFileField()
create a service field for the report file. |
protected SDataResourceElement |
getReportPayload(SDataResourceElement payload,
SDataRequest request,
AsyncStatusListener listener)
construct a payload from the input payload for the report by possibly adding/deleting parameter values. |
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, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReportService(ApplicationContext applicationContext, ResourceContextImpl resourceContext, Resource resource, Service service, SDataViewSet viewSet)
applicationContext
- the application context in which the service operation will be
runresourceContext
- the resource context in which the service operation will be runresource
- the resource on which the service operation will be performedservice
- the service operation to be performedviewSet
- the SDataViewSet associated with the resourceMethod Detail |
---|
protected java.util.List<ServiceField> createRequestFields(SDataRequest request)
The list of request fields will include all parameters of the report and each field has been initialized to an empty string.
Two additional fields, reportFile and reportOutput, will be added to the list. These two fields 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".
createRequestFields
in class BaseServiceOperation
request
- the SDataRequest
protected java.util.List<ServiceField> createResponseFields(SDataRequest request)
The list of response fields contains only one element "responseURL" that tells the client where to get the report.
createResponseFields
in class BaseServiceOperation
request
- the SDataRequest
protected java.util.List<ServiceField> createTemplateFields(SDataRequest request)
BaseServiceOperation
The list must be the same as (or a subset of) request fields and each field has been initialized with default value
createTemplateFields
in class BaseServiceOperation
request
- the SDataRequest
protected java.util.List<ServiceField> execute(SDataResourceElement payload, SDataRequest request, AsyncStatusListener listener)
execute
in class BaseServiceOperation
payload
- the request (input) portion of the payload from the original
SData requestrequest
- the SDataRequestlistener
- the AsyncStatusListener
protected SDataResourceElement getReportPayload(SDataResourceElement payload, SDataRequest request, AsyncStatusListener listener)
payload
- the request (input) portion of the payload from the original
SData requestrequest
- the SDataRequestlistener
- the AsyncStatusListener
protected ServiceReport getReport()
protected ServiceField getReportFileField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |