Package org.smooks.api.delivery
Interface ContentDeliveryConfig
-
- All Known Implementing Classes:
AbstractContentDeliveryConfig
,DOMContentDeliveryConfig
,SaxNgContentDeliveryConfig
@ThreadSafe public interface ContentDeliveryConfig
Content 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 String
SMOOKS_VISITORS_SORT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addToExecutionLifecycleSets()
Add the execution lifecycle sets for the configuration.void
executeHandlerCleanup(ExecutionContext executionContext)
Cleanup execution context lifecycle aware handlers.void
executeHandlerInit(ExecutionContext executionContext)
Initialize execution context lifecycle aware handlers.List<ContentDeliveryConfigExecutionEvent>
getContentDeliveryConfigExecutionEvents()
Get the list of Execution Events generated during the build of the configuration.FilterBypass
getFilterBypass()
Get theFilterBypass
for this delivery configuration.List<?>
getObjects(String selector)
Get a list ofObject
s from theResourceConfig
s specified by the selector.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..Filter
newFilter(ExecutionContext executionContext)
Get a new stream filter for the content delivery configuration.void
sort()
-
-
-
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 Visitorsproduce
andconsume
. Default value "true".- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceConfigs
List<ResourceConfig> getResourceConfigs(String selector)
Get the list ofResourceConfig
s for the specified selector definition. This list will be preselected andpreordered
for the target execution context.- Parameters:
selector
- Configurationselector
. This parameter is treated case incensitively.- Returns:
- List of
ResourceConfig
instances, or null if noResourceConfig
s are defined under that selector (for the device). - See Also:
getObjects(String)
-
getResourceConfigs
Map<String,List<ResourceConfig>> getResourceConfigs()
Get theResourceConfig
map for the target execution context. This Map will bepreordered
for the target execution context.- Returns:
ResourceConfig
map for the target execution context, keyed by the configurationselector
, with each value being aList
of preorderedResourceConfig
instances.
-
getObjects
List<?> getObjects(String selector)
Get a list ofObject
s from theResourceConfig
s specified by the selector. Gets theResourceConfig
s specified for the selector and attempts to instanciate a Java class instance from the resource specified by each of theResourceConfig
s. 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.
-
getContentDeliveryConfigExecutionEvents
List<ContentDeliveryConfigExecutionEvent> getContentDeliveryConfigExecutionEvents()
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 SmooksConfigException
Add 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 theFilterBypass
for this delivery configuration.- Returns:
- The
FilterBypass
for this delivery configuration, or null if non configured.
-
-