Class DefaultCMSVersionSessionContextProvider
java.lang.Object
de.hybris.platform.cms2.version.service.impl.DefaultCMSVersionSessionContextProvider
- All Implemented Interfaces:
CMSVersionSessionContextProvider
public class DefaultCMSVersionSessionContextProvider
extends Object
implements CMSVersionSessionContextProvider
Default implementation of
CMSVersionSessionContextProvider-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContentSlotForPageToCache(ContentSlotForPageModel contentSlotForPageModel) Add a content slot for page to cache.voidaddGeneratedItemToCache(ItemModel itemModel, CMSVersionModel versionModel) Add anItemModelto a cache of generated items and useCMSVersionModelas a key.voidaddPageVersionedInTransactionToCache(Optional<AbstractPageModel> abstractPageModel) Adds theAbstractPageModelassociated to the transaction being processed to the cache.voidaddUnsavedVersionedItemToCache(CMSVersionModel versionModel) Add anItemModelto a cache of unsaved but versioned items and useCMSVersionModelas a key.Return all cached content slots for page from cache.Return all generated cachedItemModel.Return all cached unsaved versioned itemsCMSItemData.protected org.springframework.beans.factory.ObjectFactory<CMSItemData>Returns theAbstractPageModelassociated to the transaction being processed from the cache.protected SessionCachedContextProvidervoidbooleanChecks if theAbstractPageModelassociated to the transaction being processed has been added to the cache.voidRemove allContentSlotForPageModelfrom cache.voidRemove all generated items from cache.voidRemoves all cached unsaved versioned items.voidremoveContentSlotForPageFromCache(ContentSlotForPageModel contentSlotForPageModel) Remove aContentSlotForPageModelfrom cache.voidremoveGeneratedItemFromCache(CMSVersionModel versionModel) Remove generated cached item based onCMSVersionModel.voidRemoves theAbstractPageModelassociated to the transaction being processed from the cache.voidsetCmsItemDataFactory(org.springframework.beans.factory.ObjectFactory<CMSItemData> cmsItemDataFactory) voidsetSessionCachedContextProvider(SessionCachedContextProvider sessionCachedContextProvider)
-
Constructor Details
-
DefaultCMSVersionSessionContextProvider
public DefaultCMSVersionSessionContextProvider()
-
-
Method Details
-
initCache
public void initCache()- Specified by:
initCachein interfaceCMSVersionSessionContextProvider
-
addGeneratedItemToCache
Description copied from interface:CMSVersionSessionContextProviderAdd anItemModelto a cache of generated items and useCMSVersionModelas a key.- Specified by:
addGeneratedItemToCachein interfaceCMSVersionSessionContextProvider- Parameters:
itemModel- theItemModelto cacheversionModel- theCMSVersionModelthat represents a key.
-
getAllGeneratedItemsFromCached
Description copied from interface:CMSVersionSessionContextProviderReturn all generated cachedItemModel.- Specified by:
getAllGeneratedItemsFromCachedin interfaceCMSVersionSessionContextProvider- Returns:
- the
Mapof key (CMSVersionModel) and value (ItemModel)
-
removeGeneratedItemFromCache
Description copied from interface:CMSVersionSessionContextProviderRemove generated cached item based onCMSVersionModel.- Specified by:
removeGeneratedItemFromCachein interfaceCMSVersionSessionContextProvider- Parameters:
versionModel- theCMSVersionModelto find a cached element.
-
removeAllGeneratedItemsFromCache
public void removeAllGeneratedItemsFromCache()Description copied from interface:CMSVersionSessionContextProviderRemove all generated items from cache.- Specified by:
removeAllGeneratedItemsFromCachein interfaceCMSVersionSessionContextProvider
-
addContentSlotForPageToCache
Description copied from interface:CMSVersionSessionContextProviderAdd a content slot for page to cache.- Specified by:
addContentSlotForPageToCachein interfaceCMSVersionSessionContextProvider- Parameters:
contentSlotForPageModel- theContentSlotForPageModelto add.
-
getAllCachedContentSlotsForPage
Description copied from interface:CMSVersionSessionContextProviderReturn all cached content slots for page from cache.- Specified by:
getAllCachedContentSlotsForPagein interfaceCMSVersionSessionContextProvider- Returns:
- the
ListofContentSlotForPageModel.
-
removeContentSlotForPageFromCache
Description copied from interface:CMSVersionSessionContextProviderRemove aContentSlotForPageModelfrom cache.- Specified by:
removeContentSlotForPageFromCachein interfaceCMSVersionSessionContextProvider- Parameters:
contentSlotForPageModel- theContentSlotForPageModelto delete.
-
removeAllContentSlotsForPageFromCache
public void removeAllContentSlotsForPageFromCache()Description copied from interface:CMSVersionSessionContextProviderRemove allContentSlotForPageModelfrom cache.- Specified by:
removeAllContentSlotsForPageFromCachein interfaceCMSVersionSessionContextProvider
-
addUnsavedVersionedItemToCache
Description copied from interface:CMSVersionSessionContextProviderAdd anItemModelto a cache of unsaved but versioned items and useCMSVersionModelas a key.- Specified by:
addUnsavedVersionedItemToCachein interfaceCMSVersionSessionContextProvider- Parameters:
versionModel- theCMSVersionModelthat represents a key.
-
getAllUnsavedVersionedItemsFromCached
Description copied from interface:CMSVersionSessionContextProviderReturn all cached unsaved versioned itemsCMSItemData.- Specified by:
getAllUnsavedVersionedItemsFromCachedin interfaceCMSVersionSessionContextProvider- Returns:
- the set of
CMSItemData
-
removeAllUnsavedVersionedItemsFromCache
public void removeAllUnsavedVersionedItemsFromCache()Description copied from interface:CMSVersionSessionContextProviderRemoves all cached unsaved versioned items.- Specified by:
removeAllUnsavedVersionedItemsFromCachein interfaceCMSVersionSessionContextProvider
-
isPageVersionedInTransactionCached
public boolean isPageVersionedInTransactionCached()Description copied from interface:CMSVersionSessionContextProviderChecks if theAbstractPageModelassociated to the transaction being processed has been added to the cache.- Specified by:
isPageVersionedInTransactionCachedin interfaceCMSVersionSessionContextProvider- Returns:
- true if the
AbstractPageModelhas already been added to the cache. false otherwise.
-
addPageVersionedInTransactionToCache
Description copied from interface:CMSVersionSessionContextProviderAdds theAbstractPageModelassociated to the transaction being processed to the cache.- Specified by:
addPageVersionedInTransactionToCachein interfaceCMSVersionSessionContextProvider- Parameters:
abstractPageModel- - (optional) TheAbstractPageModelto add to the cache.
-
getPageVersionedInTransactionFromCache
Description copied from interface:CMSVersionSessionContextProviderReturns theAbstractPageModelassociated to the transaction being processed from the cache.- Specified by:
getPageVersionedInTransactionFromCachein interfaceCMSVersionSessionContextProvider- Returns:
- the optional
AbstractPageModelversioned in the current transaction
-
removePageVersionedInTransactionFromCache
public void removePageVersionedInTransactionFromCache()Description copied from interface:CMSVersionSessionContextProviderRemoves theAbstractPageModelassociated to the transaction being processed from the cache.- Specified by:
removePageVersionedInTransactionFromCachein interfaceCMSVersionSessionContextProvider
-
getSessionCachedContextProvider
-
setSessionCachedContextProvider
public void setSessionCachedContextProvider(SessionCachedContextProvider sessionCachedContextProvider) -
getCmsItemDataFactory
-
setCmsItemDataFactory
public void setCmsItemDataFactory(org.springframework.beans.factory.ObjectFactory<CMSItemData> cmsItemDataFactory)
-