public class AttributeContainsCMSComponentsPredicate extends java.lang.Object implements java.util.function.Predicate<AttributeDescriptorModel>
AbstractCMSComponentModel.| Constructor and Description |
|---|
AttributeContainsCMSComponentsPredicate() |
| Modifier and Type | Method and Description |
|---|---|
protected TypeModel |
getAttributeContentType(AttributeDescriptorModel attributeDescriptorModel)
Retrieves the type of the right element
TypeModel depending on the type attribute. |
protected TypeModel |
getCollectionElementComponentTypeModel(AttributeDescriptorModel attributeDescriptorModel)
Returns the
TypeModel of the elements within a collection. |
protected TypeModel |
getMapElementComponentTypeModel(AttributeDescriptorModel attributeDescriptorModel)
Returns the
TypeModel of the elements within a map. |
protected TypeService |
getTypeService() |
protected boolean |
isCmsComponentType(TypeModel attributeType)
This method is used to determine whether a TypeModel is assignable from
AbstractCMSComponentModel. |
protected boolean |
isCollection(AttributeDescriptorModel attributeDescriptorModel)
This method can be used to determine whether an attribute contains a collection or not.
|
void |
setTypeService(TypeService typeService) |
boolean |
test(AttributeDescriptorModel attributeDescriptorModel) |
public AttributeContainsCMSComponentsPredicate()
public boolean test(AttributeDescriptorModel attributeDescriptorModel)
test in interface java.util.function.Predicate<AttributeDescriptorModel>protected boolean isCmsComponentType(TypeModel attributeType)
AbstractCMSComponentModel.attributeType - The attribute to check.protected TypeModel getAttributeContentType(AttributeDescriptorModel attributeDescriptorModel)
TypeModel depending on the type attribute.
- If the attribute is not a collection, then the value returned is the type of the attribute itself.
- If it's a list, the value returned is the type of the elements in the list.
- If it's a map, the value returned is the type of the values in the map.attributeDescriptorModel - The model describing the attribute whose type to find.protected TypeModel getCollectionElementComponentTypeModel(AttributeDescriptorModel attributeDescriptorModel)
TypeModel of the elements within a collection.attributeDescriptorModel - The model describing the attribute whose type to find.protected TypeModel getMapElementComponentTypeModel(AttributeDescriptorModel attributeDescriptorModel)
TypeModel of the elements within a map.attributeDescriptorModel - The model describing the attribute whose type to find.protected boolean isCollection(AttributeDescriptorModel attributeDescriptorModel)
attributeDescriptorModel - The model describing the attribute to evaluate.protected TypeService getTypeService()
public void setTypeService(TypeService typeService)
Copyright © 2018 SAP SE. All Rights Reserved.