com.endeca.infront.cartridge
Class ContentSlotListHandler

java.lang.Object
  extended by com.endeca.infront.cartridge.ContentSlotListHandler
All Implemented Interfaces:
CartridgeHandler<ContentSlotListConfig>

public class ContentSlotListHandler
extends Object
implements CartridgeHandler<ContentSlotListConfig>

Cartridge handler that provides a pass through for ContentSlotListConfig objects.


Constructor Summary
ContentSlotListHandler()
           
 
Method Summary
 ContentItemInitializer getContentItemInitializer()
          Returns the ContentItemInitializer used to create the full cartridge configuration.
 ContentSlotListConfig initialize(ContentItem pContentItem)
          Uses the ContentItemInitializer, if one has been set, to create the full configuration for this cartridge.
 void preprocess(ContentSlotListConfig pContentItem)
          Does nothing.
 ContentItem process(ContentSlotListConfig pContentItem)
          Returns the input ContentSlotListConfig.
 void setContentItemInitializer(ContentItemInitializer initializer)
          Sets the ContentItemInitializer used to create the full cartridge configuration in the initialize(com.endeca.infront.assembler.ContentItem) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentSlotListHandler

public ContentSlotListHandler()
Method Detail

setContentItemInitializer

public void setContentItemInitializer(ContentItemInitializer initializer)
Sets the ContentItemInitializer used to create the full cartridge configuration in the initialize(com.endeca.infront.assembler.ContentItem) method. If the initializer is null, the initialize(com.endeca.infront.assembler.ContentItem) method will simply wrap the input ContentItem as an instance of the handler's configuration type and return it.

Parameters:
initializer - may be null
See Also:
CartridgeHandler.initialize(ContentItem)

getContentItemInitializer

public ContentItemInitializer getContentItemInitializer()
Returns the ContentItemInitializer used to create the full cartridge configuration.

See Also:
setContentItemInitializer(ContentItemInitializer)

initialize

public ContentSlotListConfig initialize(ContentItem pContentItem)
                                 throws CartridgeHandlerException
Uses the ContentItemInitializer, if one has been set, to create the full configuration for this cartridge. If no ContentItemInitializer has been set, simply wraps the input ContentItem.

Specified by:
initialize in interface CartridgeHandler<ContentSlotListConfig>
Parameters:
pContentItem - cartridge instance configuration, typically from Experience Manager.
Returns:
Full configuration for this cartridge. It is not expected that this configuration will be further modified by the preprocess(com.endeca.infront.cartridge.ContentSlotListConfig) or process(com.endeca.infront.cartridge.ContentSlotListConfig) methods.
Throws:
CartridgeHandlerException - if an error occurs that is scoped to an individual cartridge instance (for instance, the handler is unable to access its default configuration). 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.
See Also:
setContentItemInitializer(ContentItemInitializer)

preprocess

public void preprocess(ContentSlotListConfig pContentItem)
                throws CartridgeHandlerException
Does nothing.

Specified by:
preprocess in interface CartridgeHandler<ContentSlotListConfig>
Parameters:
pContentItem - the cartridge configuration returned by CartridgeHandler.initialize(ContentItem). This cartridge configuration may be modified by this handler. Note that this cartridge configuration is also passed to CartridgeHandler.process(ContentItem).
Throws:
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.

process

public ContentItem process(ContentSlotListConfig pContentItem)
                    throws CartridgeHandlerException
Returns the input ContentSlotListConfig.

Specified by:
process in interface CartridgeHandler<ContentSlotListConfig>
Parameters:
pContentItem - the cartridge configuration returned by CartridgeHandler.initialize(ContentItem). Note that this instance may have been modified by the CartridgeHandler.preprocess(ContentItem) method.
Returns:
the output value for this cartridge. If null is returned, then the corresponding node in the output tree will be deleted.
Throws:
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 © 2012, Oracle and/or its affiliates. All rights reserved.