public class Configuration
extends java.lang.Object
Configuration
allows the application to specify
properties to be used when creating a SessionContext
instance.
Configuration
is meant only as an initialization-time object.
Modifier and Type | Field and Description |
---|---|
static BeanMode |
DEFAULT_BEAN_MODE
The default
BeanMode for the mapper. |
static CacheScope |
DEFAULT_CACHE_SCOPE
The default cache scope.
|
static int |
DEFAULT_CONCEPT_CACHE_SIZE
The default size of the cache.
|
static PersistenceMode |
DEFAULT_PERSISTENCE_MODE
The default
PersistenceMode for the mapper. |
static java.lang.String |
DEFAULT_PROP_AUTO_REREAD_OUTDATED_OBJECTS_VALUE
The default value for the
PROP_AUTO_REREAD_OUTDATED_OBJECTS property. |
static java.lang.String |
DEFAULT_PROP_CURRENT_BEANPOOL_CONTEXT_IMPL_VALUE
Deprecated.
|
static java.lang.String |
DEFAULT_PROP_SEARCH_LOCALE_VALUE
The default value for the
PROP_SEARCH_LOCALE property. |
static java.lang.String |
PROP_AUTO_REREAD_OUTDATED_OBJECTS
Property name used to configure if the system should automatically try to
re-read outdated registry beans.
|
static java.lang.String |
PROP_CURRENT_BEANPOOL_CONTEXT_IMPL
Deprecated.
|
static java.lang.String |
PROP_SEARCH_LOCALE
Property name used for determining localized string values.
|
Constructor and Description |
---|
Configuration()
Creates a new instance.
|
Configuration(RegistryProvider registryProvider)
Creates a new instance and specifies the registry provider to use.
|
Modifier and Type | Method and Description |
---|---|
void |
addBeanType(java.lang.Class<? extends RegistryBean> persistentClass)
Adds the given bean type to the configuration.
|
BeanMode |
getBeanMode()
Retrieves the
BeanMode to be used. |
CacheScope |
getCacheScope()
Returns the cache scope.
|
int |
getMaxConceptCacheSize()
Returns the maximum cache size.
|
RegistryObjectModel |
getModel()
Returns the registry object model.
|
PersistenceMode |
getPersistenceMode()
Retrieves the
PersistenceMode . |
java.lang.String |
getProperty(java.lang.String propName)
Gets the property value.
|
RegistryProvider |
getRegistryProvider()
Retrieves the
RegistryProvider to be used. |
void |
setBeanMode(BeanMode mode)
Sets the
BeanMode to be used. |
void |
setCacheScope(CacheScope cacheScope)
Sets the cache scope.
|
void |
setMaxConceptCacheSize(int maxConceptCacheSize)
Sets the maximum cache size.
|
void |
setPersistenceMode(PersistenceMode persistenceMode)
Sets the
PersistenceMode . |
void |
setProperty(java.lang.String propName,
java.lang.String propValue)
Sets the given property.
|
void |
setRegistryProvider(RegistryProvider registryProvider)
Sets the registry provider.
|
public static final BeanMode DEFAULT_BEAN_MODE
BeanMode
for the mapper.public static final PersistenceMode DEFAULT_PERSISTENCE_MODE
PersistenceMode
for the mapper.public static final java.lang.String DEFAULT_PROP_SEARCH_LOCALE_VALUE
PROP_SEARCH_LOCALE
property.public static final java.lang.String DEFAULT_PROP_AUTO_REREAD_OUTDATED_OBJECTS_VALUE
PROP_AUTO_REREAD_OUTDATED_OBJECTS
property.public static final int DEFAULT_CONCEPT_CACHE_SIZE
public static final CacheScope DEFAULT_CACHE_SCOPE
public static final java.lang.String PROP_SEARCH_LOCALE
public static final java.lang.String PROP_AUTO_REREAD_OUTDATED_OBJECTS
ObjectOutdatedException
.public static final java.lang.String PROP_CURRENT_BEANPOOL_CONTEXT_IMPL
public static final java.lang.String DEFAULT_PROP_CURRENT_BEANPOOL_CONTEXT_IMPL_VALUE
PROP_CURRENT_BEANPOOL_CONTEXT_IMPL
property.public Configuration()
public Configuration(RegistryProvider registryProvider)
registryProvider
- the registry provider instance.public void setProperty(java.lang.String propName, java.lang.String propValue)
propName
- Use the constants in the Configuration
class.propValue
- the value for the property.public java.lang.String getProperty(java.lang.String propName)
propName
- the property name to identify in the list of properties.public void setBeanMode(BeanMode mode)
BeanMode
to be used.
Default is BeanMode.BACKED
mode
- the BeanMode
instance.public PersistenceMode getPersistenceMode()
PersistenceMode
.PersistenceMode
instance of type PersistenceMode
.public void setPersistenceMode(PersistenceMode persistenceMode)
PersistenceMode
.persistenceMode
- the PersistenceMode
instance.public BeanMode getBeanMode()
BeanMode
to be used.BeanMode
instance.public RegistryProvider getRegistryProvider()
RegistryProvider
to be used.RegistryProvider
instance.Spublic void setRegistryProvider(RegistryProvider registryProvider)
registryProvider
- the registry provider instance.public int getMaxConceptCacheSize()
public void setMaxConceptCacheSize(int maxConceptCacheSize)
maxConceptCacheSize
- the value of cache size.public CacheScope getCacheScope()
CacheScope
public void setCacheScope(CacheScope cacheScope)
cacheScope
- the cache scope object.public void addBeanType(java.lang.Class<? extends RegistryBean> persistentClass) throws CSAppFrameworkException
persistentClass
- Annotated java bean class containing mapping information.CSAppFrameworkException
- if an internal error occurs.public RegistryObjectModel getModel()