Class SingletonContextFactory

java.lang.Object
org.craftercms.deployer.utils.core.SingletonContextFactory
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.ObjectFactory<org.craftercms.core.service.Context>

public class SingletonContextFactory extends Object implements org.springframework.beans.factory.ObjectFactory<org.craftercms.core.service.Context>, org.springframework.beans.factory.DisposableBean
Factory for a singleton Core Context. The context is created on the first getObject() call, and destroyed when the factory is destroyed.

This class is not thread safe and should only be called by a single deployment thread.

Author:
avasquez
  • Constructor Details

    • SingletonContextFactory

      public SingletonContextFactory()
  • Method Details

    • setTargetId

      public void setTargetId(String targetId)
    • setSiteName

      public void setSiteName(String siteName)
    • setLocalRepoUrl

      public void setLocalRepoUrl(String localRepoUrl)
    • setContentStoreService

      public void setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService)
    • setXmlMergingEnabled

      public void setXmlMergingEnabled(boolean xmlMergingEnabled)
    • setEnableCache

      public void setEnableCache(boolean enableCache)
    • setMaxAllowedItemsInCache

      public void setMaxAllowedItemsInCache(int maxAllowedItemsInCache)
    • getObject

      public org.craftercms.core.service.Context getObject() throws org.springframework.beans.BeansException
      Specified by:
      getObject in interface org.springframework.beans.factory.ObjectFactory<org.craftercms.core.service.Context>
      Throws:
      org.springframework.beans.BeansException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean