Interface CMSVersionSessionContextProvider
-
- All Known Implementing Classes:
DefaultCMSVersionSessionContextProvider
public interface CMSVersionSessionContextProviderService to cache elements related to versioning in session.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddContentSlotForPageToCache(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(java.util.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.java.util.List<ContentSlotForPageModel>getAllCachedContentSlotsForPage()Return all cached content slots for page from cache.java.util.Map<CMSVersionModel,ItemModel>getAllGeneratedItemsFromCached()Return all generated cachedItemModel.java.util.Set<CMSItemData>getAllUnsavedVersionedItemsFromCached()Return all cached unsaved versioned itemsCMSItemData.java.util.Optional<AbstractPageModel>getPageVersionedInTransactionFromCache()Returns theAbstractPageModelassociated to the transaction being processed from the cache.booleanisPageVersionedInTransactionCached()Checks if theAbstractPageModelassociated to the transaction being processed has been added to the cache.voidremoveAllContentSlotsForPageFromCache()Remove allContentSlotForPageModelfrom cache.voidremoveAllGeneratedItemsFromCache()Remove all generated items from cache.voidremoveAllUnsavedVersionedItemsFromCache()Removes all cached unsaved versioned items.voidremoveContentSlotForPageFromCache(ContentSlotForPageModel contentSlotForPageModel)Remove aContentSlotForPageModelfrom cache.voidremoveGeneratedItemFromCache(CMSVersionModel versionModel)Remove generated cached item based onCMSVersionModel.voidremovePageVersionedInTransactionFromCache()Removes theAbstractPageModelassociated to the transaction being processed from the cache.
-
-
-
Method Detail
-
addGeneratedItemToCache
void addGeneratedItemToCache(ItemModel itemModel, CMSVersionModel versionModel)
Add anItemModelto a cache of generated items and useCMSVersionModelas a key.- Parameters:
itemModel- theItemModelto cacheversionModel- theCMSVersionModelthat represents a key.
-
getAllGeneratedItemsFromCached
java.util.Map<CMSVersionModel,ItemModel> getAllGeneratedItemsFromCached()
Return all generated cachedItemModel.- Returns:
- the
Mapof key (CMSVersionModel) and value (ItemModel)
-
removeGeneratedItemFromCache
void removeGeneratedItemFromCache(CMSVersionModel versionModel)
Remove generated cached item based onCMSVersionModel.- Parameters:
versionModel- theCMSVersionModelto find a cached element.
-
removeAllGeneratedItemsFromCache
void removeAllGeneratedItemsFromCache()
Remove all generated items from cache.
-
addContentSlotForPageToCache
void addContentSlotForPageToCache(ContentSlotForPageModel contentSlotForPageModel)
Add a content slot for page to cache.- Parameters:
contentSlotForPageModel- theContentSlotForPageModelto add.
-
getAllCachedContentSlotsForPage
java.util.List<ContentSlotForPageModel> getAllCachedContentSlotsForPage()
Return all cached content slots for page from cache.- Returns:
- the
ListofContentSlotForPageModel.
-
removeContentSlotForPageFromCache
void removeContentSlotForPageFromCache(ContentSlotForPageModel contentSlotForPageModel)
Remove aContentSlotForPageModelfrom cache.- Parameters:
contentSlotForPageModel- theContentSlotForPageModelto delete.
-
removeAllContentSlotsForPageFromCache
void removeAllContentSlotsForPageFromCache()
Remove allContentSlotForPageModelfrom cache.
-
addUnsavedVersionedItemToCache
void addUnsavedVersionedItemToCache(CMSVersionModel versionModel)
Add anItemModelto a cache of unsaved but versioned items and useCMSVersionModelas a key.- Parameters:
versionModel- theCMSVersionModelthat represents a key.
-
getAllUnsavedVersionedItemsFromCached
java.util.Set<CMSItemData> getAllUnsavedVersionedItemsFromCached()
Return all cached unsaved versioned itemsCMSItemData.- Returns:
- the set of
CMSItemData
-
removeAllUnsavedVersionedItemsFromCache
void removeAllUnsavedVersionedItemsFromCache()
Removes all cached unsaved versioned items.
-
isPageVersionedInTransactionCached
boolean isPageVersionedInTransactionCached()
Checks if theAbstractPageModelassociated to the transaction being processed has been added to the cache.- Returns:
- true if the
AbstractPageModelhas already been added to the cache. false otherwise.
-
addPageVersionedInTransactionToCache
void addPageVersionedInTransactionToCache(java.util.Optional<AbstractPageModel> abstractPageModel)
Adds theAbstractPageModelassociated to the transaction being processed to the cache.- Parameters:
abstractPageModel- - (optional) TheAbstractPageModelto add to the cache.
-
getPageVersionedInTransactionFromCache
java.util.Optional<AbstractPageModel> getPageVersionedInTransactionFromCache()
Returns theAbstractPageModelassociated to the transaction being processed from the cache.- Returns:
- the optional
AbstractPageModelversioned in the current transaction
-
removePageVersionedInTransactionFromCache
void removePageVersionedInTransactionFromCache()
Removes theAbstractPageModelassociated to the transaction being processed from the cache.
-
-