Class ScopedContextProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- com.logicaldoc.util.config.OrderedProperties
-
- com.logicaldoc.util.config.ContextProperties
-
- com.logicaldoc.enterprise.cluster.ScopedContextProperties
-
- All Implemented Interfaces:
PayloadHandler
,Serializable
,Cloneable
,Map<Object,Object>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class ScopedContextProperties extends com.logicaldoc.util.config.ContextProperties implements org.springframework.context.ApplicationContextAware, PayloadHandler
Extension of the standard ContextProperties able to give a scope(local or shared) to the config parameters. Initialize itself with the database where the shared properties are stored. Shared parameters are expected to be stored as Generics where type='conf', subtype=property name and string1=property value.- Since:
- 6.5
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScopedContextProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
handle(Payload payload)
Invoked when a new message arrives from the cluster.Map<String,String>
readGlobalProperties()
void
setApplicationContext(org.springframework.context.ApplicationContext context)
void
write()
Writes like the parent class but also updates the DB with the global variables values.-
Methods inherited from class com.logicaldoc.util.config.ContextProperties
getBoolean, getBoolean, getInt, getInt, getLong, getLong, getMaxBackups, getProperties, getPropertyWithSubstitutions, getPropertyWithSubstitutions, getString, getString, getTenantProperties, getTenantProperty, removeTenantProperties, replicateTenantSettings, setMaxBackups
-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Constructor Detail
-
ScopedContextProperties
public ScopedContextProperties() throws IOException
- Throws:
IOException
-
-
Method Detail
-
write
public void write() throws IOException
Writes like the parent class but also updates the DB with the global variables values.- Overrides:
write
in classcom.logicaldoc.util.config.ContextProperties
- Throws:
IOException
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
handle
public Object handle(Payload payload) throws Exception
Description copied from interface:PayloadHandler
Invoked when a new message arrives from the cluster.- Specified by:
handle
in interfacePayloadHandler
- Parameters:
payload
- Payload to be processed- Returns:
- The response to the received message
- Throws:
Exception
- a generic error
-
-