Package org.ametys.web.parameters.view
Class ViewParameterDefinitionParser
java.lang.Object
org.ametys.runtime.model.AbstractModelItemParser
org.ametys.runtime.model.ElementDefinitionParser
org.ametys.cms.model.ElementDefinitionParser
org.ametys.web.parameters.view.ViewParameterDefinitionParser
This class parses the view parameters definition
-
Field Summary
Fields inherited from class org.ametys.runtime.model.AbstractModelItemParser
_modelItemTypeExtensionPoint
-
Constructor Summary
ConstructorDescriptionViewParameterDefinitionParser
(ModelItemTypeExtensionPoint viewParameterTypeExtensionPoint, ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager) Creates a view parameters definition parser. -
Method Summary
Modifier and TypeMethodDescriptionprotected ViewParameter
_createModelItem
(Configuration definitionConfig) Create the model item to populate it.<T extends ModelItem>
Tparse
(ServiceManager serviceManager, String pluginName, String catalog, Configuration definitionConfig, Model model, ModelItemGroup parent) Parses an element definition from a XML configuration.Methods inherited from class org.ametys.cms.model.ElementDefinitionParser
_parseContentTypeId
Methods inherited from class org.ametys.runtime.model.ElementDefinitionParser
_parseAndSetEnumerator, _parseAndSetValidator, _parseDefaultValue, _parseDefaultValues, _parseMultiple, lookupComponents
Methods inherited from class org.ametys.runtime.model.AbstractModelItemParser
_getNameConfigurationAttribute, _parseDisableConditions, _parseI18nizableText, _parseI18nizableText, _parseName, _parseType, _parseWidget, _parseWidgetParameters, parse
-
Field Details
-
_LOGGER
The logger.
-
-
Constructor Details
-
ViewParameterDefinitionParser
public ViewParameterDefinitionParser(ModelItemTypeExtensionPoint viewParameterTypeExtensionPoint, ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager) Creates a view parameters definition parser.- Parameters:
viewParameterTypeExtensionPoint
- the extension point to use to get available element typesenumeratorManager
- the enumerator component manager.validatorManager
- the validator component manager.
-
-
Method Details
-
parse
public <T extends ModelItem> T parse(ServiceManager serviceManager, String pluginName, String catalog, Configuration definitionConfig, Model model, ModelItemGroup parent) throws ConfigurationException Description copied from class:AbstractModelItemParser
Parses an element definition from a XML configuration.- Overrides:
parse
in classElementDefinitionParser
- Type Parameters:
T
- type of the parsed item- Parameters:
serviceManager
- the service managerpluginName
- the plugin name declaring this item.catalog
- the catalogdefinitionConfig
- the XML configuration of the model item.model
- the model which defines the model itemparent
- the parent of the model item to create. Can be null if the model item to parse has no parent- Returns:
- the parsed model item.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_createModelItem
protected ViewParameter _createModelItem(Configuration definitionConfig) throws ConfigurationException Description copied from class:AbstractModelItemParser
Create the model item to populate it.- Overrides:
_createModelItem
in classElementDefinitionParser
- Parameters:
definitionConfig
- the model item configuration to use.- Returns:
- the item instantiated.
- Throws:
ConfigurationException
- if the configuration is not valid.
-