org.springframework.richclient.application.support
Class DefaultApplicationServices

java.lang.Object
  extended by org.springframework.richclient.application.support.DefaultApplicationServices
All Implemented Interfaces:
ApplicationContextAware, ApplicationServices

public class DefaultApplicationServices
extends Object
implements ApplicationServices, ApplicationContextAware

A default implementation of the ApplicationServices (service locator) interface. This implementation allows for the direct registration of service implementations by using various setter methods (like setImageSource(ImageSource)). Service registry entries can also be added in bulk using the setRegistryEntries(Map) method.

Except in testing environments, this class will typically be instantiated in the application context and the various service implementations will be set BY ID. The use of service bean ids instead of direct bean references is to avoid numerous problems with cyclic dependencies and other order dependent operations. So, a typical incarnation might look like this:

       <bean id="applicationServices"
           class="org.springframework.richclient.application.support.DefaultApplicationServices">
           <property name="applicationObjectConfigurerId"><idref bean="applicationObjectConfigurer" /></property>
           <property name="imageSourceId"><idref bean="imageSource"/></property>
           <property name="rulesSourceId"><idref bean="rulesSource"/></property>
           <property name="conversionServiceId"><idref bean="conversionService"/></property>
           <property name="formComponentInterceptorFactoryId"><idref bean="formComponentInterceptorFactory"/></property>
       </bean>
 
Note the use of the idref form instead of just using a string value. This is the preferred syntax in order to avoid having misspelled bean names go unreported.

Which service implementation is returned by getService(Class) will be determined through the following steps:

  1. Consult the current registry of service implementations which have been explicitly defined through bean definition. If a registry entry was made using a bean id, this is the point at which it will be dereferenced into the actual bean implementation. So, the bean impementation will not be referenced until it is requested.
  2. If the service impl. is not found yet the short string name of the service' Java class in decapitalized JavaBeans property format will be used to lookup the service implementation in the current application context.
    If the service class is org.springframework.richclient.factory.MenuFactory the bean name menuFactory will be used to find the bean
  3. If the service impl. is not found yet and a default implementation can be provided, it will be constructed at that time. Default implementations are provided for essentially all services referenced by the platform.

Author:
Larry Streepy

Nested Class Summary
protected static interface DefaultApplicationServices.ImplBuilder
          Internal interface used to provide default implementation builders.
 
Field Summary
protected static DefaultApplicationServices.ImplBuilder applicationContextImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder applicationObjectConfigurerImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder applicationPageFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder applicationSecurityManagerImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder applicationWindowFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder binderSelectionStrategyImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder bindingFactoryProviderImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder buttonFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder commandConfigurerImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder commandServicesImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder componentFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder conversionServiceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder FieldFaceSourceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder formComponentInterceptorFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder iconSourceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder imageSourceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder labeledEnumResolverImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder menuFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder messageSourceAccessorImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder messageSourceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder messageTranslatorFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder pageComponentPaneFactoryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder pageDescriptorRegistryImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder rulesSourceImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder SecurityControllerManagerImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder valueChangeDetectorImplBuilder
           
protected static DefaultApplicationServices.ImplBuilder viewDescriptorRegistryImplBuilder
           
 
Constructor Summary
DefaultApplicationServices()
          Default Constructor.
DefaultApplicationServices(ApplicationContext applicationContext)
          Constuct using the given application context.
 
Method Summary
protected  boolean containsDefaultImplementation(Class serviceType)
          Tests if a default implementation for the requested service type is available
 boolean containsService(Class serviceType)
          Determine if a service of the requested type is available.
protected  boolean containsServiceForClassType(Class serviceType)
          Tests if the application context contains a bean definition by using the decapitalized shortname of the serviceType class name
 ApplicationContext getApplicationContext()
           
protected  Object getDefaultImplementation(Class serviceType)
          Get the default implementation of a service according to the service type.
 Object getService(Class serviceType)
          Get a service of the indicated type.
protected  Object getServiceForClassType(Class serviceType)
          Get the implementation of a service by using the decapitalized shortname of the serviceType class name.
 void setApplicationContext(ApplicationContext applicationContext)
          Set the application context.
 void setApplicationObjectConfigurer(ApplicationObjectConfigurer applicationObjectConfigurer)
          Set the application object configurer service implementation.
 void setApplicationObjectConfigurerId(String applicationObjectConfigurerId)
          Set the application object configurer service implementation bean id
 void setApplicationPageFactory(ApplicationPageFactory factory)
          Set the ApplicationPage factory service implementation
 void setApplicationPageFactoryId(String factoryId)
          Set the ApplicationPage factory service implementation bean id
 void setApplicationSecurityManager(ApplicationSecurityManager applicationSecurityManager)
          Set the application security manager service implementation.
 void setApplicationSecurityManagerId(String applicationSecurityManagerId)
          Set the application security manager service implementation bean id
 void setApplicationWindowFactory(ApplicationWindowFactory factory)
          Set the ApplicationWindow factory service implementation
 void setApplicationWindowFactoryId(String factoryId)
          Set the ApplicationWindow factory service implementation bean id
 void setBinderSelectionStrategy(BinderSelectionStrategy binderSelectionStrategy)
          Set the binder selection strategy service implementation
 void setBinderSelectionStrategyId(String binderSelectionStrategyId)
          Set the binder selection strategy service implementation bean id
 void setBindingFactoryProvider(BindingFactoryProvider bindingFactoryProvider)
          Set the binding factory provider service implementation
 void setBindingFactoryProviderId(String bindingFactoryProviderId)
          Set the binding factory provider service implementation bean id
 void setButtonFactory(ButtonFactory buttonFactory)
          Set the button factory service implementation
 void setButtonFactoryId(String buttonFactoryId)
          Set the button factory service implementation bean id
 void setCommandConfigurer(CommandConfigurer commandConfigurer)
          Set the command configurer service implementation
 void setCommandConfigurerId(String commandConfigurerId)
          Set the command configurer service implementation bean id
 void setCommandServices(CommandServices commandServices)
          Set the command services service implementation
 void setCommandServicesId(String commandServicesId)
          Set the command services service implementation bean id
 void setComponentFactory(ComponentFactory componentFactory)
          Set the component factory service implementation
 void setComponentFactoryId(String componentFactoryId)
          Set the component factory service implementation bean id
 void setConversionService(org.springframework.binding.convert.ConversionService conversionService)
          Set the conversion service service implementation
 void setConversionServiceId(String conversionServiceId)
          Set the conversion service service implementation bean id
 void setFieldFaceSource(FieldFaceSource fieldFaceSource)
          Set the field face descriptor source service implementation
 void setFieldFaceSourceId(String fieldFaceSourceId)
          Set the field face descriptor source service implementation bean id
 void setFormComponentInterceptorFactory(FormComponentInterceptorFactory formComponentInterceptorFactory)
          Set the form component interceptor factory service implementation
 void setFormComponentInterceptorFactoryId(String formComponentInterceptorFactoryId)
          Set the form component interceptor factory service implementation bean id
 void setIconSource(IconSource iconSource)
          Set the icon source service implementation
 void setIconSourceId(String iconSourceId)
          Set the icon source service implementation bean id
 void setImageSource(ImageSource imageSource)
          Set the image source service implementation
 void setImageSourceId(String imageSourceId)
          Set the image source service implementation bean id
 void setLabeledEnumResolver(LabeledEnumResolver labeledEnumResolver)
          Set the labeled enum resolver service implementation
 void setLabeledEnumResolverId(String labeledEnumResolverId)
          Set the labeled enum resolver service implementation bean id
 void setMenuFactory(MenuFactory menuFactory)
          Set the menu factory service implementation
 void setMenuFactoryId(String menuFactoryId)
          Set the menu factory service implementation bean id
 void setMessageSource(MessageSource messageSource)
          Set the message source service implementation
 void setMessageSourceAccesor(MessageSourceAccessor messageSourceAccessor)
          Set the message source accessor service implementation
 void setMessageSourceAccesorId(String messageSourceAccessorId)
          Set the message source accessor service implementation bean id
 void setMessageSourceId(String messageSourceId)
          Set the message source service implementation bean id
 void setMessageTranslatorFactory(MessageTranslatorFactory messageTranslatorFactory)
          Set the message translator registry service implementation
 void setMessageTranslatorFactoryId(String messageTranslatorFactoryId)
          Set the message translator registry service implementation bean id
 void setPageComponentPaneFactory(PageComponentPaneFactory factory)
          Set the PageComponentPane factory service implementation bean
 void setPageComponentPaneFactoryId(String factoryId)
          Set the PageComponentPane factory service implementation bean id
 void setPageDescriptorRegistry(PageDescriptorRegistry pageDescriptorRegistry)
          Set the page descriptor registry service implementation
 void setPageDescriptorRegistryId(String pageDescriptorRegistryId)
          Set the page descriptor registry service implementation bean id
 void setRegistryEntries(Map entryMap)
          Add entries to the service registry.
 void setRulesSource(RulesSource rulesSource)
          Set the rules source service implementation
 void setRulesSourceId(String rulesSourceId)
          Set the rules source service implementation bean id
 void setSecurityControllerManager(SecurityControllerManager securityControllerManager)
          Set the security controller manager service implementation
 void setSecurityControllerManagerId(String securityControllerManagerId)
          Set the security controller manager service implementation bean id
 void setValueChangeDetector(ValueChangeDetector valueChangeDetector)
          Set the value change detector service imlpementation.
 void setValueChangeDetectorId(String valueChangeDetectorId)
          Set the value change detector service imlpementation bean id
 void setViewDescriptorRegistry(ViewDescriptorRegistry viewDescriptorRegistry)
          Set the view descriptor registry service implementation
 void setViewDescriptorRegistryId(String viewDescriptorRegistryId)
          Set the view descriptor registry service implementation bean id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationContextImplBuilder

protected static final DefaultApplicationServices.ImplBuilder applicationContextImplBuilder

menuFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder menuFactoryImplBuilder

buttonFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder buttonFactoryImplBuilder

commandServicesImplBuilder

protected static final DefaultApplicationServices.ImplBuilder commandServicesImplBuilder

componentFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder componentFactoryImplBuilder

formComponentInterceptorFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder formComponentInterceptorFactoryImplBuilder

applicationObjectConfigurerImplBuilder

protected static final DefaultApplicationServices.ImplBuilder applicationObjectConfigurerImplBuilder

commandConfigurerImplBuilder

protected static final DefaultApplicationServices.ImplBuilder commandConfigurerImplBuilder

imageSourceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder imageSourceImplBuilder

iconSourceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder iconSourceImplBuilder

rulesSourceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder rulesSourceImplBuilder

conversionServiceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder conversionServiceImplBuilder

binderSelectionStrategyImplBuilder

protected static final DefaultApplicationServices.ImplBuilder binderSelectionStrategyImplBuilder

FieldFaceSourceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder FieldFaceSourceImplBuilder

bindingFactoryProviderImplBuilder

protected static final DefaultApplicationServices.ImplBuilder bindingFactoryProviderImplBuilder

valueChangeDetectorImplBuilder

protected static final DefaultApplicationServices.ImplBuilder valueChangeDetectorImplBuilder

applicationSecurityManagerImplBuilder

protected static final DefaultApplicationServices.ImplBuilder applicationSecurityManagerImplBuilder

SecurityControllerManagerImplBuilder

protected static final DefaultApplicationServices.ImplBuilder SecurityControllerManagerImplBuilder

viewDescriptorRegistryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder viewDescriptorRegistryImplBuilder

pageDescriptorRegistryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder pageDescriptorRegistryImplBuilder

messageTranslatorFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder messageTranslatorFactoryImplBuilder

labeledEnumResolverImplBuilder

protected static final DefaultApplicationServices.ImplBuilder labeledEnumResolverImplBuilder

messageSourceImplBuilder

protected static final DefaultApplicationServices.ImplBuilder messageSourceImplBuilder

messageSourceAccessorImplBuilder

protected static final DefaultApplicationServices.ImplBuilder messageSourceAccessorImplBuilder

applicationWindowFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder applicationWindowFactoryImplBuilder

applicationPageFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder applicationPageFactoryImplBuilder

pageComponentPaneFactoryImplBuilder

protected static final DefaultApplicationServices.ImplBuilder pageComponentPaneFactoryImplBuilder
Constructor Detail

DefaultApplicationServices

public DefaultApplicationServices()
Default Constructor.


DefaultApplicationServices

public DefaultApplicationServices(ApplicationContext applicationContext)
Constuct using the given application context.

Parameters:
applicationContext - to use for locating named services (beans)
Method Detail

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
Set the application context. We are ApplicationContextAware so this will happen automatically if we are defined in the context. If not, then this method should be called directly.

Specified by:
setApplicationContext in interface ApplicationContextAware

getApplicationContext

public ApplicationContext getApplicationContext()
Returns:
application context

getService

public Object getService(Class serviceType)
Get a service of the indicated type. If no service definition for the requested type is found in the application context, then a reasonable default implementation will be created.

Specified by:
getService in interface ApplicationServices
Parameters:
serviceType - Type of service being requested
Returns:
Service instance
Throws:
ServiceNotFoundException - if the service is not found and no suitable default implementation is available.

containsService

public boolean containsService(Class serviceType)
Description copied from interface: ApplicationServices
Determine if a service of the requested type is available.

Specified by:
containsService in interface ApplicationServices
Parameters:
serviceType - Type of service to locate
Returns:
true if service is available, false if not

setRegistryEntries

public void setRegistryEntries(Map entryMap)
Add entries to the service registry. This is typically called from a bean definition in the application context. The entryMap parameter must be a map with keys that are either class instances (the serviceType) or the String name of the class and values that are the implementation to use for that service or an idref to a bean that is the implementation (passed as a String).

Parameters:
entryMap - Map of entries

setApplicationObjectConfigurer

public void setApplicationObjectConfigurer(ApplicationObjectConfigurer applicationObjectConfigurer)
Set the application object configurer service implementation.

Parameters:
applicationObjectConfigurer -

setApplicationObjectConfigurerId

public void setApplicationObjectConfigurerId(String applicationObjectConfigurerId)
Set the application object configurer service implementation bean id

Parameters:
applicationObjectConfigurerId - bean id

setApplicationSecurityManager

public void setApplicationSecurityManager(ApplicationSecurityManager applicationSecurityManager)
Set the application security manager service implementation.

Parameters:
applicationSecurityManager - instance to use

setApplicationSecurityManagerId

public void setApplicationSecurityManagerId(String applicationSecurityManagerId)
Set the application security manager service implementation bean id

Parameters:
applicationSecurityManagerId - bean id

setApplicationWindowFactory

public void setApplicationWindowFactory(ApplicationWindowFactory factory)
Set the ApplicationWindow factory service implementation

Parameters:
factory -

setApplicationWindowFactoryId

public void setApplicationWindowFactoryId(String factoryId)
Set the ApplicationWindow factory service implementation bean id

Parameters:
factoryId - bean id

setApplicationPageFactory

public void setApplicationPageFactory(ApplicationPageFactory factory)
Set the ApplicationPage factory service implementation

Parameters:
factory -

setApplicationPageFactoryId

public void setApplicationPageFactoryId(String factoryId)
Set the ApplicationPage factory service implementation bean id

Parameters:
factoryId - bean id

setPageComponentPaneFactory

public void setPageComponentPaneFactory(PageComponentPaneFactory factory)
Set the PageComponentPane factory service implementation bean

Parameters:
factory - bean id

setPageComponentPaneFactoryId

public void setPageComponentPaneFactoryId(String factoryId)
Set the PageComponentPane factory service implementation bean id

Parameters:
factoryId - bean id

setBinderSelectionStrategy

public void setBinderSelectionStrategy(BinderSelectionStrategy binderSelectionStrategy)
Set the binder selection strategy service implementation

Parameters:
binderSelectionStrategy -

setBinderSelectionStrategyId

public void setBinderSelectionStrategyId(String binderSelectionStrategyId)
Set the binder selection strategy service implementation bean id

Parameters:
binderSelectionStrategyId - bean id

setBindingFactoryProvider

public void setBindingFactoryProvider(BindingFactoryProvider bindingFactoryProvider)
Set the binding factory provider service implementation

Parameters:
bindingFactoryProvider -

setBindingFactoryProviderId

public void setBindingFactoryProviderId(String bindingFactoryProviderId)
Set the binding factory provider service implementation bean id

Parameters:
bindingFactoryProviderId - bean id

setCommandServices

public void setCommandServices(CommandServices commandServices)
Set the command services service implementation

Parameters:
commandServices -

setCommandServicesId

public void setCommandServicesId(String commandServicesId)
Set the command services service implementation bean id

Parameters:
commandServicesId - bean id

setCommandConfigurer

public void setCommandConfigurer(CommandConfigurer commandConfigurer)
Set the command configurer service implementation

Parameters:
commandConfigurer -

setCommandConfigurerId

public void setCommandConfigurerId(String commandConfigurerId)
Set the command configurer service implementation bean id

Parameters:
commandConfigurerId - bean id

setButtonFactory

public void setButtonFactory(ButtonFactory buttonFactory)
Set the button factory service implementation

Parameters:
buttonFactory -

setButtonFactoryId

public void setButtonFactoryId(String buttonFactoryId)
Set the button factory service implementation bean id

Parameters:
buttonFactoryId - bean id

setMenuFactory

public void setMenuFactory(MenuFactory menuFactory)
Set the menu factory service implementation

Parameters:
menuFactory -

setMenuFactoryId

public void setMenuFactoryId(String menuFactoryId)
Set the menu factory service implementation bean id

Parameters:
menuFactoryId - bean id

setComponentFactory

public void setComponentFactory(ComponentFactory componentFactory)
Set the component factory service implementation

Parameters:
componentFactory -

setComponentFactoryId

public void setComponentFactoryId(String componentFactoryId)
Set the component factory service implementation bean id

Parameters:
componentFactoryId - bean id

setConversionService

public void setConversionService(org.springframework.binding.convert.ConversionService conversionService)
Set the conversion service service implementation

Parameters:
conversionService -

setConversionServiceId

public void setConversionServiceId(String conversionServiceId)
Set the conversion service service implementation bean id

Parameters:
conversionServiceId - bean id

setFormComponentInterceptorFactory

public void setFormComponentInterceptorFactory(FormComponentInterceptorFactory formComponentInterceptorFactory)
Set the form component interceptor factory service implementation

Parameters:
formComponentInterceptorFactory -

setFormComponentInterceptorFactoryId

public void setFormComponentInterceptorFactoryId(String formComponentInterceptorFactoryId)
Set the form component interceptor factory service implementation bean id

Parameters:
formComponentInterceptorFactoryId - bean id

setFieldFaceSource

public void setFieldFaceSource(FieldFaceSource fieldFaceSource)
Set the field face descriptor source service implementation

Parameters:
fieldFaceSource -

setFieldFaceSourceId

public void setFieldFaceSourceId(String fieldFaceSourceId)
Set the field face descriptor source service implementation bean id

Parameters:
fieldFaceSourceId - bean id

setIconSource

public void setIconSource(IconSource iconSource)
Set the icon source service implementation

Parameters:
iconSource -

setIconSourceId

public void setIconSourceId(String iconSourceId)
Set the icon source service implementation bean id

Parameters:
iconSourceId - bean id

setImageSource

public void setImageSource(ImageSource imageSource)
Set the image source service implementation

Parameters:
imageSource -

setImageSourceId

public void setImageSourceId(String imageSourceId)
Set the image source service implementation bean id

Parameters:
imageSourceId - bean id

setLabeledEnumResolver

public void setLabeledEnumResolver(LabeledEnumResolver labeledEnumResolver)
Set the labeled enum resolver service implementation

Parameters:
labeledEnumResolver -

setLabeledEnumResolverId

public void setLabeledEnumResolverId(String labeledEnumResolverId)
Set the labeled enum resolver service implementation bean id

Parameters:
labeledEnumResolverId - bean id

setMessageSource

public void setMessageSource(MessageSource messageSource)
Set the message source service implementation

Parameters:
messageSource -

setMessageSourceId

public void setMessageSourceId(String messageSourceId)
Set the message source service implementation bean id

Parameters:
messageSourceId - bean id

setMessageSourceAccesor

public void setMessageSourceAccesor(MessageSourceAccessor messageSourceAccessor)
Set the message source accessor service implementation

Parameters:
messageSourceAccessor -

setMessageSourceAccesorId

public void setMessageSourceAccesorId(String messageSourceAccessorId)
Set the message source accessor service implementation bean id

Parameters:
messageSourceAccessorId - bean id

setRulesSource

public void setRulesSource(RulesSource rulesSource)
Set the rules source service implementation

Parameters:
rulesSource -

setRulesSourceId

public void setRulesSourceId(String rulesSourceId)
Set the rules source service implementation bean id

Parameters:
rulesSourceId - bean id

setSecurityControllerManager

public void setSecurityControllerManager(SecurityControllerManager securityControllerManager)
Set the security controller manager service implementation

Parameters:
securityControllerManager - instance to use

setSecurityControllerManagerId

public void setSecurityControllerManagerId(String securityControllerManagerId)
Set the security controller manager service implementation bean id

Parameters:
securityControllerManagerId - bean id

setValueChangeDetector

public void setValueChangeDetector(ValueChangeDetector valueChangeDetector)
Set the value change detector service imlpementation.

Parameters:
valueChangeDetector - instance to use

setValueChangeDetectorId

public void setValueChangeDetectorId(String valueChangeDetectorId)
Set the value change detector service imlpementation bean id

Parameters:
valueChangeDetectorId - bean id

setViewDescriptorRegistry

public void setViewDescriptorRegistry(ViewDescriptorRegistry viewDescriptorRegistry)
Set the view descriptor registry service implementation

Parameters:
viewDescriptorRegistry -

setPageDescriptorRegistry

public void setPageDescriptorRegistry(PageDescriptorRegistry pageDescriptorRegistry)
Set the page descriptor registry service implementation

Parameters:
pageDescriptorRegistry -

setMessageTranslatorFactory

public void setMessageTranslatorFactory(MessageTranslatorFactory messageTranslatorFactory)
Set the message translator registry service implementation

Parameters:
messageTranslatorFactory -

setMessageTranslatorFactoryId

public void setMessageTranslatorFactoryId(String messageTranslatorFactoryId)
Set the message translator registry service implementation bean id

Parameters:
messageTranslatorFactory -

setViewDescriptorRegistryId

public void setViewDescriptorRegistryId(String viewDescriptorRegistryId)
Set the view descriptor registry service implementation bean id

Parameters:
viewDescriptorRegistryId - bean id

setPageDescriptorRegistryId

public void setPageDescriptorRegistryId(String pageDescriptorRegistryId)
Set the page descriptor registry service implementation bean id

Parameters:
pageDescriptorRegistryId - bean id

getServiceForClassType

protected Object getServiceForClassType(Class serviceType)
Get the implementation of a service by using the decapitalized shortname of the serviceType class name.

Parameters:
serviceType - the service class to lookup the bean definition
Returns:
the found service implementation if a bean definition can be found and it implements the required service type, otherwise null
See Also:
ClassUtils.getShortNameAsProperty(Class)

getDefaultImplementation

protected Object getDefaultImplementation(Class serviceType)
Get the default implementation of a service according to the service type. If no default implementation is available, then a null is returned.

Parameters:
serviceType - Type of service requested
Returns:
Default service implementation, or null if none defined

containsServiceForClassType

protected boolean containsServiceForClassType(Class serviceType)
Tests if the application context contains a bean definition by using the decapitalized shortname of the serviceType class name

Parameters:
serviceType - the service class to lookup the bean definition
Returns:
true if a bean definition is found in the current application context, otherwise false
See Also:
ClassUtils.getShortNameAsProperty(Class)

containsDefaultImplementation

protected boolean containsDefaultImplementation(Class serviceType)
Tests if a default implementation for the requested service type is available

Parameters:
serviceType - the requested service type
Returns:
true if a default implementation is available otherwise false.


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.