com.trackstudio.securedkernel
Class SecuredReportAdapterManager

java.lang.Object
  extended by com.trackstudio.securedkernel.SecuredReportAdapterManager

public class SecuredReportAdapterManager
extends java.lang.Object

This manager is used for creating and deleting of reports


Field Summary
static java.lang.String RT_CSV
           
static java.lang.String RT_EXCEL
           
static java.lang.String RT_HTML
           
static java.lang.String RT_Klip
           
static java.lang.String RT_MS_PROJECT
           
static java.lang.String RT_PDF
           
static java.lang.String RT_RSS
           
static java.lang.String RT_RTF
           
static java.lang.String RT_TEXT
           
static java.lang.String RT_TREE_XML
           
static java.lang.String RT_XML
           
 
Constructor Summary
SecuredReportAdapterManager()
           
 
Method Summary
 java.lang.String createReport(SessionContext sc, java.lang.String name, java.lang.String rtypeId, boolean priv, java.lang.String filterId, java.lang.String taskId)
          Create a new report
 void deleteReport(SessionContext sc, java.lang.String reportId)
          Delete report
 byte[] generateReport(SessionContext sc, java.lang.String reportId, java.lang.String taskId, boolean pageBreak, java.lang.String format, java.lang.String delimiter, boolean isDieagram, java.lang.String encoding, TaskFValue fvalue, javax.servlet.http.HttpServletRequest request)
          Generate report for task
 TaskFValue getFValue(SessionContext sc, java.lang.String reportId)
          Get value of report's field
 GeneralReport getReport(SessionContext sc, java.lang.String reportId, java.lang.String taskId, java.lang.String params)
          Get a report object for the specified task and parameters
 java.util.List getReportList(SessionContext sc, java.lang.String taskId)
          Get list of reports available for the task
 java.util.List getRtypeList(SessionContext sc)
          Get list of available report types
 void saveReportParams(SessionContext sc, java.lang.String reportId, java.lang.String params)
          Save parameters of a report
 void updateReport(SessionContext sc, java.lang.String reportId, java.lang.String name, boolean priv, java.lang.String rtypeId, java.lang.String filterId)
          Update properties of the report
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RT_PDF

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

RT_TEXT

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

RT_HTML

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

RT_EXCEL

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

RT_RTF

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

RT_XML

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

RT_TREE_XML

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

RT_CSV

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

RT_Klip

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

RT_RSS

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

RT_MS_PROJECT

public static final java.lang.String RT_MS_PROJECT
See Also:
Constant Field Values
Constructor Detail

SecuredReportAdapterManager

public SecuredReportAdapterManager()
Method Detail

getReport

public GeneralReport getReport(SessionContext sc,
                               java.lang.String reportId,
                               java.lang.String taskId,
                               java.lang.String params)
                        throws GranException
Get a report object for the specified task and parameters

Parameters:
sc - session context
reportId - report's id
taskId - task's id
params - semicolon separated list of report parameters
Returns:
GeneralReport
Throws:
GranException
See Also:
GeneralReport

getReportList

public java.util.List getReportList(SessionContext sc,
                                    java.lang.String taskId)
                             throws GranException
Get list of reports available for the task

Parameters:
sc - session context
taskId - task's id
Returns:
list of SecuredReportBean
Throws:
GranException
See Also:
SecuredReportBean

createReport

public java.lang.String createReport(SessionContext sc,
                                     java.lang.String name,
                                     java.lang.String rtypeId,
                                     boolean priv,
                                     java.lang.String filterId,
                                     java.lang.String taskId)
                              throws GranException
Create a new report

Parameters:
sc - session context
name - report's name
rtypeId - id of a report type (Rtype)
priv - is report private. Private reports are available for owners only.
filterId - filter's id which returns tasks for which the report will be built
taskId - task's id
Returns:
id of a new report
Throws:
GranException
See Also:
Rtype

updateReport

public void updateReport(SessionContext sc,
                         java.lang.String reportId,
                         java.lang.String name,
                         boolean priv,
                         java.lang.String rtypeId,
                         java.lang.String filterId)
                  throws GranException
Update properties of the report

Parameters:
sc - session context
reportId - report's id
name - name of the report
priv - is report private. Private reports are available for owners only.
rtypeId - id of a report type (Rtype)
filterId - filter's id which returns tasks for which the report will be built
Throws:
GranException
See Also:
Rtype

saveReportParams

public void saveReportParams(SessionContext sc,
                             java.lang.String reportId,
                             java.lang.String params)
                      throws GranException
Save parameters of a report

Parameters:
sc - session context
reportId - report's id
params - semicolon separated list of report parameters
Throws:
GranException

deleteReport

public void deleteReport(SessionContext sc,
                         java.lang.String reportId)
                  throws GranException
Delete report

Parameters:
sc - session contest
reportId - report's id
Throws:
GranException

getRtypeList

public java.util.List getRtypeList(SessionContext sc)
                            throws GranException
Get list of available report types

Parameters:
sc - session context
Returns:
list of report type ids
Throws:
GranException
See Also:
Rtype

getFValue

public TaskFValue getFValue(SessionContext sc,
                            java.lang.String reportId)
                     throws GranException
Get value of report's field

Parameters:
sc - session context
reportId - report's id
Returns:
TaskFValue
Throws:
GranException
See Also:
TaskFValue

generateReport

public byte[] generateReport(SessionContext sc,
                             java.lang.String reportId,
                             java.lang.String taskId,
                             boolean pageBreak,
                             java.lang.String format,
                             java.lang.String delimiter,
                             boolean isDieagram,
                             java.lang.String encoding,
                             TaskFValue fvalue,
                             javax.servlet.http.HttpServletRequest request)
                      throws java.lang.Exception
Generate report for task

Parameters:
sc - session context
reportId - report's id
taskId - task's id
pageBreak - page breakes flag
format - one of values rtf, pdf, html, text, xls
isDieagram - if chart diagram will be plotted
encoding - charset.
fvalue - post filter criteria. Can be null
request - http request. Used to find image resources for html report
Returns:
report's data
Throws:
java.lang.Exception


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.