Class 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
    • Method Detail

      • readGlobalProperties

        public Map<String,​String> readGlobalProperties()
      • write

        public void write()
                   throws IOException
        Writes like the parent class but also updates the DB with the global variables values.
        Overrides:
        write in class com.logicaldoc.util.config.ContextProperties
        Throws:
        IOException
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext context)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.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 interface PayloadHandler
        Parameters:
        payload - Payload to be processed
        Returns:
        The response to the received message
        Throws:
        Exception - a generic error