Class CostComputingType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.computing.AbstractStaticComputingType
org.ametys.plugins.forms.question.computing.CostComputingType
- All Implemented Interfaces:
ComputingType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for creating cost computed field
-
Field Summary
Modifier and TypeFieldDescriptionMap of ModelItems specific to ManualSourceTypestatic final String
The currency attributestatic final String
Name of us dollar currencyStaticEnumerator entrystatic final String
Name of euro currencyStaticEnumerator entrystatic final String
Name of pound sterling currencyStaticEnumerator entryFields inherited from class org.ametys.plugins.forms.question.computing.AbstractStaticComputingType
_choiceSourceTypeExtensionPoint, _computingTypeExtensionPoint, _description, _formQuestionDataTypeExtensionPoint, _id, _label, _pluginName, _xslt
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canEdit()
true
if the question can be edited after submissiongetComputedValue
(FormQuestion computedQuestion, FormEntry entry) Get the computed value for the fieldGet 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 tabMethods inherited from class org.ametys.plugins.forms.question.computing.AbstractStaticComputingType
configure, getDescription, getFieldToDisableIfFormPublished, getId, getJSRenderer, getLabel, getXSLT, hasComputedValue, saxAdditionalValue, service, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.forms.question.computing.ComputingType
isCacheable, valueToJSONForClient
-
Field Details
-
ATTRIBUTE_CURRENCY
The currency attribute- See Also:
-
EURO_CURRENCY_VALUE
Name of euro currencyStaticEnumerator entry- See Also:
-
POUND_CURRENCY_VALUE
Name of pound sterling currencyStaticEnumerator entry- See Also:
-
DOLLAR_CURRENCY_VALUE
Name of us dollar currencyStaticEnumerator entry- See Also:
-
_costComputingItems
Map of ModelItems specific to ManualSourceType
-
-
Constructor Details
-
CostComputingType
public CostComputingType()
-
-
Method Details
-
getModelItems
Description copied from interface:ComputingType
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
-
getViewElements
Description copied from interface:ComputingType
Get the view items for the main tab- Returns:
- a list of view items
-
getComputedValue
Description copied from interface:ComputingType
Get the computed value for the field- Parameters:
computedQuestion
- the questionentry
- the entry- Returns:
- the computed value
-
getStorageType
Description copied from interface:ComputingType
Get the storage type of the question type- Parameters:
question
- the question- Returns:
- the storage type
-
canEdit
Description copied from interface:ComputingType
true
if the question can be edited after submission- Returns:
true
if the question can be edited after submission
-