com.objectplanet.survey.plugin.interfaces
Interface IReportElement


public interface IReportElement

Interface for a report element type.
Each report element contains report data for one or more questions and several report types. This interface allows to add your own report types to report elements. All available report types will be shown in the list of report types with checkbox for selection:

Select report types for element 'Main element'   
Summary report
Detailed statistics
..........
..........
Essay field texts
Text in matrix cells
My report type 1 (Plugin)
My report type 2 (Plugin)


If the plugin type is selected, the html produced by getQuestionReportHTML will be added to every question in the report element, after built-in report types:
Report element

Element title
Element description

Report for question 1
Question text

Summary report

Detailed statistics

Report type from 'My report type 1'


Report for question 2
Question text

Summary report

Detailed statistics

Report type from 'My report type 1'

.....

Author:
Irina Brun

Method Summary
 boolean availableForReport(long surveyId, long reportId)
          Returns true if report type is available for the specified survey/report.
 java.lang.String getElementType(long surveyId, long reportId)
          Gets the report type name.
 java.lang.String getQuestionReportHTML(long surveyId, int questionNo, long reportId)
          Gets report html for a report type.
 

Method Detail

getElementType

java.lang.String getElementType(long surveyId,
                                long reportId)
Gets the report type name. This will be shown in the list report types for a report element.

Parameters:
surveyId - Survey id
reportId - Report id
Returns:
The report type name.

availableForReport

boolean availableForReport(long surveyId,
                           long reportId)
Returns true if report type is available for the specified survey/report. If this method returns true, the report type will be shown in the list of report types with checkbox for selection. Then, if selected, the html produced by getQuestionReportHTML() will be added to the report after all built-in report types.

Parameters:
surveyId - Survey id
reportId - Report id
Returns:
True if the class implementing this interface produce report type for the spesified survey/report

getQuestionReportHTML

java.lang.String getQuestionReportHTML(long surveyId,
                                       int questionNo,
                                       long reportId)
Gets report html for a report type. The html will be added to the report at the after all other selected report types.

Parameters:
surveyId - Survey id
questionNo - Question number
reportId - Report id
Returns:
The report html

Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016