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

java.lang.Object
  extended by com.sage.accpac.sm.Report
      extended by com.sage.orion.sdata.servlet.accpac.ServiceReport

public class ServiceReport
extends com.sage.accpac.sm.Report

provides the SData appearance of an Accpac report, adding some service operation semantics *


Field Summary
static java.lang.String REPORT_FILE_NAME_DESC
           
static java.lang.String REPORT_FILE_NAME_TAG
           
static java.lang.String REPORT_FORMAT_PDF_DESC
           
static java.lang.String REPORT_FORMAT_PDF_NAME
           
static java.lang.String REPORT_FORMAT_PREVIEW_DESC
           
static java.lang.String REPORT_FORMAT_PREVIEW_NAME
           
static java.lang.String REPORT_FORMAT_RTF_DESC
           
static java.lang.String REPORT_FORMAT_RTF_NAME
           
static java.lang.String REPORT_NAME_DESC
           
static java.lang.String REPORT_NAME_TAG
           
static java.lang.String REPORT_OUTPUT_FORMAT_DESC
           
static java.lang.String REPORT_OUTPUT_FORMAT_NAME
           
static com.sage.accpac.sm.ReportExportFormat REPORT_PREVIEW
           
static java.lang.String REPORT_RESPONSE_URL_DESC
           
static java.lang.String REPORT_RESPONSE_URL_NAME
           
static java.lang.String REPORT_VIEWER_NAME
           
static java.lang.String SELECTION_FORMULA_DESC
           
static java.lang.String SELECTION_FORMULA_TAG
           
 
Constructor Summary
ServiceReport(java.lang.String name, com.sage.accpac.sm.Program program, Resource resource, Service service)
          Constructor
 
Method Summary
 void export(com.sage.accpac.sm.ReportExportFormat exportFormat, java.lang.String reportFilePath, java.lang.String reportFileName)
          export the report to a file
 ServiceField getInstalledReportsListField(java.lang.String[] reportFileNames)
          construct a service field for the list of installed reports
static ServiceField getRecordSelectionFormulaField()
          construct a service field for Record Selection Formula of the main report
static ServiceField getReportFormatField()
          construct a service field for Report Format
 Resource getResource()
          Get the Resource that the service belongs to
 Service getService()
          Get the Service
 java.util.List<ServiceField> getServiceFields()
          Get a list of service fields from a report.
 void preview(SDataRequest request, java.lang.String reportID)
          preview the report.
 void setParametersValue(java.util.Map<java.lang.String,java.lang.String> paramValueMap)
          Set the value for report parameters
 
Methods inherited from class com.sage.accpac.sm.Report
export, getParameters, getPreviewToken, getReportFile, getReportLocale, getReportName, setParameterValue, setReportFile, setReportLocale, setReportName, setSelectionFormula
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_FILE_NAME_TAG

public static final java.lang.String REPORT_FILE_NAME_TAG
See Also:
Constant Field Values

REPORT_FILE_NAME_DESC

public static final java.lang.String REPORT_FILE_NAME_DESC
See Also:
Constant Field Values

REPORT_NAME_TAG

public static final java.lang.String REPORT_NAME_TAG
See Also:
Constant Field Values

REPORT_NAME_DESC

public static final java.lang.String REPORT_NAME_DESC
See Also:
Constant Field Values

SELECTION_FORMULA_TAG

public static final java.lang.String SELECTION_FORMULA_TAG
See Also:
Constant Field Values

SELECTION_FORMULA_DESC

public static final java.lang.String SELECTION_FORMULA_DESC
See Also:
Constant Field Values

REPORT_OUTPUT_FORMAT_NAME

public static final java.lang.String REPORT_OUTPUT_FORMAT_NAME
See Also:
Constant Field Values

REPORT_OUTPUT_FORMAT_DESC

public static final java.lang.String REPORT_OUTPUT_FORMAT_DESC
See Also:
Constant Field Values

REPORT_FORMAT_PREVIEW_NAME

public static final java.lang.String REPORT_FORMAT_PREVIEW_NAME
See Also:
Constant Field Values

REPORT_FORMAT_PREVIEW_DESC

public static final java.lang.String REPORT_FORMAT_PREVIEW_DESC
See Also:
Constant Field Values

REPORT_FORMAT_PDF_NAME

public static final java.lang.String REPORT_FORMAT_PDF_NAME
See Also:
Constant Field Values

REPORT_FORMAT_PDF_DESC

public static final java.lang.String REPORT_FORMAT_PDF_DESC
See Also:
Constant Field Values

REPORT_FORMAT_RTF_NAME

public static final java.lang.String REPORT_FORMAT_RTF_NAME
See Also:
Constant Field Values

REPORT_FORMAT_RTF_DESC

public static final java.lang.String REPORT_FORMAT_RTF_DESC
See Also:
Constant Field Values

REPORT_RESPONSE_URL_NAME

public static final java.lang.String REPORT_RESPONSE_URL_NAME
See Also:
Constant Field Values

REPORT_RESPONSE_URL_DESC

public static final java.lang.String REPORT_RESPONSE_URL_DESC
See Also:
Constant Field Values

REPORT_VIEWER_NAME

public static final java.lang.String REPORT_VIEWER_NAME
See Also:
Constant Field Values

REPORT_PREVIEW

public static final com.sage.accpac.sm.ReportExportFormat REPORT_PREVIEW
Constructor Detail

ServiceReport

public ServiceReport(java.lang.String name,
                     com.sage.accpac.sm.Program program,
                     Resource resource,
                     Service service)
Constructor

Parameters:
name - the name of the report
program - the Accpac Program
resource - the Resource that the service belongs to
service - the Service
Method Detail

getResource

public Resource getResource()
Get the Resource that the service belongs to

Returns:
the Resource that the service belongs to

getService

public Service getService()
Get the Service

Returns:
the Service

getRecordSelectionFormulaField

public static ServiceField getRecordSelectionFormulaField()
construct a service field for Record Selection Formula of the main report

Returns:
the service field with value set to ""

getReportFormatField

public static ServiceField getReportFormatField()
construct a service field for Report Format

Returns:
the service field with value set to "PREVIEW"

getInstalledReportsListField

public ServiceField getInstalledReportsListField(java.lang.String[] reportFileNames)
construct a service field for the list of installed reports

Parameters:
reportFileNames - the array of installed reports for the application
Returns:
the service field with value set to the report file defined in the xxRpt.ini file

getServiceFields

public java.util.List<ServiceField> getServiceFields()
Get a list of service fields from a report. Note that all the parameters of the report will be added to the list of service fields

Returns:
a list of service fields. Note that the value for each field is set to an empty string.

setParametersValue

public void setParametersValue(java.util.Map<java.lang.String,java.lang.String> paramValueMap)
Set the value for report parameters

Parameters:
paramValueMap - a map of report parameter values, with the key being the SData name of the property

export

public void export(com.sage.accpac.sm.ReportExportFormat exportFormat,
                   java.lang.String reportFilePath,
                   java.lang.String reportFileName)
export the report to a file

Parameters:
exportFormat - the format of the exported report (i.e: PDF, RFT, etc.)
reportFilePath - the path of the report file
reportFileName - the name of the report file

preview

public void preview(SDataRequest request,
                    java.lang.String reportID)
preview the report.

Parameters:
request - the SDataRequest
reportID - the report ID that identifies the report source in the HTTP session


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