close

Filter

loading table of contents...

Content Application Developer Manual / Version 2307

Table Of Contents

5.6 Bean Definition Reference

The following Spring beans are loaded into the application context automatically with the cae-component Maven artifact, except for beans defined in the Spring XML config file controller-services.xml, which is provided for backwards compatibility.

CAE Component Configuration
Service or Extension Point DefinitionType
fallbackViewRepository Default ViewRepository implementation, loading templates from /WEB-INF/templates-fallback and using richtextMarkupView, blobView, errorView, viewExceptionRenderer, and viewEngines.
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.1. Beans in artifact com.coremedia.cms: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 cae.view.errorhandler.enabled=true, and debugDecorator, if cae.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.

modelAwareViewResolverModelAwareViewResolver
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.

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.

viewingHandlerExceptionResolverViewingHandlerExceptionResolver
errorViewErrorView
viewExceptionRendererViewExceptionRenderer
httpErrorViewHttpErrorView
exceptionDecoratorExceptionHandlingViewDecorator, will only be registered with viewDecorators, if property cae.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.

debugDecoratorDebugViewDecorator, will only be registered with viewDecorators, if property cae.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.

freemarkerViewEngineViewEngine to render FreeMarker templates.

Table 5.2. Beans in artifact com.coremedia.cms:cae-viewservices


Unified API
Service or Extension Point DefinitionType
connectionParameters

Map<String, Object>

Configuration for the connection bean.

connectionCapConnection
contentRepositoryContentRepository
userRepositoryUserRepository
workflowRepositoryWorkflowRepository
worklistServiceWorklistService

Table 5.3. Beans in artifact com.coremedia.cms:cap-unified-api


Service or Extension Point DefinitionType
contentIdSchemeContentIdScheme
contentBlobIdSchemeContentBlobIdScheme
memberIdSchemeMemberIdScheme
contentTypeIdSchemeContentTypeIdScheme
contentPropertyIdSchemeContentPropertyIdScheme

Table 5.4. Beans in artifact com.coremedia.cms: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.

contentBeanFactoryContentBeanFactory, creating content beans from prototype beans with name "contentBeanFactory:<content_type>".
contentBeanIdSchemeContentBeanIdScheme

Table 5.5. Beans in artifact com.coremedia.cms:cae-contentbeanservices


Caching
Service or Extension Point DefinitionType
cacheCache instance created for connection

Table 5.6. Beans in artifact com.coremedia.cms: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.7. Beans in artifact com.coremedia.cms:cae-linkservices


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.8. Beans in artifact com.coremedia.cms: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.9. Beans in artifact com.coremedia.cms:cae-handlerservices


MIME Type Mappings
Service or Extension Point DefinitionType
mimeTypeService (alias tikaMimeTypeService)

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

  • mimeTypesResourceNames

    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 (file:/path/to/local/file, for example), or null. If a custom Tika configuration is set, the mimeTypesResourceNames configuration has no effect.

Table 5.10. Beans in artifact com.coremedia.cms:coremedia-common


Image Transformations
Service or Extension Point DefinitionType
blobTransformerAn opaque BlobTransformer, handling concurrent image transformation requests.

Table 5.11. Beans in artifact com.coremedia.cms:coremedia-transform


Image Transformations, Built-In

These beans are available only if you are using the built-in Java image transformation of the CoreMedia Content Cloud applications.

Service or Extension Point DefinitionType
blobTransformerIn case of the built-in transformation, the blobTransformer bean is a CachingBlobTransformer, 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.
imageSizePermitStrategyImageSizePermitStrategy, the permit strategy for the throttelingBlobTransformer. For images, it reads the image header and estimates the required in-memory size of the image. Finally, a safety factor is applied to the result.
memoryGuardJvmMemoryGuard, checks the available JVM memory prior to allocating large chunks of memory during loading and transforming blobs.
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.
imageTransformerInputAdapterJava2DImageInputAdapter, input adapter used by imageTransformer.

Since the reading and decoding of an image may consume 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 cache.capacities.com.coremedia.transform.image.java2d.LoadedImageCacheKey.

imageTransformerOutputAdapterJava2DImageOutputAdapter, 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.12. Conditional beans in artifact com.coremedia.cms: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.13. com/coremedia/cae/controller-services.xml in artifact cae-handlerservices


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.