|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.projects.store.assembler.cartridge.ContentItemTreeIterator
atg.projects.store.assembler.cartridge.CrossCartridgeItemsLookup
public class CrossCartridgeItemsLookup
This is the subclass of ContentItemTreeIterator
that iterates through the content item tree looking
for the items displayed in different kind of cartridges. The main purpose of this class is to put
all displayed items into one bucket so that other component can check it to avoid duplicates in the cartridges.
The class looks for displayed items only in the cartridges with types configured in the
typeToPropertyNameMap
. The typeToPropertyNameMap
contains mapping between cartridge
type and property name where the displayed items are stored. Items itself are expected to be RepositoryItems or
Endeca Record objects. If detected items are RepositoryItems the repository
ID is stored into the storage. If items are Endeca Records then the ID of item is retrieved from the
property configured in the itemIdKey
property.
The ContentItemTreeIterator
also performs caching of content items with IDs configured in the
contentItemsToCache
list. The cached content items can be used in cases where displayed items are
not part of content item but retrieved in the renderer code.
Field Summary | |
---|---|
protected static java.lang.String |
CLASS_VERSION
Class version string. |
Constructor Summary | |
---|---|
CrossCartridgeItemsLookup()
|
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.util.List<com.endeca.infront.assembler.ContentItem>> |
getContentItemsCache()
Returns the mapping between cartridge types and list of content items assembled for this request. |
java.util.List<java.lang.String> |
getContentItemsToCache()
Returns the array of content item types which should be cached during content item tree iteration. |
java.util.List<java.lang.String> |
getDisplayedItems()
Returns the list of displayed items |
java.lang.String |
getItemIdKey()
Returns the content item key where the item's ID stored. |
java.util.Map<java.lang.String,java.lang.String> |
getTypeToPropertyNameMap()
Returns the mapping between cartridge types and property names where the items we are looking for stored. |
void |
process(com.endeca.infront.assembler.ContentItem pContentItem)
The implementation of content item process method. |
void |
setContentItemsCache(java.util.Map<java.lang.String,java.util.List<com.endeca.infront.assembler.ContentItem>> pContentItemsCache)
Sets the mapping between cartridge types and list of content items assembled for this request. |
void |
setContentItemsToCache(java.util.List<java.lang.String> pContentItemsToCache)
Sets the array of content item types which should be cached during content item tree iteration. |
void |
setDisplayedItems(java.util.List<java.lang.String> pDisplayedItems)
Sets the list of displayed items |
void |
setItemIdKey(java.lang.String pItemIdKey)
Sets the content item key where the item's ID stored. |
void |
setTypeToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTypeToPropertyNameMap)
Sets the mapping between cartridge types and property names where the items we are looking for stored. |
Methods inherited from class atg.projects.store.assembler.cartridge.ContentItemTreeIterator |
---|
getCircularReferenceErrorMessage, traverse, traverseChildren, traverseList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public CrossCartridgeItemsLookup()
Method Detail |
---|
public java.util.List<java.lang.String> getDisplayedItems()
public void setDisplayedItems(java.util.List<java.lang.String> pDisplayedItems)
pDisplayedItems
- list of displayed items to setpublic java.util.Map<java.lang.String,java.lang.String> getTypeToPropertyNameMap()
public void setTypeToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTypeToPropertyNameMap)
pTypeToPropertyNameMap
- The mapping between cartridge types and property names where the items we are looking for stored.public java.util.List<java.lang.String> getContentItemsToCache()
public void setContentItemsToCache(java.util.List<java.lang.String> pContentItemsToCache)
pContentItemsToCache
- The array of content item types which should be cached during content item tree iteration.public java.util.Map<java.lang.String,java.util.List<com.endeca.infront.assembler.ContentItem>> getContentItemsCache()
public void setContentItemsCache(java.util.Map<java.lang.String,java.util.List<com.endeca.infront.assembler.ContentItem>> pContentItemsCache)
pContentItemsCache
- The mapping between cartridge types and list of content items assembled for this request.public java.lang.String getItemIdKey()
public void setItemIdKey(java.lang.String pItemIdKey)
pItemIdKey
- The content item key where the item's ID stored.public void process(com.endeca.infront.assembler.ContentItem pContentItem)
typeToPropertyNameMap
and if so retrieves items from the
property mapped to the corresponding cartridge type. Items IDs are stored into the displayedItems
list. If the retrieved items are RepositoryItems the ID is taken from the repositoryId property, in the case
when retrieved items are Endeca records the IDs are taken from the property configured in the itemIdKey
.
process
in class ContentItemTreeIterator
pContentItem
- The content item to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |