public class DefaultOriginalClonedItemProvider extends java.lang.Object implements OriginalClonedItemProvider
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
ItemModel instance for this transaction. |
<T extends ItemModel> |
getCurrentItem()
Provides the current
ItemModel 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
ItemModel 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)
OriginalClonedItemProviderItemModel instance for this transaction.initializeItem in interface OriginalClonedItemProviderprotected 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 extends ItemModel> T getCurrentItem()
OriginalClonedItemProviderItemModel instance for this transaction.getCurrentItem in interface OriginalClonedItemProviderItemModelpublic void finalizeItem()
OriginalClonedItemProviderItemModel instance for this transaction.finalizeItem in interface OriginalClonedItemProviderprotected 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 © 2017 SAP SE. All Rights Reserved.