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 CoreContext
. The context is created on the firstgetObject()
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 Constructor Description SingletonContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
org.craftercms.core.service.Context
getObject()
void
setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService)
void
setEnableCache(boolean enableCache)
void
setLocalRepoUrl(String localRepoUrl)
void
setMaxAllowedItemsInCache(int maxAllowedItemsInCache)
void
setTargetId(String targetId)
void
setXmlMergingEnabled(boolean xmlMergingEnabled)
-
-
-
Method Detail
-
setTargetId
public void setTargetId(String targetId)
-
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 interfaceorg.springframework.beans.factory.ObjectFactory<org.craftercms.core.service.Context>
- Throws:
org.springframework.beans.BeansException
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
-