Interface ComputingType
- All Known Implementing Classes:
AbstractStaticComputingType
,CostComputingType
,CurrentPageIdComputingType
,UserComputingType
public interface ComputingType
Interface for computing types
-
Method Summary
Modifier and TypeMethodDescriptiongetComputedValue
(FormQuestion question, FormEntry entry) Get the computed value for the fieldGet description of computing typeGet field to disable if form is publishedgetId()
Get id of the computing typeGet the renderer for jsgetLabel()
Get label of computing typeGet the type model items If the return value is null there won't be any processing on the server sidegetStorageType
(FormQuestion question) Get the storage type of the question typeGet the view items for the main tabgetXSLT()
Get the XSLT file for computing questions.boolean
true
if the computed field has a computed value for servervoid
saxAdditionalValue
(ContentHandler contentHandler, FormQuestion question, FormEntry entry) Sax additional valuesdefault Object
valueToJSONForClient
(Object value, FormQuestion question, FormEntry entry, ModelItem modelItem) Convert the entry value into a JSON object to use client side
-
Method Details
-
getId
Get id of the computing type- Returns:
- the id
-
getLabel
Get label of computing type- Returns:
- the label
-
getDescription
Get description of computing type- Returns:
- the description
-
getXSLT
Get the XSLT file for computing questions. If the return value is null there won't be any processing on the client side- Returns:
- the address of the XSLT file
-
hasComputedValue
boolean hasComputedValue()true
if the computed field has a computed value for server- Returns:
true
if the computed field has a computed value for server
-
getComputedValue
Get the computed value for the field- Parameters:
question
- the questionentry
- the entry- Returns:
- the computed value
-
getModelItems
Get the type model items If the return value is null there won't be any processing on the server side- Returns:
- a map of the model items
-
getStorageType
Get the storage type of the question type- Parameters:
question
- the question- Returns:
- the storage type
-
getViewElements
Get the view items for the main tab- Returns:
- a list of view items
-
getFieldToDisableIfFormPublished
Get field to disable if form is published- Returns:
- the list of field name
-
saxAdditionalValue
void saxAdditionalValue(ContentHandler contentHandler, FormQuestion question, FormEntry entry) throws SAXException Sax additional values- Parameters:
contentHandler
- the content handlerquestion
- the questionentry
- the entry- Throws:
SAXException
- if an error occurred
-
getJSRenderer
Get the renderer for js- Returns:
- the js renderer
-
valueToJSONForClient
default Object valueToJSONForClient(Object value, FormQuestion question, FormEntry entry, ModelItem modelItem) throws Exception Convert the entry value into a JSON object to use client side- Parameters:
value
- the value to convertquestion
- the form questionentry
- the form entrymodelItem
- the model item- Returns:
- The value as JSON
- Throws:
Exception
- if an error occurred
-