| java.lang.Object org.compass.spring.LocalCompassBean
LocalCompassBean | public class LocalCompassBean implements FactoryBean,InitializingBean,DisposableBean,BeanNameAware(Code) | | author: kimchy |
Field Summary | |
final protected static Log | log |
log | final protected static Log log(Code) | | |
isSingleton | public boolean isSingleton()(Code) | | |
setClassMappings | public void setClassMappings(String[] classMappings)(Code) | | Sets the fully qualified class names for mappings. Useful when using annotations
for example. Will also try to load the matching "[Class].cpm.xml" file.
|
setCompassSettings | public void setCompassSettings(Properties compassSettings)(Code) | | |
setConfigLocation | public void setConfigLocation(Resource configLocation)(Code) | | Set the location of the Compass XML config file, for example as classpath
resource "classpath:compass.cfg.xml".
Note: Can be omitted when all necessary properties and mapping resources
are specified locally via this bean.
|
setConfigLocations | public void setConfigLocations(Resource[] configLocations)(Code) | | Set the location of the Compass XML config file, for example as classpath
resource "classpath:compass.cfg.xml".
Note: Can be omitted when all necessary properties and mapping resources
are specified locally via this bean.
|
setConnection | public void setConnection(Resource connection)(Code) | | Sets an optional connection based on Spring 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.
|
setConvertersByName | public void setConvertersByName(Map convertersByName)(Code) | | Sets a map of global converters to be registered with compass. The map key will be
the name that the converter will be registered against, and the value should be the
Converter itself (natuarally configured using spring DI).
|
setDataSource | public void setDataSource(DataSource dataSource)(Code) | | Sets a DataSource to be used when the index is stored within a database.
The data source must be used with
org.compass.core.lucene.engine.store.jdbc.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 if not
already wrapped by one.
org.springframework.jdbc.datasource.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:// .
|
setMappingResolvers | public void setMappingResolvers(InputStreamMappingResolver[] mappingResolvers)(Code) | | Sets the mapping resolvers the resolved Compass mapping definitions.
|
setPostProcessor | public void setPostProcessor(LocalCompassBeanPostProcessor postProcessor)(Code) | | Allows to register a post processor for the Compass configuration.
Parameters: postProcessor - |
setResourceDirectoryLocations | public void setResourceDirectoryLocations(Resource[] resourceDirectoryLocations)(Code) | | Set locations of directories that contain Compass mapping resources, like
"WEB-INF/mappings".
Can be used to add to mappings from a Compass XML config file, or to
specify all mappings locally.
|
setResourceJarLocations | public void setResourceJarLocations(Resource[] resourceJarLocations)(Code) | | Set locations of jar files that contain Compass resources, like
"WEB-INF/lib/example.jar".
Can be used to add to mappings from a Compass XML config file, or to
specify all mappings locally.
|
setResourceLocations | public void setResourceLocations(Resource[] resourceLocations)(Code) | | Set locations of Compass resource files (mapping and common metadata),
for example as classpath resource "classpath:example.cpm.xml". Supports
any resource location via Spring's resource abstraction, for example
relative paths like "WEB-INF/mappings/example.hbm.xml" when running in an
application context.
Can be used to add to mappings from a Compass XML config file, or to
specify all mappings locally.
|
|
|