Package org.smooks.api.delivery
Interface ContentDeliveryConfig
-
- All Known Implementing Classes:
AbstractContentDeliveryConfig,DOMContentDeliveryConfig,SaxNgContentDeliveryConfig
@ThreadSafe public interface ContentDeliveryConfigContent delivery configuration. Provides access to Content Delivery Resources (e.g.Content Delivery Units) and other information for the targeted profile.- Author:
- tfennelly
-
-
Field Summary
Fields Modifier and Type Field Description static StringSMOOKS_VISITORS_SORT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddToExecutionLifecycleSets()Add the execution lifecycle sets for the configuration.voidexecuteHandlerCleanup(ExecutionContext executionContext)Cleanup execution context lifecycle aware handlers.voidexecuteHandlerInit(ExecutionContext executionContext)Initialize execution context lifecycle aware handlers.List<ConfigBuilderEvent>getConfigBuilderEvents()Get the list of Execution Events generated during the build of the configuration.FilterBypassgetFilterBypass()Get theFilterBypassfor this delivery configuration.List<?>getObjects(String selector)Get a list ofObjects from theResourceConfigs specified by the selector.Map<String,List<ResourceConfig>>getResourceConfigs()Get theResourceConfigmap for the target execution context.List<ResourceConfig>getResourceConfigs(String selector)Get the list ofResourceConfigs for the specified selector definition.booleanisDefaultSerializationOn()Is default serialization on..FilternewFilter(ExecutionContext executionContext)Get a new stream filter for the content delivery configuration.voidsort()
-
-
-
Field Detail
-
SMOOKS_VISITORS_SORT
static final String SMOOKS_VISITORS_SORT
Should Smooks sort the Visitors, targeted at each selector, based on the what the Visitorsproduceandconsume. Default value "true".- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceConfigs
List<ResourceConfig> getResourceConfigs(String selector)
Get the list ofResourceConfigs for the specified selector definition. This list will be preselected andpreorderedfor the target execution context.- Parameters:
selector- Configurationselector. This parameter is treated case incensitively.- Returns:
- List of
ResourceConfiginstances, or null if noResourceConfigs are defined under that selector (for the device). - See Also:
getObjects(String)
-
getResourceConfigs
Map<String,List<ResourceConfig>> getResourceConfigs()
Get theResourceConfigmap for the target execution context. This Map will bepreorderedfor the target execution context.- Returns:
ResourceConfigmap for the target execution context, keyed by the configurationselector, with each value being aListof preorderedResourceConfiginstances.
-
getObjects
List<?> getObjects(String selector)
Get a list ofObjects from theResourceConfigs specified by the selector. Gets theResourceConfigs specified for the selector and attempts to instanciate a Java class instance from the resource specified by each of theResourceConfigs. Implementations should useRegistry.lookup(Object)} to construct each object.- Parameters:
selector- selector attribute value from the .cdrl file in the .cdrar. This parameter is treated case incensitively.- Returns:
- List of Object instances. An empty list is returned where no selectors exist.
- See Also:
Registry.lookup(Object),getResourceConfigs(String)
-
newFilter
Filter newFilter(ExecutionContext executionContext)
Get a new stream filter for the content delivery configuration.- Parameters:
executionContext- Execution context.- Returns:
- The stream filter.
-
getConfigBuilderEvents
List<ConfigBuilderEvent> getConfigBuilderEvents()
Get the list of Execution Events generated during the build of the configuration.- Returns:
- The list of events.
-
isDefaultSerializationOn
boolean isDefaultSerializationOn()
Is default serialization on..- Returns:
- True if default serialization is on, otherwise false.
-
sort
void sort() throws SmooksConfigException
- Throws:
SmooksConfigException- Sort failure.- See Also:
SMOOKS_VISITORS_SORT
-
addToExecutionLifecycleSets
void addToExecutionLifecycleSets() throws SmooksConfigExceptionAdd the execution lifecycle sets for the configuration.- Throws:
SmooksConfigException- Error resolving the handlers interested in the Execution lifecycle.
-
executeHandlerInit
void executeHandlerInit(ExecutionContext executionContext)
Initialize execution context lifecycle aware handlers.- Parameters:
executionContext- The execution context.
-
executeHandlerCleanup
void executeHandlerCleanup(ExecutionContext executionContext)
Cleanup execution context lifecycle aware handlers.- Parameters:
executionContext- The execution context.
-
getFilterBypass
FilterBypass getFilterBypass()
Get theFilterBypassfor this delivery configuration.- Returns:
- The
FilterBypassfor this delivery configuration, or null if non configured.
-
-