Class RuntimeKeyGenerator
java.lang.Object
com.aquima.interactions.composer.model.AbstractVisitor
com.aquima.interactions.composer.model.RuntimeKeyGenerator
- All Implemented Interfaces:
IVisitor
Visitor for generating unique runtime keys for every element.
- Since:
- 5.0
- Author:
- o.kerpershoek, Jon van Leuven
-
Constructor Summary
ConstructorDescriptionDefault constructor for the runtime key generator.RuntimeKeyGenerator
(RuntimeKey parentKey) Constructor for the runtime key generator. -
Method Summary
Modifier and TypeMethodDescriptionThis method will be invoked for each element that is encountered during the visit.void
acceptButton
(IButton button) acceptContainer
(IContainer container) acceptCustomElement
(IElement element) acceptDocument
(IDocument document) void
acceptField
(IField field) protected void
acceptImage
(IImage image) acceptPage
(IPage page) void
acceptText
(IAsset text) protected String
generateId
(IElement element, int index) void
leave
(ICompositeElement container, IVisitor childVisitor) This method will be invoked after all the children of the specified container have been processed with the childVisitor.
-
Constructor Details
-
RuntimeKeyGenerator
public RuntimeKeyGenerator()Default constructor for the runtime key generator. For internal use only. -
RuntimeKeyGenerator
Constructor for the runtime key generator. For internal use only.- Parameters:
parentKey
- The runtime key to start with.
-
-
Method Details
-
acceptContainer
- Specified by:
acceptContainer
in classAbstractVisitor
-
accept
Description copied from interface:IVisitor
This method will be invoked for each element that is encountered during the visit. The return type of this method is the visitor that should be used to process the child elements of the current element. When the current element does not have any children, or when the child elements should not be processed, this method should return a null value as result. The returned visitor may either be a new visitor, for instance with specific context information for the element, or the same visitor.- Specified by:
accept
in interfaceIVisitor
- Overrides:
accept
in classAbstractVisitor
- Parameters:
element
- The current element that is encountered by the visitor.- Returns:
- A visitor that should be used to process child elements.
-
acceptCustomElement
- Specified by:
acceptCustomElement
in classAbstractVisitor
-
acceptButton
- Specified by:
acceptButton
in classAbstractVisitor
-
acceptField
- Specified by:
acceptField
in classAbstractVisitor
-
acceptText
- Specified by:
acceptText
in classAbstractVisitor
-
acceptPage
- Specified by:
acceptPage
in classAbstractVisitor
-
acceptImage
- Specified by:
acceptImage
in classAbstractVisitor
-
acceptDocument
- Specified by:
acceptDocument
in classAbstractVisitor
-
leave
Description copied from interface:IVisitor
This method will be invoked after all the children of the specified container have been processed with the childVisitor. The implementation of this method may choose to merge the results of the child visitor with this visitor.- Parameters:
container
- The container of whom the child visitor has completed.childVisitor
- The child visitor that was used to evaluate the children of the container.
-
generateId
-