public class DefaultOriginalClonedItemProvider<T extends ItemModel> extends java.lang.Object implements OriginalClonedItemProvider<T>
OriginalClonedItemProvider.
Stores the ItemModel instances in a stack on the current Session.| Constructor and Description |
|---|
DefaultOriginalClonedItemProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Collection<java.lang.Object> |
collectAttributeValues(ItemModel itemModel,
AttributeDescriptorModel attributeDescriptorModel)
This method collects the value(s) of the attribute identified by the
AttributeDescriptorModel in the provided ItemModel. |
protected void |
detachAll(ItemModel itemModel)
This method detaches parent itemModel from modelService as well as all child models (available through attributes).
|
void |
finalizeItem()
Finalizes the latest instance for this transaction.
|
T |
getCurrentItem()
Provides the current instance for this transaction.
|
protected LocalizedPopulator |
getLocalizedPopulator() |
protected ModelService |
getModelService() |
protected SessionService |
getSessionService() |
protected TypeService |
getTypeService() |
protected java.util.Deque<ItemModel> |
getWrappedStack(java.lang.Object rawValue)
Values stored in the session service must be wrapped in AtomicReference objects to protect them from being altered during serialization.
|
void |
initializeItem(ItemModel originalItemModel)
Initializes and stores a new instance for this transaction.
|
void |
setLocalizedPopulator(LocalizedPopulator localizedPopulator) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
void |
setTypeService(TypeService typeService) |
public void initializeItem(ItemModel originalItemModel)
CMSItemContextProviderinitializeItem in interface CMSItemContextProvider<T extends ItemModel>initializeItem in interface OriginalClonedItemProvider<T extends ItemModel>originalItemModel - the value to storeprotected void detachAll(ItemModel itemModel)
itemModel - ItemModel that should be detached.protected java.util.Collection<java.lang.Object> collectAttributeValues(ItemModel itemModel, AttributeDescriptorModel attributeDescriptorModel)
AttributeDescriptorModel in the provided ItemModel.public T getCurrentItem()
CMSItemContextProvidergetCurrentItem in interface CMSItemContextProvider<T extends ItemModel>getCurrentItem in interface OriginalClonedItemProvider<T extends ItemModel>public void finalizeItem()
CMSItemContextProviderfinalizeItem in interface CMSItemContextProvider<T extends ItemModel>finalizeItem in interface OriginalClonedItemProvider<T extends ItemModel>protected java.util.Deque<ItemModel> getWrappedStack(java.lang.Object rawValue)
rawValue - Object retrieved from the session service. The object must be an AtomicReference. Otherwise, an IllegalStateException is thrown.protected SessionService getSessionService()
public void setSessionService(SessionService sessionService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected TypeService getTypeService()
public void setTypeService(TypeService typeService)
protected LocalizedPopulator getLocalizedPopulator()
public void setLocalizedPopulator(LocalizedPopulator localizedPopulator)
Copyright © 2018 SAP SE. All Rights Reserved.