Class AbstractStaticComputingType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.computing.AbstractStaticComputingType
- All Implemented Interfaces:
ComputingType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
CostComputingType
,CurrentPageIdComputingType
,UserComputingType
public abstract class AbstractStaticComputingType
extends AbstractLogEnabled
implements ComputingType, Serviceable, Configurable, PluginAware
Static class for creating
ComputingType
from xml configuration-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChoiceSourceTypeExtensionPoint
The choice source type extension pointprotected ComputingTypeExtensionPoint
The computing type extension pointprotected I18nizableText
Description of computing typeprotected FormQuestionDataTypeExtensionPoint
The form question data type extension pointprotected String
Id of computing typeprotected I18nizableText
Label of computing typeprotected String
Formsprotected String
Xslt associated with computing type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) Get 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 typegetXSLT()
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 valuesvoid
service
(ServiceManager manager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.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
getComputedValue, getModelItems, getStorageType, getViewElements, valueToJSONForClient
-
Field Details
-
_pluginName
Forms -
_id
Id of computing type -
_label
Label of computing type -
_description
Description of computing type -
_xslt
Xslt associated with computing type -
_computingTypeExtensionPoint
The computing type extension point -
_formQuestionDataTypeExtensionPoint
The form question data type extension point -
_choiceSourceTypeExtensionPoint
The choice source type extension point
-
-
Constructor Details
-
AbstractStaticComputingType
public AbstractStaticComputingType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getId
Description copied from interface:ComputingType
Get id of the computing type- Specified by:
getId
in interfaceComputingType
- Returns:
- the id
-
getLabel
Description copied from interface:ComputingType
Get label of computing type- Specified by:
getLabel
in interfaceComputingType
- Returns:
- the label
-
getDescription
Description copied from interface:ComputingType
Get description of computing type- Specified by:
getDescription
in interfaceComputingType
- Returns:
- the description
-
getXSLT
Description copied from interface:ComputingType
Get the XSLT file for computing questions. If the return value is null there won't be any processing on the client side- Specified by:
getXSLT
in interfaceComputingType
- Returns:
- the address of the XSLT file
-
hasComputedValue
Description copied from interface:ComputingType
true
if the computed field has a computed value for server- Specified by:
hasComputedValue
in interfaceComputingType
- Returns:
true
if the computed field has a computed value for server
-
getFieldToDisableIfFormPublished
Description copied from interface:ComputingType
Get field to disable if form is published- Specified by:
getFieldToDisableIfFormPublished
in interfaceComputingType
- Returns:
- the list of field name
-
saxAdditionalValue
public void saxAdditionalValue(ContentHandler contentHandler, FormQuestion question, FormEntry entry) throws SAXException Description copied from interface:ComputingType
Sax additional values- Specified by:
saxAdditionalValue
in interfaceComputingType
- Parameters:
contentHandler
- the content handlerquestion
- the questionentry
- the entry- Throws:
SAXException
- if an error occurred
-
getJSRenderer
Description copied from interface:ComputingType
Get the renderer for js- Specified by:
getJSRenderer
in interfaceComputingType
- Returns:
- the js renderer
-