loading table of contents...

5.6. Bean Definition Reference

All following files are loaded into the application context automatically with cae-component, except for controller-services.xml, which is provided for backwards compatibility.

CAE Component Configuration
Service or Extension Point DefinitionType
richtextMarkupViewXmlMarkupView
blobViewMultiRangeBlobView
viewHookEventViewViewHookEventView
programmedViews

Map<String, View>

Extension point to register programmed views, initialized to (Markup := richtextMarkupView, Blob := blobView, ViewHookEvent := viewHookEventView) by a customizer with order 100.

fallbackViewRepository Default ViewRepository implementation, loading templates from /WEB-INF/templates-fallback and using richtextMarkupView, blobView, errorView, viewExceptionRenderer, and viewEngines.
templateLocations

Map<String, String>

Extension point to register additional template locations with templateViewRepositoryProvider, initialized to "default" := /WEB-INF/templates.

templateLocationPatterns

List<String>

Extension point to register additional template location path patterns with templateViewRepositoryProvider. In each pattern, "%s" will be replaced with the view repository name to resolve a location.

templateViewRepositoryProvider

Default ViewRepositoryProvider implementation, initialized with programmedViews, viewDecorators, and viewEngines. It will lookup view repositories using templateLocations and templateLocationPatterns. View repository name "fallback" will be resolved to the fallbackViewRepository.

viewRepositoryProviders are initialized to try view repository names "default" and "fallback", if no view is found.

Table 5.2. META-INF/coremedia/component-cae.xml in artifact cae-component


Views
Service or Extension Point DefinitionType
viewEngines

Map<String, ViewEngine>

Extension point to register custom view engines for template file extensions, initialized to ("jsp" := WebappResourceViewEngine, "ftl" := freemarkerViewEngine) by a customizer with order 100.

viewDecorators

List<ViewDecorator>

Extension point to register custom view decorators, initialized to exceptionDecorator, if view.errorhandler.enabled=true, and debugDecorator, if view.debug.enabled=true.

viewRepositoryNameProviders

List<ViewRepositoryNameProvider>

Extension point to register custom view repository name providers, initialized to an implementation returning "default" and "fallback".

viewRepositoryProviders

List<ViewRepositoryProvider>

Extension point to register custom view repository providers, initialized to templateViewRepositoryProvider.

renderNodeDecoratorProviders

List<RenderNodeDecoratorProvider>

Extension point to register custom render node decorator providers.

viewResolverAttributes

Map<String, Object>

Extension point to register custom view resolver attributes, which will be copied into the request attributes for each request, before rendering a view.

viewResolverModelAwareViewResolver

Table 5.3. com/coremedia/cae/view-services.xml in artifact cae-viewservices-impl


Service or Extension Point DefinitionType
viewingHandlerExceptionResolverViewingHandlerExceptionResolver
errorViewErrorView
viewExceptionRendererViewExceptionRenderer
httpErrorViewHttpErrorView
exceptionDecoratorExceptionHandlingViewDecorator, will only be registered with viewDecorators, if property view.errorhandler.enabled=true.
exceptionDecoratorAcceptBeanClasses

List<Class>

Configuration for exceptionDecorator, empty by default.

exceptionDecoratorRejectBeanClasses

List<Class>

Configuration for exceptionDecorator, empty by default.

exceptionDecoratorAcceptViews

List<java.util.regex.Pattern>

Configuration for exceptionDecorator, empty by default.

exceptionDecoratorRejectViews

List<java.util.regex.Pattern>

Configuration for exceptionDecorator, empty by default.

Table 5.4. com/coremedia/cae/view-error-services.xml in artifact cae-viewservices-impl


Service or Extension Point DefinitionType
debugDecoratorDebugViewDecorator, will only be registered with viewDecorators, if property view.debug.enabled=true.
debugDecoratorAcceptBeanClasses

List<Class>

Configuration for debugDecorator, empty by default.

debugDecoratorRejectBeanClasses

List<Class>

Configuration for debugDecorator, empty by default.

debugDecoratorAcceptViews

List<java.util.regex.Pattern>

Configuration for debugDecorator, empty by default.

debugDecoratorRejectViews

List<java.util.regex.Pattern>

Configuration for debugDecorator, empty by default.

Table 5.5. com/coremedia/cae/view-development-services.xml in artifact cae-viewservices-impl


Service or Extension Point DefinitionType
freemarkerViewEngineViewEngine to render FreeMarker templates.
freemarkerModels

Map<String, Class>

Extension point to register additional TemplateModel implementations, which will be made available to FreeMarker templates. Initialized to the set of CAE-defined directives.

Table 5.6. com/coremedia/cae/view-freemarker-services.xml in artifact cae-viewservices-impl


Unified API
Service or Extension Point DefinitionType
connectionParameters

Map<String, Object>

Configuration for the connection bean.

connectionCapConnection
contentRepositoryContentRepository
userRepositoryUserRepository
workflowRepositoryWorkflowRepository
worklistServiceWorklistService

Table 5.7. com/coremedia/cap/common/uapi-services.xml in artifact cap-unified-api


Service or Extension Point DefinitionType
contentIdSchemeContentIdScheme
contentBlobIdSchemeContentBlobIdScheme
memberIdSchemeMemberIdScheme
contentTypeIdSchemeContentTypeIdScheme
contentPropertyIdSchemeContentPropertyIdScheme

Table 5.8. com/coremedia/cae/uapi-services.xml in artifact cae-util


Data Views
Service or Extension Point DefinitionType
dataViewFactoryConfigurableDataViewFactory implementation, loading its data view definitions from dataViewDefinitionLocations
dataViewDefinitionLocations

List<String>

Extension point to register data view factory configuration file patterns, initialized to classpath:/framework/dataviews/**/*.xml, /WEB-INF/dataviews/**/*.xml.

Table 5.9. com/coremedia/cae/dataview-services.xml in artifact cae-contentbeanservices-impl


Content Beans
Service or Extension Point DefinitionType
contentBeanFactoryContentBeanFactory, creating content beans from prototype beans with name "contentBeanFactory:<content_type>".
contentBeanIdSchemeContentBeanIdScheme

Table 5.10. com/coremedia/cae/contentbean-services.xml in artifact cae-contentbeanservices-impl


Caching
Service or Extension Point DefinitionType
cacheCache instance created for connection

Table 5.11. com/coremedia/cache/cache-services.xml in artifact coremedia-cache


Link Generation
Service or Extension Point DefinitionType
linkSchemes

List<LinkScheme>

Extension point to register link schemes with linkFormatter.

linkTransformers

List<LinkTransformer>

Extension point to register link transformers with linkFormatter.

linkFormatterLinkFormatter

Table 5.12. com/coremedia/cae/link-services.xml in artifact cae-linkservices-impl


IDs
Service or Extension Point DefinitionType
idProviderIdProvider, initialized with the registered idSchemes.
idSchemes

List<IdScheme>

Extension point to register ID schemes with idProvider. Initialized to contentIdScheme, contentBeanIdScheme, contentBlobIdScheme, memberIdScheme, contentTypeIdScheme, and contentPropertyIdScheme by a customizer with order 100.

Table 5.13. com/coremedia/id/id-services.xml in artifact coremedia-id


Handlers
Service or Extension Point DefinitionType
bindingConverters

Set<?> (Converter or GenericConverter)

Extension point to register custom converters to bind request path variables to handler method parameters.

httpMessageConverters

List<HttpMessageConverter>

Extension point to register custom HTTP message converters to parse HTTP request body content or generate HTTP response body content.

bindingPropertyEditorRegistrars

List<PropertyEditorRegistrar>

Extension point to register custom property editor registrars (which in turn will register property editors) to bind form fields to bean properties.

handlerInterceptors

List<HandlerInterceptor>

Extension point to register handler interceptors, which will be applied to all handlers.

idContentBeanConverterConverter to convert numeric IDs to method parameters of type ContentBean. An application must register this bean with bindingConverters explicitly, in order to use it.
idGenericContentBeanConverterGenericConverter to convert between numeric IDs and subtypes of ContentBean. This converter subsumes the functionality provided by idContentBeanConverter. An application must register this bean with bindingConverters explicitly, in order to use it.
idContentBeanPropertyEditorjava.beans.PropertyEditor to convert between numeric IDs and ContentBeans. An application must register this bean with bindingPropertyEditorRegistrars explicitly using a PropertyEditorRegistrar, in order to use it.

Table 5.14. com/coremedia/cae/handler-services.xml in artifact cae-handlerservices-impl


MIME Type Mappings
Service or Extension Point DefinitionType
mimeTypeServiceMimeTypeService, providing methods related to MIME types and file extensions. Note: The implementation class of this bean is deprecated and will be replaced by TikaMimeTypeService
mimePropertiesFileLocations

List<Resource>

Extension point to register locations of property files containing MIME type mappings. classpath:/com/coremedia/mimetype/mime-default.properties and /WEB-INF/mime.properties.

This bean is deprecated and will be removed in a future release.

tikaMimeTypeServiceTikaMimeTypeService, providing methods related to MIME type detection and mapping to file extensions. The implementation is based on Apache Tika. Configured with the following properties:

mimeTypeResourceNames A comma-separated list of resource names of Tika Mime-Info configuration files. Set this property by Spring Environment property mimeTypeService.mimeTypesResourceNames.

tikaConfig An optional custom Tika configuration. Set this property by Spring Environment property mimeTypeService.tikaConfig. The value of this property must be a Spring Resource location (e.g. file:/path/to/local/file), or null. If a custom Tika configuration is set, the mimeInfoResourceNames configuration has no effect.

Table 5.15. com/coremedia/mimetype/mimetype-service.xml in artifact coremedia-common


Security
Service or Extension Point DefinitionType
csrfTokenManagementCsrfPreventionManagement, providing methods handling anti-CSRF tokens.

Table 5.16. com/coremedia/cae/security-services.xml in artifact cae-util


Image Transformations
Service or Extension Point DefinitionType
blobTransformerCachingBlobTransformer, handling concurrent image transformation requests, caching image transformation results. Delegates cache misses to the bean throttlingTransformer.
throttlingBlobTransformerThrottlingBlobTransformer, handling concurrent image transformation requests, performing some basic load control. Delegates the actual transformation work to the bean imageTransformer.
imageTransformerDispatchingBlobTransformer, the blob transformer actually performing image transformations. Holds a list of processor objects, initialized with the list bean imageProcessors.
imageProcessors

List<?>, extension point to register your own image processors, implementing additional image operations. Initialized with a single processor, imageOperations.

imageOperationsJava2DImageOperations, implementing the ImageOperations interface using the javax.imageio library. You may reuse this bean and its operations when implementing your own image operations.
imageTransformerInputAdapterJava2DInputAdapter, input adapter used by imageTransformer.

Since the reading and decoding of an image consumes a significant amount of processing time, this input adapter caches loaded images in memory. When another variant is then requested for the same image, this variant can be computed much faster.

Configured with the following properties:

cache the cache instance to use, configured with 100MB heap capacity for the configured cache class. You may overwrite this with the property com.coremedia.transform.loadedImageCacheCapacity within your application.properties.

cacheClass="com.coremedia.transform.image.java2d.LoadedImageCacheKey"

imageTransformerOutputAdapterJava2DOutputAdapter, output adapter used by imageTransformer. Configured with the following properties:

preserveMetadata=false

defaultProgressiveThreshold=10000

defaultJpegCompressionQuality=0.75

imageTransformerConversionService

org.springframework.core.convert.ConversionService, conversion service used by the imageTransformer to convert operation arguments to the required method parameter type. Extension point to register your own type converters.

Table 5.17. com/coremedia/transform/blob-transformer.xml in artifact coremedia-transform


Controllers

controller-services.xml is not imported automatically and is only provided for backwards compatibility with existing controller implementations.

Service or Extension Point DefinitionType
controllerMappings

Map<String, Controller>

Extension point to register controllers handling requests with the given path prefix.

controllerInterceptors Alias for handlerInterceptors, which will be applied to all controllers in controllerMappings.

Table 5.18. com/coremedia/cae/controller-services.xml in artifact cae-handlerservices-impl