public class CollectionToRepresentationConverter extends java.lang.Object implements AttributeValueToRepresentationConverter<java.util.Collection<java.lang.Object>,java.util.Collection<java.lang.Object>>
AttributeValueToRepresentationConverter is invoked while converting a CMSItemModel
into its representation. It's used to convert a Collection of items into its representation (which is a collection of converted items
themselves).| Constructor and Description |
|---|
CollectionToRepresentationConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.Object> |
convert(AttributeDescriptorModel attribute,
java.util.Collection<java.lang.Object> collection,
java.util.function.Function<java.lang.Object,java.lang.Object> transformationFunction)
Converts an item of type
T, described by the provided AttributeDescriptorModel,
into a new object of type S by applying the provided transformation function. |
protected ValidationErrorsProvider |
getValidationErrorsProvider() |
void |
setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider) |
public java.util.Collection<java.lang.Object> convert(AttributeDescriptorModel attribute, java.util.Collection<java.lang.Object> collection, java.util.function.Function<java.lang.Object,java.lang.Object> transformationFunction)
AttributeValueToRepresentationConverterT, described by the provided AttributeDescriptorModel,
into a new object of type S by applying the provided transformation function.
This function can be useful to transform lists or other types of collections, where the transformation function has to be applied
individually to each element of the collection.convert in interface AttributeValueToRepresentationConverter<java.util.Collection<java.lang.Object>,java.util.Collection<java.lang.Object>>attribute - A model describing the attributecollection - The item to converttransformationFunction - Function that will be used to transform the provided item.S, converted from T by leveraging the provided transformationFunction.protected ValidationErrorsProvider getValidationErrorsProvider()
public void setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider)
Copyright © 2018 SAP SE. All Rights Reserved.