|
||||||||||
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.ExportService
public abstract class ExportService
This is an abstract class to be used to create an service to Export files. By default the service will contain no request fields and 2 response fields - the responseURL and the sessionID. It is left up to the implementer to add any further request or response fields as desired.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation |
---|
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames |
Field Summary | |
---|---|
protected static java.lang.String |
EXPORT_RESPONSE_URL
The response url where the exported file can be downloaded from. |
protected static java.lang.String |
SESSIONID
The caller needs to set the session ID as a cookie in before calling the export URL. |
Constructor Summary | |
---|---|
ExportService(ApplicationContext applicationContext,
ResourceContextImpl resourceContext,
Resource resource,
Service service,
SDataViewSet viewSet)
Constructor. |
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)
Execute this service operation and then set the value for the response fields, if any. |
protected abstract java.io.InputStream |
getExportDataStream()
Gets the data stream to be exported. |
protected abstract java.lang.String |
getFilename()
Gets the filename to be displayed in the download dialog box on the client. |
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 |
Field Detail |
---|
protected static final java.lang.String EXPORT_RESPONSE_URL
protected static final java.lang.String SESSIONID
Constructor Detail |
---|
public ExportService(ApplicationContext applicationContext, ResourceContextImpl resourceContext, Resource resource, Service service, SDataViewSet viewSet)
applicationContext
- resourceContext
- resource
- service
- viewSet
- can be nullMethod Detail |
---|
protected java.util.List<ServiceField> createRequestFields(SDataRequest request)
BaseServiceOperation
Note that value for each field may not be initialized.
createRequestFields
in class BaseServiceOperation
request
- the SDataRequest, or null
protected java.util.List<ServiceField> createResponseFields(SDataRequest request)
BaseServiceOperation
Note that value for each field may not be initialized.
createResponseFields
in class BaseServiceOperation
request
- the SDataRequest, or null
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)
BaseServiceOperation
execute
in class BaseServiceOperation
payload
- the request (input) portion of the payload from the original
SData requestrequest
- the SDataRequestlistener
- the AsyncStatusListener
protected abstract java.io.InputStream getExportDataStream()
protected abstract java.lang.String getFilename()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |