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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()org.craftercms.core.service.ContextvoidsetContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService) voidsetEnableCache(boolean enableCache) voidsetLocalRepoUrl(String localRepoUrl) voidsetMaxAllowedItemsInCache(int maxAllowedItemsInCache) voidsetSiteName(String siteName) voidsetTargetId(String targetId) voidsetXmlMergingEnabled(boolean xmlMergingEnabled)
-
Constructor Details
-
SingletonContextFactory
public SingletonContextFactory()
-
-
Method Details
-
setTargetId
-
setSiteName
-
setLocalRepoUrl
-
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:
getObjectin interfaceorg.springframework.beans.factory.ObjectFactory<org.craftercms.core.service.Context>- Throws:
org.springframework.beans.BeansException
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-