public class DefaultAttributeValueToRepresentationStrategy extends java.lang.Object implements AttributeValueToRepresentationStrategy
DefaultCMSItemConverter to convert items into a representation suited for admin
purposes, like CMS.| Constructor and Description |
|---|
DefaultAttributeValueToRepresentationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
convertLocalizedValue(AttributeDescriptorModel attribute,
java.util.Map<java.lang.String,java.lang.Object> languageValueMap,
java.util.function.Function<java.lang.Object,java.lang.Object> transform) |
protected CloneComponentContextProvider |
getCloneComponentContextProvider() |
java.util.function.Supplier<java.lang.Object> |
getCollectionGetter(AttributeDescriptorModel attribute,
ItemModel sourceModel,
java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
This function is used to retrieve a
Supplier that can be used to get the representation of a collection stored in an attribute. |
protected CollectionToRepresentationConverter |
getCollectionToRepresentationConverter() |
java.util.function.Supplier<java.lang.Object> |
getLocalizedCollectionGetter(AttributeDescriptorModel attribute,
ItemModel sourceModel,
java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
This function is used to retrieve a
Supplier that can be used to get the representation of a localized collection value stored
in an attribute. |
java.util.function.Supplier<java.lang.Object> |
getLocalizedGetter(AttributeDescriptorModel attribute,
ItemModel sourceModel,
java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
This function is used to retrieve a
Supplier that can be used to get the representation of a localized value stored in an attribute. |
protected LocalizedPopulator |
getLocalizedPopulator() |
protected ModelService |
getModelService() |
java.util.function.Supplier<java.lang.Object> |
getSimpleGetter(AttributeDescriptorModel attribute,
ItemModel sourceModel,
java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
This function is used to retrieve a Supplier that can be used to get the representation of the value of an attribute.
|
protected ValidationErrorsProvider |
getValidationErrorsProvider() |
void |
setCloneComponentContextProvider(CloneComponentContextProvider cloneComponentContextProvider) |
void |
setCollectionToRepresentationConverter(CollectionToRepresentationConverter collectionToRepresentationConverter) |
void |
setLocalizedPopulator(LocalizedPopulator localizedPopulator) |
void |
setModelService(ModelService modelService) |
void |
setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider) |
public DefaultAttributeValueToRepresentationStrategy()
public java.util.function.Supplier<java.lang.Object> getSimpleGetter(AttributeDescriptorModel attribute, ItemModel sourceModel, java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
AttributeValueToRepresentationStrategygetSimpleGetter in interface AttributeValueToRepresentationStrategyattribute - The object describing the attribute whose value will be transformed.sourceModel - The model containing the value that will be transformed.goDeeperOrSerialize - The function that will be used to transform the value into the expected object.Supplier. Use get() to retrieve the transformed object.public java.util.function.Supplier<java.lang.Object> getCollectionGetter(AttributeDescriptorModel attribute, ItemModel sourceModel, java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
AttributeValueToRepresentationStrategySupplier that can be used to get the representation of a collection stored in an attribute. This
representation is generated by leveraging the provided transformation function.getCollectionGetter in interface AttributeValueToRepresentationStrategyattribute - The object describing the attribute whose value will be transformed.sourceModel - The model containing the collection that will be transformed.goDeeperOrSerialize - The function that will be used to transform the collection into the expected representation.Supplier. Use get() to retrieve the transformed collection.public java.util.function.Supplier<java.lang.Object> getLocalizedGetter(AttributeDescriptorModel attribute, ItemModel sourceModel, java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
AttributeValueToRepresentationStrategySupplier that can be used to get the representation of a localized value stored in an attribute.
This representation is generated by leveraging the provided transformation function.getLocalizedGetter in interface AttributeValueToRepresentationStrategyattribute - The object describing the attribute whose value will be transformed.sourceModel - The model containing the localized value that will be transformed.goDeeperOrSerialize - The function that will be used to transform the localized value into the expected representation.Supplier. Use get() to retrieve the transformed localized value.public java.util.function.Supplier<java.lang.Object> getLocalizedCollectionGetter(AttributeDescriptorModel attribute, ItemModel sourceModel, java.util.function.Function<java.lang.Object,java.lang.Object> goDeeperOrSerialize)
AttributeValueToRepresentationStrategySupplier that can be used to get the representation of a localized collection value stored
in an attribute.
This representation is generated by leveraging the provided transformation function.getLocalizedCollectionGetter in interface AttributeValueToRepresentationStrategyattribute - The object describing the attribute whose value will be transformed.sourceModel - The model containing the localized collection value that will be transformed.goDeeperOrSerialize - The function that will be used to transform the localized collection value into the expected representation.Supplier. Use get() to retrieve the transformed localized collection value.protected java.util.Map<java.lang.String,java.lang.Object> convertLocalizedValue(AttributeDescriptorModel attribute, java.util.Map<java.lang.String,java.lang.Object> languageValueMap, java.util.function.Function<java.lang.Object,java.lang.Object> transform)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected CollectionToRepresentationConverter getCollectionToRepresentationConverter()
public void setCollectionToRepresentationConverter(CollectionToRepresentationConverter collectionToRepresentationConverter)
protected ValidationErrorsProvider getValidationErrorsProvider()
public void setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider)
protected CloneComponentContextProvider getCloneComponentContextProvider()
public void setCloneComponentContextProvider(CloneComponentContextProvider cloneComponentContextProvider)
protected LocalizedPopulator getLocalizedPopulator()
public void setLocalizedPopulator(LocalizedPopulator localizedPopulator)
Copyright © 2018 SAP SE. All Rights Reserved.