|
||||||||||
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.ContentIncludeHandler com.endeca.infront.cartridge.RedirectAwareContentIncludeHandler
public class RedirectAwareContentIncludeHandler
A handler for obtaining content from a URI, when keyword redirect support is desired. This
handler should be used for root (top-level) calls to Assembler.assemble(com.endeca.infront.assembler.ContentItem)
only. For
nested ContentInclude
s, use ContentIncludeHandler
.
If a redirect has been triggered, it will be attached to the returned ContentItem
with the key "endeca:redirect"
.
RedirectAwareContentInclude
Field Summary |
---|
Fields inherited from class com.endeca.infront.cartridge.ContentIncludeHandler |
---|
ENDECA_CONTENT_PATH, ENDECA_SITE_ROOT_PATH |
Constructor Summary | |
---|---|
RedirectAwareContentIncludeHandler()
|
Method Summary | |
---|---|
protected ContentItem |
getContent(ContentLocator locator)
Adds keyword redirect information, if a redirect was triggered. |
void |
setContentBroker(MdexContentRequestBroker pContentBroker)
Provider of essential services to dynamic content handlers. |
void |
setDefaultFullAssembleOnRedirect(boolean fullAssembleOnRedirect)
Sets the default value for the property of whether or not full assembly should be done if a keyword redirect exists. |
void |
setDefaultRedirectCollection(String redirectCollection)
Sets the default redirect collection name. |
void |
setNavigationState(NavigationState navigationState)
The navigation state for this request. |
Methods inherited from class com.endeca.infront.cartridge.ContentIncludeHandler |
---|
getContentSource, preprocess, process, setContentSource |
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 |
Constructor Detail |
---|
public RedirectAwareContentIncludeHandler()
Method Detail |
---|
public void setContentBroker(MdexContentRequestBroker pContentBroker)
Must be set before ContentIncludeHandler.preprocess(com.endeca.infront.assembler.ContentItem)
is called.
public void setNavigationState(NavigationState navigationState)
ContentIncludeHandler.preprocess(com.endeca.infront.assembler.ContentItem)
is called.
public void setDefaultFullAssembleOnRedirect(boolean fullAssembleOnRedirect)
false
is assumed.
This value can be overriden by configuration on the content actually being included
(using the property name fullAssembleOnRedirect
).
fullAssembleOnRedirect
- if false, only keyword redirect information
will be returned if a redirect was triggered. If true, full assembly
will still be done if a redirect was triggered.public void setDefaultRedirectCollection(String redirectCollection)
"/redirects/Default"
is assumed. This method can be called with
a value of null or empty to indicate that the handler should not look
for keyword redirects.
This value can be overriden by configuration on the content actually being included
(using the property name redirectCollection
).
redirectCollection
- the redirect collection. This value may be null or empty
to indicate that the handler should not look for keyword redirects.protected ContentItem getContent(ContentLocator locator) throws CartridgeHandlerException, ContentException
fullAssembleOnRedirect
is false, full assembly is short-circuited
by clearing the return value from the superclass method.
getContent
in class ContentIncludeHandler
locator
- the ContentLocator
obtained from the ContentSource
in the
ContentIncludeHandler.preprocess(com.endeca.infront.assembler.ContentItem)
method.
CartridgeHandlerException
- if the content broker has not been set (see setContentBroker(com.endeca.infront.content.MdexContentRequestBroker)
}
or if the navigation state has not been set (see setNavigationState(com.endeca.infront.navigation.NavigationState)
).
ContentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |