com.softwareag.centrasite.appl.framework
Class Configuration

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.Configuration

public class Configuration
extends java.lang.Object

An instance of Configuration allows the application to specify properties to be used when creating a SessionContext instance. Configuration is meant only as an initialization-time object.


Field Summary
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 Summary
Configuration()
          Creates a new instance.
Configuration(RegistryProvider registryProvider)
          Creates a new instance and specifies the registry provider to use.
 
Method Summary
 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()
           
 int getMaxConceptCacheSize()
           
 RegistryObjectModel getModel()
           
 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)
           
 void setMaxConceptCacheSize(int maxConceptCacheSize)
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BEAN_MODE

public static final BeanMode DEFAULT_BEAN_MODE
The default BeanMode for the mapper.


DEFAULT_PERSISTENCE_MODE

public static final PersistenceMode DEFAULT_PERSISTENCE_MODE
The default PersistenceMode for the mapper.


DEFAULT_PROP_SEARCH_LOCALE_VALUE

public static final java.lang.String DEFAULT_PROP_SEARCH_LOCALE_VALUE
The default value for the PROP_SEARCH_LOCALE property.

See Also:
Constant Field Values

DEFAULT_PROP_AUTO_REREAD_OUTDATED_OBJECTS_VALUE

public static final java.lang.String DEFAULT_PROP_AUTO_REREAD_OUTDATED_OBJECTS_VALUE
The default value for the PROP_AUTO_REREAD_OUTDATED_OBJECTS property.

See Also:
Constant Field Values

DEFAULT_CONCEPT_CACHE_SIZE

public static final int DEFAULT_CONCEPT_CACHE_SIZE
The default size of the cache.

See Also:
Constant Field Values

DEFAULT_CACHE_SCOPE

public static final CacheScope DEFAULT_CACHE_SCOPE
The default cache scope.


PROP_SEARCH_LOCALE

public static final java.lang.String PROP_SEARCH_LOCALE
Property name used for determining localized string values. Possible values for this property are "true" and "false". If set to "true" then in case of missing value for the current locale the localized strings will be retrieved based on first present localized value.

See Also:
Constant Field Values

PROP_AUTO_REREAD_OUTDATED_OBJECTS

public static final 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. Possible values for this property are "true" and "false". If set to "true" then when an outdated object is modified by the system it will automatically re-read it from the registry before applying any changes. Otherwise the user will receive an ObjectOutdatedException.

See Also:
Constant Field Values

PROP_CURRENT_BEANPOOL_CONTEXT_IMPL

public static final java.lang.String PROP_CURRENT_BEANPOOL_CONTEXT_IMPL
Deprecated. 
Property name used to configure the current BeanPool context to be used by the runtime module.

See Also:
Constant Field Values

DEFAULT_PROP_CURRENT_BEANPOOL_CONTEXT_IMPL_VALUE

public static final java.lang.String DEFAULT_PROP_CURRENT_BEANPOOL_CONTEXT_IMPL_VALUE
Deprecated. 
The default value for the PROP_CURRENT_BEANPOOL_CONTEXT_IMPL property.

See Also:
Constant Field Values
Constructor Detail

Configuration

public Configuration()
Creates a new instance.


Configuration

public Configuration(RegistryProvider registryProvider)
Creates a new instance and specifies the registry provider to use.

Parameters:
registryProvider -
Method Detail

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.String propValue)
Sets the given property.

Parameters:
propName - Use the constants in the Configuration class.
propValue -

getProperty

public java.lang.String getProperty(java.lang.String propName)
Gets the property value.

Parameters:
propName -

setBeanMode

public void setBeanMode(BeanMode mode)
Sets the BeanMode to be used. Default is BeanMode.BACKED

Parameters:
mode -

getPersistenceMode

public PersistenceMode getPersistenceMode()
Retrieves the PersistenceMode

Returns:
PersistenceMode

setPersistenceMode

public void setPersistenceMode(PersistenceMode persistenceMode)
Sets the PersistenceMode

Parameters:
persistenceMode -

getBeanMode

public BeanMode getBeanMode()
Retrieves the BeanMode to be used.


getRegistryProvider

public RegistryProvider getRegistryProvider()
Retrieves the RegistryProvider to be used.


setRegistryProvider

public void setRegistryProvider(RegistryProvider registryProvider)
Sets the registry provider.

Parameters:
registryProvider -

getMaxConceptCacheSize

public int getMaxConceptCacheSize()
Returns:
int

setMaxConceptCacheSize

public void setMaxConceptCacheSize(int maxConceptCacheSize)
Parameters:
maxConceptCacheSize -

getCacheScope

public CacheScope getCacheScope()
Returns:
CacheScope

setCacheScope

public void setCacheScope(CacheScope cacheScope)
Parameters:
cacheScope -

addBeanType

public void addBeanType(java.lang.Class<? extends RegistryBean> persistentClass)
                 throws CSAppFrameworkException
Adds the given bean type to the configuration. If already added does nothing.

Parameters:
persistentClass -
Throws:
CSAppFrameworkException

getModel

public RegistryObjectModel getModel()
Returns:
the model