Package org.smooks.engine.delivery
Class AbstractContentDeliveryConfig
- java.lang.Object
-
- org.smooks.engine.delivery.AbstractContentDeliveryConfig
-
- All Implemented Interfaces:
ContentDeliveryConfig
- Direct Known Subclasses:
DOMContentDeliveryConfig
,SaxNgContentDeliveryConfig
public abstract class AbstractContentDeliveryConfig extends Object implements ContentDeliveryConfig
AbstractContentDeliveryConfig
.- Author:
- tom.fennelly@gmail.com
-
-
Field Summary
-
Fields inherited from interface org.smooks.api.delivery.ContentDeliveryConfig
SMOOKS_VISITORS_SORT
-
-
Constructor Summary
Constructors Constructor Description AbstractContentDeliveryConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Visitor>
voidaddToExecutionLifecycleSets(ContentHandlerBindingIndex<T> contentHandlerBindingIndex)
void
executeHandlerCleanup(ExecutionContext executionContext)
Cleanup execution context lifecycle aware handlers.void
executeHandlerInit(ExecutionContext executionContext)
Initialize execution context lifecycle aware handlers.protected boolean
getCloseResult()
protected boolean
getCloseSource()
List<ContentDeliveryConfigExecutionEvent>
getContentDeliveryConfigExecutionEvents()
Get the list of Execution Events generated during the build of the configuration.protected FilterBypass
getFilterBypass(ContentHandlerBindingIndex<?>... contentHandlerBindingIndexes)
List<?>
getObjects(String selector)
Get a listObject
s from the suppliedResourceConfig
selector value.Map<String,List<ResourceConfig>>
getResourceConfigs()
Get theResourceConfig
map for the target execution context.List<ResourceConfig>
getResourceConfigs(String selector)
Get the list ofResourceConfig
s for the specified selector definition.boolean
isDefaultSerializationOn()
Is default serialization on..void
setRegistry(Registry registry)
void
setResourceConfigs(Map<String,List<ResourceConfig>> resourceConfigTable)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.smooks.api.delivery.ContentDeliveryConfig
addToExecutionLifecycleSets, getFilterBypass, newFilter, sort
-
-
-
-
Method Detail
-
setRegistry
public void setRegistry(Registry registry)
-
getResourceConfigs
public List<ResourceConfig> getResourceConfigs(String selector)
Get the list ofResourceConfig
s for the specified selector definition.- Specified by:
getResourceConfigs
in interfaceContentDeliveryConfig
- Parameters:
selector
- The configuration "selector" attribute value from the .cdrl file in the .cdrar.- Returns:
- List of ResourceConfig instances, or null.
- See Also:
ContentDeliveryConfig.getObjects(String)
-
setResourceConfigs
public void setResourceConfigs(Map<String,List<ResourceConfig>> resourceConfigTable)
-
getResourceConfigs
public Map<String,List<ResourceConfig>> getResourceConfigs()
Get theResourceConfig
map for the target execution context. This Map will bepreordered
for the target execution context.- Specified by:
getResourceConfigs
in interfaceContentDeliveryConfig
- Returns:
ResourceConfig
map for the target execution context, keyed by the configurationselector
, with each value being aList
of preorderedResourceConfig
instances.
-
getObjects
public List<?> getObjects(String selector)
Get a listObject
s from the suppliedResourceConfig
selector value. UsesRegistry#getObject(ResourceConfig)
to construct the object.- Specified by:
getObjects
in interfaceContentDeliveryConfig
- 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.
- See Also:
Registry.lookup(Object)
,ContentDeliveryConfig.getResourceConfigs(String)
-
getContentDeliveryConfigExecutionEvents
public List<ContentDeliveryConfigExecutionEvent> getContentDeliveryConfigExecutionEvents()
Description copied from interface:ContentDeliveryConfig
Get the list of Execution Events generated during the build of the configuration.- Specified by:
getContentDeliveryConfigExecutionEvents
in interfaceContentDeliveryConfig
- Returns:
- The list of events.
-
isDefaultSerializationOn
public boolean isDefaultSerializationOn()
Description copied from interface:ContentDeliveryConfig
Is default serialization on..- Specified by:
isDefaultSerializationOn
in interfaceContentDeliveryConfig
- Returns:
- True if default serialization is on, otherwise false.
-
addToExecutionLifecycleSets
public <T extends Visitor> void addToExecutionLifecycleSets(ContentHandlerBindingIndex<T> contentHandlerBindingIndex)
-
executeHandlerInit
public void executeHandlerInit(ExecutionContext executionContext)
Description copied from interface:ContentDeliveryConfig
Initialize execution context lifecycle aware handlers.- Specified by:
executeHandlerInit
in interfaceContentDeliveryConfig
- Parameters:
executionContext
- The execution context.
-
executeHandlerCleanup
public void executeHandlerCleanup(ExecutionContext executionContext)
Description copied from interface:ContentDeliveryConfig
Cleanup execution context lifecycle aware handlers.- Specified by:
executeHandlerCleanup
in interfaceContentDeliveryConfig
- Parameters:
executionContext
- The execution context.
-
getFilterBypass
protected FilterBypass getFilterBypass(ContentHandlerBindingIndex<?>... contentHandlerBindingIndexes)
-
getCloseSource
protected boolean getCloseSource()
-
getCloseResult
protected boolean getCloseResult()
-
-