public abstract class ContentItemTreeIterator
extends java.lang.Object
An abstract base class which provides the functionality for traversing content item tree.
For each detected content item during tree traversing the process
method is called.
The actual implementation of the process
method should be provided by the subclasses.
If a circular reference is detected during tree traversing the process is terminated with the exception.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CLASS_VERSION
Class version string.
|
Constructor and Description |
---|
ContentItemTreeIterator() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCircularReferenceErrorMessage(com.endeca.infront.assembler.ContentItem pContentItem)
Returns the error message for the circular reference.
|
abstract void |
process(com.endeca.infront.assembler.ContentItem pContentItem)
The method contains processing logic that need to be executed for each
detected content item during content item tree traversing.
|
void |
traverse(com.endeca.infront.assembler.ContentItem pContentItem)
The entry point for traversing content item tree.
|
protected void |
traverseChildren(com.endeca.infront.assembler.ContentItem pContentItem)
Traverses the content item's children.
|
protected void |
traverseList(java.util.List<?> pList)
Traverses the list of objects.
|
protected static final java.lang.String CLASS_VERSION
public void traverse(com.endeca.infront.assembler.ContentItem pContentItem) throws com.endeca.infront.assembler.CartridgeHandlerException
pContentItem
- - The content item to process.com.endeca.infront.assembler.CartridgeHandlerException
- if the content item has already been visited.protected java.lang.String getCircularReferenceErrorMessage(com.endeca.infront.assembler.ContentItem pContentItem)
pContentItem
- The content item where the circular reference were detected.protected void traverseChildren(com.endeca.infront.assembler.ContentItem pContentItem) throws com.endeca.infront.assembler.CartridgeHandlerException
pContentItem
- The content item which children to traverse.com.endeca.infront.assembler.CartridgeHandlerException
- if the content item has already been visited.protected void traverseList(java.util.List<?> pList) throws com.endeca.infront.assembler.CartridgeHandlerException
pList
- - The list of objects to traverse.com.endeca.infront.assembler.CartridgeHandlerException
- if the content item has already been visited.public abstract void process(com.endeca.infront.assembler.ContentItem pContentItem)
pContentItem
- The content item to process.