Class DefinitionStore
java.lang.Object
com.aquima.interactions.composer.model.definition.DefinitionStore
The definition store holds all the static definitions of various content types.
Note: Since 7.0 it contains page and document elements (definition store of the page composer and document engine have been merged).
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionDefinitionStore
(IProject project, IMetaModel metaModel, IParserFactory parser, IComposerDS composerDataSource) Constructs a definition store with all the element definitions provided by the data-source. -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldMap
acquireFieldMap
(IEntityDefinition entityDefinition) protected boolean
addContent
(ContentDefinition definition) protected boolean
addDocument
(DocumentDefinition definition) protected void
addFieldDefinition
(FieldDefinition definition) protected boolean
addImage
(ImageDefinition definition) protected boolean
addText
(TextDefinition definition) getContainer
(String name) getContent
(String name) This method returns the content definition for the specified name.protected ContentStyleDefinition
getContentStyle
(String name) getDefinition
(ElementType type, String name) This method returns an element definition for a specified name and type combination.getDefinition
(AbstractReference reference) This method returns the definition of a reference.getDocument
(String name) This method returns the document definition for the specified name.String[]
getElementNames
(ElementType type) This method returns the page definition with the specified name.getTypeMap
(ElementType elementType) protected void
protected void
protected void
validateNonCircularContainerReferences
(IReportingDS report, ContainerDefinition container, Stack<ContainerDefinition> referenceStack) protected void
validateReferences
(IReportingDS report, Map<String, Object> containers)
-
Constructor Details
-
DefinitionStore
public DefinitionStore(IProject project, IMetaModel metaModel, IParserFactory parser, IComposerDS composerDataSource) Constructs a definition store with all the element definitions provided by the data-source.- Parameters:
project
- Project containing various global definitions.metaModel
- Meta model containing the entity and attribute definitions (for the fields).parser
- The expression parser that should be used when parsing expressions.composerDataSource
- Data source that provides the element definitions that should be added.- Throws:
InitializationException
- This exception is raised when the definitions provided by the data-source are invalid.
-
-
Method Details
-
acquireFieldMap
-
updateExitEvents
protected void updateExitEvents() -
updateFieldDefinitions
protected void updateFieldDefinitions() -
validateReferences
-
validateNonCircularContainerReferences
protected void validateNonCircularContainerReferences(IReportingDS report, ContainerDefinition container, Stack<ContainerDefinition> referenceStack) -
getPage
This method returns the page definition with the specified name. When no definition can be found for the specified name, an exception is thrown.- Parameters:
name
- The name of the page for which the definition is requested.- Returns:
- The page definition of the page with the specified name (never null).
- Throws:
UnknownElementException
- This exception is raised when no definition could be found for the specified page name.
-
getContainer
-
getButton
-
getAsset
-
getField
-
addFieldDefinition
-
getTypeMap
-
getDefinition
This method returns an element definition for a specified name and type combination.- Parameters:
type
- The type of the requested definition.name
- The name for which a definition is requested.- Returns:
- The definition matching the specified name.
- Throws:
UnknownElementException
- This exception is thrown when no definition could be found for the specified name.UnknownTypeException
- This exception is thrown when the specified type is invalid.
-
getDefinition
This method returns the definition of a reference.- Parameters:
reference
- The reference, may not be null- Returns:
- The element defintion, never null.
- Throws:
UnknownElementException
- Is thrown when the reference refers to an unknown element.UnknownTypeException
- Is thrown when the reference refers to an unknown element type.
-
getDocument
This method returns the document definition for the specified name.- Parameters:
name
- The name of the requested document definition.- Returns:
- The document definition matching the specified name.
- Throws:
UnknownElementException
- This exception is thrown when no definition could be found for the specified name.
-
addDocument
-
getContent
This method returns the content definition for the specified name.- Parameters:
name
- The name of the requested content definition.- Returns:
- The content definition for the specified name.
- Throws:
UnknownElementException
- This exception is thrown when no definition could be found for the specified name.
-
addContent
-
getText
-
getImage
-
addText
-
addImage
-
getDefaultStyle
-
getContentStyle
-
getLanguages
-
getElementNames
-