|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.infront.assembler.AbstractCartridgeHandler com.endeca.infront.cartridge.ContentSlotHandler
public class ContentSlotHandler
This CartridgeHandler handles content slot invocations.
It expects to modify a ContentItem of the form, ContentSlotConfig
,
which species a content collection and a rule limit.
It also expects a ContentManager to be configured using setContentBroker(MdexContentRequestBroker)
.
This handler modifies the given content item in the preprocess()
method by adding the List of ContentItem objects returned
by the ContentManager to the given content item using the key, CONTENTS
.
Field Summary | |
---|---|
static String |
AUDIT_CONTENTS
Key for the list of audit content items. |
protected MdexContentRequestBroker |
contentBroker
The broker for querying the MDEX. |
static String |
CONTENTS
The key for the list of content items to be added to the content slot |
Constructor Summary | |
---|---|
ContentSlotHandler()
|
Method Summary | |
---|---|
void |
preprocess(ContentItem pContentItem)
Adds the List of ContentItem objects returned by the ContentManager to the input content item using the key, CONTENTS . |
ContentItem |
process(ContentItem pContentItem)
Called by the assembler after the preprocess method has been called for all cartridges in a complete response model. |
void |
setContentBroker(MdexContentRequestBroker pContentBroker)
Provider of essential services to dynamic content handlers. |
Methods inherited from class com.endeca.infront.assembler.AbstractCartridgeHandler |
---|
initialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONTENTS
public static final String AUDIT_CONTENTS
protected MdexContentRequestBroker contentBroker
Constructor Detail |
---|
public ContentSlotHandler()
Method Detail |
---|
public void setContentBroker(MdexContentRequestBroker pContentBroker)
ContentSlotHandler
. Use of the MdexContentRequestBroker in other classes
is not supported.
public void preprocess(ContentItem pContentItem) throws CartridgeHandlerException
CONTENTS
.
preprocess
in interface CartridgeHandler<ContentItem>
preprocess
in class AbstractCartridgeHandler
pContentItem
- the cartridge configuration returned by
AbstractCartridgeHandler.initialize(ContentItem)
.
CartridgeHandlerException
- exceptions are never thrown by
this no-op implementationpublic ContentItem process(ContentItem pContentItem) throws CartridgeHandlerException
CartridgeHandler
If a CartridgeHandlerException is thrown during the preprocess method, then the process method is not called.
pContentItem
- the cartridge configuration returned by
CartridgeHandler.initialize(ContentItem)
. Note that this instance may have been modified by
the CartridgeHandler.preprocess(ContentItem)
method.
CartridgeHandlerException
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |