public class ContentIncludeHandler extends AbstractCartridgeHandler
ContentInclude| Modifier and Type | Field and Description |
|---|---|
static String |
ENDECA_CONTENT_PATH
The key for the content root value.
|
static String |
ENDECA_SITE_ROOT_PATH
The key for the site root value.
|
| Constructor and Description |
|---|
ContentIncludeHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected ContentItem |
getContent(ContentLocator locator)
A method that allows subclasses to control the content returned by the
preprocess(com.endeca.infront.assembler.ContentItem) method. |
ContentSource |
getContentSource()
Gets the content source used by this handler.
|
void |
preprocess(ContentItem pContentItem)
Gets content from the
ContentSource and stores it in the
input ContentItem. |
ContentItem |
process(ContentItem pContentItem)
Returns the content obtained from the
ContentSource
(retrieved in preprocess(com.endeca.infront.assembler.ContentItem)). |
void |
setContentSource(ContentSource pContentSource)
Sets the content source used by this handler.
|
initializepublic static final String ENDECA_CONTENT_PATH
public static final String ENDECA_SITE_ROOT_PATH
public ContentSource getContentSource()
public void setContentSource(ContentSource pContentSource)
public final void preprocess(ContentItem pContentItem) throws CartridgeHandlerException
ContentSource and stores it in the
input ContentItem.preprocess in interface CartridgeHandler<ContentItem>preprocess in class AbstractCartridgeHandlerpContentItem - the cartridge configuration returned by
AbstractCartridgeHandler.initialize(ContentItem).CartridgeHandlerException - exceptions are never thrown by
this no-op implementationprotected ContentItem getContent(ContentLocator locator) throws CartridgeHandlerException, ContentException
preprocess(com.endeca.infront.assembler.ContentItem) method.
This method will be called only if the content source is able to resolve content.locator - the ContentLocator obtained from the ContentSource in the
preprocess(com.endeca.infront.assembler.ContentItem) method.CartridgeHandlerExceptionContentExceptionpublic ContentItem process(ContentItem pContentItem) throws CartridgeHandlerException
ContentSource
(retrieved in preprocess(com.endeca.infront.assembler.ContentItem)).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.Copyright © 2013, Oracle and/or its affiliates. All rights reserved.