Class ContextManagerImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.core.ContextManagerImpl
-
- All Implemented Interfaces:
ContextManager
public class ContextManagerImpl extends Object implements ContextManager
Default implementation ofContextManager
- Since:
- 4.0.0
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected org.craftercms.core.service.ContentStoreService
contentStoreService
protected Map<String,org.craftercms.core.service.Context>
contexts
protected StudioConfiguration
studioConfiguration
static String
TAG
-
Constructor Summary
Constructors Constructor Description ContextManagerImpl(StudioConfiguration studioConfiguration, org.craftercms.core.service.ContentStoreService contentStoreService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroyContext(String siteId)
Destroys the context for the given siteorg.craftercms.core.service.Context
getContext(String siteId)
Returns the context for the given site, creating it if needed
-
-
-
Field Detail
-
TAG
public static final String TAG
-
studioConfiguration
protected StudioConfiguration studioConfiguration
-
contentStoreService
protected org.craftercms.core.service.ContentStoreService contentStoreService
-
-
Constructor Detail
-
ContextManagerImpl
@ConstructorProperties({"studioConfiguration","contentStoreService"}) public ContextManagerImpl(StudioConfiguration studioConfiguration, org.craftercms.core.service.ContentStoreService contentStoreService)
-
-
Method Detail
-
getContext
public org.craftercms.core.service.Context getContext(String siteId)
Description copied from interface:ContextManager
Returns the context for the given site, creating it if needed- Specified by:
getContext
in interfaceContextManager
- Parameters:
siteId
- the id of the site- Returns:
- the context
-
destroyContext
public void destroyContext(String siteId)
Description copied from interface:ContextManager
Destroys the context for the given site- Specified by:
destroyContext
in interfaceContextManager
- Parameters:
siteId
- the id of the site
-
-