|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,TargetedItemsContentItem>
atg.projects.store.assembler.cartridge.handler.TargetedItemsHandler
public class TargetedItemsHandler
TargetedItemsHandler adds a configurable prefix to the cartridge targeter component path if needed, resolves the targeter component, targets for a set number of items and adds them into TargeterItems.
Properties:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected static java.lang.String |
COMPONENT_PATH
|
protected static java.lang.String |
COMPONENT_PATH_SEPARATOR
|
protected static int |
DEFAULT_ITEMS_AMOUNT
|
protected static java.lang.String |
ITEM_COUNT
|
Constructor Summary | |
---|---|
TargetedItemsHandler()
|
Method Summary | |
---|---|
java.lang.String |
getItemDescriptor()
|
java.lang.String |
getPathPrefix()
|
atg.repository.Repository |
getRepository()
|
atg.targeting.TargetingSourceMap |
getSourceMap()
|
atg.service.collections.validator.CollectionObjectValidator[] |
getValidators()
|
TargetedItemsContentItem |
process(com.endeca.infront.assembler.ContentItem pCartridgeConfig)
This method builds a full targeter/slot component path. |
void |
setItemDescriptor(java.lang.String pItemDescriptor)
|
void |
setPathPrefix(java.lang.String pPathPrefix)
|
void |
setRepository(atg.repository.Repository pRepository)
|
void |
setSourceMap(atg.targeting.TargetingSourceMap pSourceMap)
|
void |
setValidators(atg.service.collections.validator.CollectionObjectValidator[] pValidators)
|
boolean |
validateItem(atg.repository.RepositoryItem pItem)
Validate repository item using configured set of validators. |
protected com.endeca.infront.assembler.ContentItem |
wrapConfig(com.endeca.infront.assembler.ContentItem pContentitem)
Create a new BasicContentItem using the passed in ContentItem. |
Methods inherited from class com.endeca.infront.cartridge.NavigationCartridgeHandler |
---|
createMdexRequest, dispatchNavigationEventInformation, executeMdexRequest, executeMdexRequest, getActionPathProvider, getContentItemInitializer, getMdexRequestBroker, getNavigationState, initialize, populateNavigationPathDefaults, preprocess, setActionPathProvider, setContentItemInitializer, setMdexRequestBroker, setNavigationState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final java.lang.String COMPONENT_PATH_SEPARATOR
protected static final java.lang.String COMPONENT_PATH
protected static final java.lang.String ITEM_COUNT
protected static final int DEFAULT_ITEMS_AMOUNT
Constructor Detail |
---|
public TargetedItemsHandler()
Method Detail |
---|
public java.lang.String getPathPrefix()
public void setPathPrefix(java.lang.String pPathPrefix)
pPathPrefix
- - The pathPrefix to set.public java.lang.String getItemDescriptor()
public void setItemDescriptor(java.lang.String pItemDescriptor)
pItemDescriptor
- - The item descriptor of item that should be used in
this targeter.public atg.repository.Repository getRepository()
public void setRepository(atg.repository.Repository pRepository)
pRepository
- the repository of item that should be returned by this
targeter.public atg.service.collections.validator.CollectionObjectValidator[] getValidators()
public void setValidators(atg.service.collections.validator.CollectionObjectValidator[] pValidators)
pValidators
- - The validators to set.public atg.targeting.TargetingSourceMap getSourceMap()
public void setSourceMap(atg.targeting.TargetingSourceMap pSourceMap)
pSourceMap
- - The sourceMap to set.protected com.endeca.infront.assembler.ContentItem wrapConfig(com.endeca.infront.assembler.ContentItem pContentitem)
wrapConfig
in class com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,TargetedItemsContentItem>
pContentItem
- - The cartridge content item to be wrapped.
public TargetedItemsContentItem process(com.endeca.infront.assembler.ContentItem pCartridgeConfig) throws com.endeca.infront.assembler.CartridgeHandlerException
This method builds a full targeter/slot component path. It is built using the component path configured in Experience Manager along with the pathPrefix property. The targeter/slot component is then resolved and the itemCount amount of items are targeted.
Items returned by slot/targeter should be of type itemDescriptor. Only items of this type will be put in the TargetedItemsContentItem. If an item of another type is found, error will be logged. If itemCount is not set, then all items returned by slot or targeter of type itemDescriptor will be put in the TargetedItemsContentItem.
process
in interface com.endeca.infront.assembler.CartridgeHandler<com.endeca.infront.assembler.ContentItem>
process
in class com.endeca.infront.cartridge.NavigationCartridgeHandler<com.endeca.infront.assembler.ContentItem,TargetedItemsContentItem>
pCartridgeConfig
- - If an error occurs that is scoped to an
individual cartridge instance. This exception will not halt the entire
assembly process, which occurs across multiple cartridges; instead, this
exception will be packaged in the overall response model. If an unchecked
exception is thrown, then the entire assembly process will be halted.
com.endeca.infront.assembler.CartridgeHandlerException
public boolean validateItem(atg.repository.RepositoryItem pItem)
pItem
- - The item to validate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |