Package org.apache.uima.fit.spring
Class SpringContextResourceManager
java.lang.Object
org.apache.uima.resource.impl.ResourceManager_impl
org.apache.uima.fit.spring.SpringContextResourceManager
- All Implemented Interfaces:
ResourceManager
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class SpringContextResourceManager
extends ResourceManager_impl
implements org.springframework.context.ApplicationContextAware
Allowing UIMA components to access beans from a
context
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.uima.resource.impl.ResourceManager_impl
ResourceManager_impl.ResourceRegistration
-
Field Summary
Fields inherited from class org.apache.uima.resource.impl.ResourceManager_impl
EMPTY_RESOURCE_CLASS, LOG_RESOURCE_BUNDLE, mCasManager, mInternalParameterizedResourceImplClassMap, mInternalResourceRegistrationMap, mParameterizedResourceImplClassMap, mParameterizedResourceInstanceMap, mResourceMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initializeExternalResources
(ResourceManagerConfiguration aConfiguration, String aQualifiedContextName, Map<String, Object> aAdditionalParams) Initializes all external resources declared in a ResourceCreationSpecifier.boolean
void
setApplicationContext
(org.springframework.context.ApplicationContext aApplicationContext) void
setAutowireEnabled
(boolean aAutowireEnabled) Methods inherited from class org.apache.uima.resource.impl.ResourceManager_impl
copy, destroy, getCasManager, getDataPath, getDataPathElements, getDataPathUrls, getExtensionClassLoader, getExternalResources, getImportCache, getImportUrlsCache, getRelativePathResolver, getResource, getResource, getResourceAsStream, getResourceAsStream, getResourceClass, getResourceURL, getResourceURL, loadUserClass, loadUserClass, loadUserClassOrThrow, resolveAndValidateResourceDependencies, resolveRelativePath, setCasManager, setDataPath, setDataPathElements, setDataPathElements, setDataPathUrls, setExtensionClassLoaderImpl, setExtensionClassPath, setExtensionClassPath, setExtensionClassPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.uima.resource.ResourceManager
setExtensionClassLoader
-
Constructor Details
-
SpringContextResourceManager
public SpringContextResourceManager()
-
-
Method Details
-
initializeExternalResources
public void initializeExternalResources(ResourceManagerConfiguration aConfiguration, String aQualifiedContextName, Map<String, Object> aAdditionalParams) throws ResourceInitializationExceptionDescription copied from interface:ResourceManager
Initializes all external resources declared in a ResourceCreationSpecifier. Multi-threading: may be called on multiple threads. Initialization should be done once, on the first call External resources have a Container class representing the resource, which are instances of Resource. This may act as the implementation class, or they may also have a separately specified implementation class, which may or may not implement Resource. As part of the initialization of the Container class, by default, External Resource Bindings are processed to hook them up with defined External Resources, using the default implementation of resolveAndValidateResourceDependencies.- Specified by:
initializeExternalResources
in interfaceResourceManager
- Overrides:
initializeExternalResources
in classResourceManager_impl
- Parameters:
aConfiguration
- the ResourceManagerConfiguration containing resource declarations and bindingsaQualifiedContextName
- qualified name of UimaContext for the component (e.g. analysis engine) that is declaring these external resourcesaAdditionalParams
- additional parameters to be passed to resource initialize methods- Throws:
ResourceInitializationException
- if an initialization failure occurs
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext aApplicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
setAutowireEnabled
public void setAutowireEnabled(boolean aAutowireEnabled) -
isAutowireEnabled
public boolean isAutowireEnabled()
-