-
public final class CfLogSurveyEvent.BuilderCfLogSurveyEvent is to log the user viewing, attempting the survey.
-
-
Constructor Summary
Constructors Constructor Description CfLogSurveyEvent.Builder(String action_value, SurveyObject survey_object, <ERROR CLASS><SurveyResponseItem> response_list, Object meta, Boolean update_immediately)
-
Method Summary
Modifier and Type Method Description final <ERROR CLASS>setAction(SurveyAction action)setAction is required to set the Action type for the Survey Action. final <ERROR CLASS>setAction(String action)final <ERROR CLASS>setSurveyObject(SurveyObject survey_object)setSurveyObject is for the providing item info details about survey. final <ERROR CLASS>setSurveyObject(String survey_object)final <ERROR CLASS>)>setResponseList(<ERROR CLASS><SurveyResponseItem> response_list)setResponseList is for the providing responses item details about survey. final <ERROR CLASS>setResponseList(String response_list)final <ERROR CLASS>setMeta(Object meta)You can pass any type of value in setMeta. final <ERROR CLASS>updateImmediately(Boolean update_immediately)updateImmediately is responsible for updating the values ot the backend immediately. final <ERROR CLASS>build()build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources. -
-
Constructor Detail
-
CfLogSurveyEvent.Builder
CfLogSurveyEvent.Builder(String action_value, SurveyObject survey_object, <ERROR CLASS><SurveyResponseItem> response_list, Object meta, Boolean update_immediately)
-
-
Method Detail
-
setAction
final <ERROR CLASS> setAction(SurveyAction action)
setAction is required to set the Action type for the Survey Action. SDK provides enum classes to support available log types. 1 main is achieved. SDK provides 2 approaches to log this event, one being enum type and the other is string type.
-
setSurveyObject
final <ERROR CLASS> setSurveyObject(SurveyObject survey_object)
setSurveyObject is for the providing item info details about survey. The object should be based on the SurveyObject or a string that can be converted to the object with proper param names. in-case the names are not correct the SDK will throw an exception. Below is the function for providing item as a string.
-
setSurveyObject
final <ERROR CLASS> setSurveyObject(String survey_object)
-
setResponseList
final <ERROR CLASS> )>setResponseList(<ERROR CLASS><SurveyResponseItem> response_list)
setResponseList is for the providing responses item details about survey. The object should be based on the SurveyResponseItem List or a string list that can be converted to the object with proper param names. in-case the names are not correct the SDK will throw an exception. Below is the function for providing item as a string.
-
setResponseList
final <ERROR CLASS> setResponseList(String response_list)
-
setMeta
final <ERROR CLASS> setMeta(Object meta)
You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.
-
updateImmediately
final <ERROR CLASS> updateImmediately(Boolean update_immediately)
updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.
-
build
final <ERROR CLASS> build()
build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.
-
-
-
-