|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.spring.LocalCompassBean
public class LocalCompassBean
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
LocalCompassBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
protected ClassLoader |
getClassLoader()
|
Object |
getObject()
|
Class |
getObjectType()
|
boolean |
isSingleton()
|
protected Compass |
newCompass(CompassConfiguration config)
|
protected CompassConfiguration |
newConfiguration()
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setBeanClassLoader(ClassLoader classLoader)
|
void |
setBeanName(String beanName)
|
void |
setClassMappings(String[] classMappings)
Sets the fully qualified class names for mappings. |
void |
setCompassConfiguration(CompassConfiguration config)
|
void |
setCompassSettings(Properties compassSettings)
|
void |
setConfigLocation(org.springframework.core.io.Resource configLocation)
Set the location of the Compass XML config file, for example as classpath resource "classpath:compass.cfg.xml". |
void |
setConfigLocations(org.springframework.core.io.Resource[] configLocations)
Set the location of the Compass XML config file, for example as classpath resource "classpath:compass.cfg.xml". |
void |
setConnection(org.springframework.core.io.Resource connection)
Sets an optional connection based on Spring Resource
abstraction. |
void |
setConvertersByName(Map<String,Converter> convertersByName)
Sets a map of global converters to be registered with compass. |
void |
setDataSource(DataSource dataSource)
Sets a DataSource to be used when the index is stored within a database. |
void |
setMappingResolvers(InputStreamMappingResolver[] mappingResolvers)
Sets the mapping resolvers the resolved Compass mapping definitions. |
void |
setMappingScan(String basePackage)
|
void |
setPostProcessor(LocalCompassBeanPostProcessor postProcessor)
Allows to register a post processor for the Compass configuration. |
void |
setResourceDirectoryLocations(org.springframework.core.io.Resource[] resourceDirectoryLocations)
Set locations of directories that contain Compass mapping resources, like "WEB-INF/mappings". |
void |
setResourceJarLocations(org.springframework.core.io.Resource[] resourceJarLocations)
Set locations of jar files that contain Compass resources, like "WEB-INF/lib/example.jar". |
void |
setResourceLocations(org.springframework.core.io.Resource[] resourceLocations)
Set locations of Compass resource files (mapping and common metadata), for example as classpath resource "classpath:example.cpm.xml". |
void |
setSettings(Map<String,Object> settings)
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Sets Spring PlatformTransactionManager to be used with compass. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public LocalCompassBean()
| Method Detail |
|---|
public void setPostProcessor(LocalCompassBeanPostProcessor postProcessor)
public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAware
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setConnection(org.springframework.core.io.Resource connection)
Resource
abstraction. Will be used if none is set as part of other possible
configuration of Compass connection.
Will use Resource#getFile in order to get the absolute
path.
public void setConfigLocation(org.springframework.core.io.Resource configLocation)
public void setConfigLocations(org.springframework.core.io.Resource[] configLocations)
public void setMappingScan(String basePackage)
CompassConfiguration.addScan(String)public void setCompassSettings(Properties compassSettings)
public void setSettings(Map<String,Object> settings)
public void setResourceLocations(org.springframework.core.io.Resource[] resourceLocations)
public void setResourceJarLocations(org.springframework.core.io.Resource[] resourceJarLocations)
public void setResourceDirectoryLocations(org.springframework.core.io.Resource[] resourceDirectoryLocations)
public void setClassMappings(String[] classMappings)
public void setMappingResolvers(InputStreamMappingResolver[] mappingResolvers)
public void setDataSource(DataSource dataSource)
DataSource to be used when the index is stored within a database.
The data source must be used with ExternalDataSourceProvider
for externally configured data sources (such is the case some of the time with spring). If set, Compass data source provider
does not have to be set, since it will automatically default to ExternalDataSourceProvider. If the
compass data source provider is set as a compass setting, it will be used.
Note, that it will be automatically wrapped with Spring's TransactionAwareDataSourceProxy.
Also note that setting the data source is not enough to configure Compass to store the index
within the database, the Compass connection string should also be set to jdbc://.
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
PlatformTransactionManager to be used with compass. If using
SpringSyncTransactionFactory, it must be set.
public void setConvertersByName(Map<String,Converter> convertersByName)
public void setCompassConfiguration(CompassConfiguration config)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionprotected CompassConfiguration newConfiguration()
protected Compass newCompass(CompassConfiguration config)
throws CompassException
CompassException
public Object getObject()
throws Exception
getObject in interface org.springframework.beans.factory.FactoryBeanExceptionpublic Class getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionprotected ClassLoader getClassLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||