Interface ComputingType

All Known Implementing Classes:
AbstractStaticComputingType, CostComputingType, CurrentPageIdComputingType, UserComputingType

public interface ComputingType
Interface for computing types
  • 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 question
      entry - 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 handler
      question - the question
      entry - 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 convert
      question - the form question
      entry - the form entry
      modelItem - the model item
      Returns:
      The value as JSON
      Throws:
      Exception - if an error occurred