Class FormStatService
java.lang.Object
sk.iway.iwcm.components.multistep_form.rest.FormStatService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionFormStatService(FormsRepository formsRepository, FormSettingsRepository formSettingsRepository, FormsServiceImpl formsService, AuditRepository auditRepository, MultistepFormsService multistepFormsService) -
Method Summary
Modifier and TypeMethodDescriptionfinal org.json.JSONArraygetFormStatChartData(String formName, String itemFormId, jakarta.servlet.http.HttpServletRequest request) Returns chart data for the given form item.final org.json.JSONObjectgetFormStatData(String formName, jakarta.servlet.http.HttpServletRequest request) Returns an aggregated statistics payload for a form.
-
Field Details
-
AUDIT_SUBID_ERROR_STEP_GET
public static final int AUDIT_SUBID_ERROR_STEP_GET- See Also:
-
AUDIT_SUBID_ERROR_STEP_SAVE
public static final int AUDIT_SUBID_ERROR_STEP_SAVE- See Also:
-
-
Constructor Details
-
FormStatService
@Autowired public FormStatService(FormsRepository formsRepository, FormSettingsRepository formSettingsRepository, FormsServiceImpl formsService, AuditRepository auditRepository, MultistepFormsService multistepFormsService)
-
-
Method Details
-
getFormStatData
public final org.json.JSONObject getFormStatData(String formName, jakarta.servlet.http.HttpServletRequest request) Returns an aggregated statistics payload for a form. The payload contains timing metrics, response counters, chart data, bonus chart data, and validation error chart data.- Parameters:
formName- the form name identifierrequest- the HTTP request used to resolve localization- Returns:
- JSON object with all calculated statistics, or
nullwhen formName is empty
-
getFormStatChartData
public final org.json.JSONArray getFormStatChartData(String formName, String itemFormId, jakarta.servlet.http.HttpServletRequest request) Returns chart data for the given form item.- Parameters:
formName- the form name identifieritemFormId- form item identifier that must be non-emptyrequest- the HTTP request used to resolve localization- Returns:
- JSON array with chart data, or
nullwhen required parameters are empty
-