public class ContentAttributeDefinitionParser extends ElementDefinitionParser
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
__annotationNamePattern
Pattern for annotation names
|
protected ContentAttributeTypeExtensionPoint |
_contentAttributeTypeExtensionPoint
the content attribute type extension point
|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
the content type extension point
|
_modelItemTypeExtensionPoint
Constructor and Description |
---|
ContentAttributeDefinitionParser(ContentAttributeTypeExtensionPoint contentAttributeTypeExtensionPoint,
ThreadSafeComponentManager<Enumerator> enumeratorManager,
ThreadSafeComponentManager<Validator> validatorManager)
Creates a content attribute definition parser.
|
Modifier and Type | Method and Description |
---|---|
protected AttributeDefinition |
_createModelItem(Configuration definitionConfig)
Create the model item to populate it.
|
protected Pattern |
_getAnnotationNamePattern()
Get the annotation name pattern to test validity.
|
protected String |
_parseContentTypeId(Configuration itemConfig)
Parses the content type identifier attribute.
|
protected List<SemanticAnnotation> |
_parseDefinitionWithAnnotations(String pluginName,
Configuration itemConfig)
Parses the semantic annotations of the model item
|
protected boolean |
_parseForceInvert(Configuration itemConfig)
Parses the force invert attribute.
|
protected String |
_parseInvertRelationPath(Configuration itemConfig)
Parses the invert relation path attribute.
|
protected String |
_parseName(Configuration itemConfig)
Parses the name of the model item.
|
AttributeDefinition |
parse(ServiceManager serviceManager,
String pluginName,
Configuration definitionConfig,
Model model,
ModelItemGroup parent)
Parses an element definition from a XML configuration.
|
_parseAndSetEnumerator, _parseAndSetValidator, _parseDefaultValue, _parseDisableConditions, _parseMultiple, _parseWidget, _parseWidgetParameters, lookupComponents
_getNameConfigurationAttribute, _parseI18nizableText, _parseType
protected static Pattern __annotationNamePattern
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected ContentAttributeTypeExtensionPoint _contentAttributeTypeExtensionPoint
public ContentAttributeDefinitionParser(ContentAttributeTypeExtensionPoint contentAttributeTypeExtensionPoint, ThreadSafeComponentManager<Enumerator> enumeratorManager, ThreadSafeComponentManager<Validator> validatorManager)
contentAttributeTypeExtensionPoint
- the extension point to use to get available element typesenumeratorManager
- the enumerator component manager.validatorManager
- the validator component manager.public AttributeDefinition parse(ServiceManager serviceManager, String pluginName, Configuration definitionConfig, Model model, ModelItemGroup parent) throws ConfigurationException
AbstractModelItemParser
parse
in class ElementDefinitionParser
serviceManager
- the service managerpluginName
- the plugin name declaring this item.definitionConfig
- 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 parentConfigurationException
- if the configuration is not valid.protected AttributeDefinition _createModelItem(Configuration definitionConfig) throws ConfigurationException
AbstractModelItemParser
_createModelItem
in class ElementDefinitionParser
definitionConfig
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.protected String _parseName(Configuration itemConfig) throws ConfigurationException
AbstractModelItemParser
_parseName
in class AbstractModelItemParser
itemConfig
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.protected List<SemanticAnnotation> _parseDefinitionWithAnnotations(String pluginName, Configuration itemConfig) throws ConfigurationException
pluginName
- the name of the plugin name declaring this item.itemConfig
- the model item configuration to use.ConfigurationException
- if the configuration is not valid.protected Pattern _getAnnotationNamePattern()
protected String _parseContentTypeId(Configuration itemConfig) throws ConfigurationException
itemConfig
- the item configuration to use.null
if none defined.ConfigurationException
- if the defined content type des not existprotected String _parseInvertRelationPath(Configuration itemConfig)
itemConfig
- the item configuration to use.null
if none defined.protected boolean _parseForceInvert(Configuration itemConfig)
itemConfig
- the item configuration to use.true
if mutual relationship of the item should be set regardless of user's rights, false
otherwise.