Class TempDirProcessor

java.lang.Object
io.jmix.core.impl.TempDirProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered

public class TempDirProcessor extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.PriorityOrdered
Checks on startup that the jmix.core.temp-dir directory can be written to.

If the directory is not writable and the property has the default value from the core module, the property is replaced with a directory under java.io.tmpdir. If the property is set explicitly, it is kept as is and a warning is logged.

  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    protected boolean
    Returns true if the property value comes from the core module's module.properties, that is, the application does not set it.
    protected boolean
     
    void
    postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
     
    void
    setEnvironment(org.springframework.core.env.Environment environment)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TempDirProcessor

      public TempDirProcessor()
  • Method Details

    • postProcessBeanFactory

      @NullMarked public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • isWritable

      @NullMarked protected boolean isWritable(String dir)
    • isDefaultValue

      @NullMarked protected boolean isDefaultValue()
      Returns true if the property value comes from the core module's module.properties, that is, the application does not set it.
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setEnvironment

      @NullMarked public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware