Package org.smooks.engine.delivery
Class AbstractContentDeliveryConfig
- java.lang.Object
-
- org.smooks.engine.delivery.AbstractContentDeliveryConfig
-
- All Implemented Interfaces:
org.smooks.api.delivery.ContentDeliveryConfig
- Direct Known Subclasses:
DOMContentDeliveryConfig,SaxNgContentDeliveryConfig
public abstract class AbstractContentDeliveryConfig extends Object implements org.smooks.api.delivery.ContentDeliveryConfig
AbstractContentDeliveryConfig.- Author:
- tom.fennelly@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleancloseSinkprotected BooleancloseSourceprotected List<org.smooks.api.delivery.event.ContentDeliveryConfigExecutionEvent>configBuilderEventsConfig builder events list.protected BooleanisDefaultSerializationOnprotected MapobjectsTableTable of Object instance lists keyed by selector.protected Set<org.smooks.api.lifecycle.PostExecutionLifecycle>postExecutionLifecyclesprotected Set<org.smooks.api.lifecycle.PreExecutionLifecycle>preExecutionLifecyclesprotected org.smooks.api.RegistryregistryContainer context.protected Map<String,List<org.smooks.api.resource.config.ResourceConfig>>resourceConfigTableTable of ResourceConfig instances keyed by selector value.
-
Constructor Summary
Constructors Constructor Description AbstractContentDeliveryConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.smooks.api.resource.visitor.Visitor>
voidaddToExecutionLifecycleSets(ContentHandlerBindingIndex<T> contentHandlerBindingIndex)voidexecuteHandlerCleanup(org.smooks.api.ExecutionContext executionContext)voidexecuteHandlerInit(org.smooks.api.ExecutionContext executionContext)protected booleangetCloseSink()protected booleangetCloseSource()List<org.smooks.api.delivery.event.ContentDeliveryConfigExecutionEvent>getContentDeliveryConfigExecutionEvents()protected org.smooks.api.delivery.FilterBypassgetFilterBypass(ContentHandlerBindingIndex<?>... contentHandlerBindingIndexes)List<?>getObjects(String selector)Get a listObjects from the suppliedResourceConfigselector value.Map<String,List<org.smooks.api.resource.config.ResourceConfig>>getResourceConfigs()Get theResourceConfigmap for the target execution context.List<org.smooks.api.resource.config.ResourceConfig>getResourceConfigs(String selector)Get the list ofResourceConfigs for the specified selector definition.booleanisDefaultSerializationOn()voidsetRegistry(org.smooks.api.Registry registry)voidsetResourceConfigs(Map<String,List<org.smooks.api.resource.config.ResourceConfig>> resourceConfigTable)
-
-
-
Field Detail
-
registry
protected org.smooks.api.Registry registry
Container context.
-
resourceConfigTable
protected Map<String,List<org.smooks.api.resource.config.ResourceConfig>> resourceConfigTable
Table of ResourceConfig instances keyed by selector value. Each table entry contains a List of ResourceConfig instances.
-
objectsTable
protected final Map objectsTable
Table of Object instance lists keyed by selector. Each table entry contains a List of Objects.
-
configBuilderEvents
protected final List<org.smooks.api.delivery.event.ContentDeliveryConfigExecutionEvent> configBuilderEvents
Config builder events list.
-
preExecutionLifecycles
protected final Set<org.smooks.api.lifecycle.PreExecutionLifecycle> preExecutionLifecycles
-
postExecutionLifecycles
protected final Set<org.smooks.api.lifecycle.PostExecutionLifecycle> postExecutionLifecycles
-
isDefaultSerializationOn
protected Boolean isDefaultSerializationOn
-
closeSource
protected Boolean closeSource
-
closeSink
protected Boolean closeSink
-
-
Method Detail
-
setRegistry
public void setRegistry(org.smooks.api.Registry registry)
-
getResourceConfigs
public List<org.smooks.api.resource.config.ResourceConfig> getResourceConfigs(String selector)
Get the list ofResourceConfigs for the specified selector definition.- Specified by:
getResourceConfigsin interfaceorg.smooks.api.delivery.ContentDeliveryConfig- Parameters:
selector- The configuration "selector" attribute value from the .cdrl file in the .cdrar.- Returns:
- List of ResourceConfig instances, or null.
-
setResourceConfigs
public void setResourceConfigs(Map<String,List<org.smooks.api.resource.config.ResourceConfig>> resourceConfigTable)
-
getResourceConfigs
public Map<String,List<org.smooks.api.resource.config.ResourceConfig>> getResourceConfigs()
Get theResourceConfigmap for the target execution context. This Map will bepreorderedfor the target execution context.- Specified by:
getResourceConfigsin interfaceorg.smooks.api.delivery.ContentDeliveryConfig- Returns:
ResourceConfigmap for the target execution context, keyed by the configurationselector, with each value being aListof preorderedResourceConfiginstances.
-
getObjects
public List<?> getObjects(String selector)
Get a listObjects from the suppliedResourceConfigselector value. UsesRegistry#getObject(ResourceConfig)to construct the object.- Specified by:
getObjectsin interfaceorg.smooks.api.delivery.ContentDeliveryConfig- Parameters:
selector- selector attribute value from the .cdrl file in the .cdrar.- Returns:
- List of Object instances. An empty list is returned where no selectors exist.
-
getContentDeliveryConfigExecutionEvents
public List<org.smooks.api.delivery.event.ContentDeliveryConfigExecutionEvent> getContentDeliveryConfigExecutionEvents()
- Specified by:
getContentDeliveryConfigExecutionEventsin interfaceorg.smooks.api.delivery.ContentDeliveryConfig
-
isDefaultSerializationOn
public boolean isDefaultSerializationOn()
- Specified by:
isDefaultSerializationOnin interfaceorg.smooks.api.delivery.ContentDeliveryConfig
-
addToExecutionLifecycleSets
public <T extends org.smooks.api.resource.visitor.Visitor> void addToExecutionLifecycleSets(ContentHandlerBindingIndex<T> contentHandlerBindingIndex)
-
executeHandlerInit
public void executeHandlerInit(org.smooks.api.ExecutionContext executionContext)
- Specified by:
executeHandlerInitin interfaceorg.smooks.api.delivery.ContentDeliveryConfig
-
executeHandlerCleanup
public void executeHandlerCleanup(org.smooks.api.ExecutionContext executionContext)
- Specified by:
executeHandlerCleanupin interfaceorg.smooks.api.delivery.ContentDeliveryConfig
-
getFilterBypass
protected org.smooks.api.delivery.FilterBypass getFilterBypass(ContentHandlerBindingIndex<?>... contentHandlerBindingIndexes)
-
getCloseSource
protected boolean getCloseSource()
-
getCloseSink
protected boolean getCloseSink()
-
-