Class MapTypeDescriptor
java.lang.Object
de.hybris.platform.integrationservices.model.impl.MapTypeDescriptor
- All Implemented Interfaces:
TypeDescriptor
-
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<TypeAttributeDescriptor>getAttribute(String attrName) Retrieves descriptor of the specified attribute.@NotNull Collection<TypeAttributeDescriptor>Retrieves all attributes defined in an integration object item.@NotNull StringReads value of the integration object code.@NotNull StringReads value of the integration object item code.Retrieves key descriptor of this item type.Retrieves attribute path from this item type to the root item type in the same integration object.@NotNull StringReads code (name) of the integration object item type in the type system.booleanDetermines whether it's possible to navigate from an integration item described by this type descriptor to the root item of the integration object.booleanDetermines whether this descriptor is an abstract item typebooleanDetermines whether this descriptor is for a type representing type system enumeration.booleanisInstance(Object obj) Determines whether the specified object is an instance of the type presented by this type descriptor.booleanisMap()Determines whether this descriptor is for a type representing integration object item or for a map type.booleanDetermines whether this descriptor is for type representing integration object item or for a primitive type.booleanisRoot()Determines whether this descriptor is for the root item in the Integration ObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.integrationservices.model.TypeDescriptor
pathFrom
-
Method Details
-
getIntegrationObjectCode
Description copied from interface:TypeDescriptorReads value of the integration object code.- Specified by:
getIntegrationObjectCodein interfaceTypeDescriptor- Returns:
- integration object code this item belongs to.
-
getItemCode
Description copied from interface:TypeDescriptorReads value of the integration object item code.- Specified by:
getItemCodein interfaceTypeDescriptor- Returns:
- integration object item type code. Keep in mind this value may be different from the type code of the item the integration object item represents. For example, type code of the item in the platform may be "Product" but integration object item type could be called "IntegrationProduct".
- See Also:
-
getTypeCode
Description copied from interface:TypeDescriptorReads code (name) of the integration object item type in the type system.- Specified by:
getTypeCodein interfaceTypeDescriptor- Returns:
- type code of the item in the type system. Keep in mind this value may be different from the integration objec item code. For example, type code of the item in the type system may be "Product" but integration object item code may be different, e.g "IntegrationProduct".
- See Also:
-
getAttribute
Description copied from interface:TypeDescriptorRetrieves descriptor of the specified attribute.- Specified by:
getAttributein interfaceTypeDescriptor- Parameters:
attrName- name of the integration object item attribute to be retrieved. Keep in mind that name of the attribute in an integration object item may be different from the name of the corresponding attribute in the type system.- Returns:
- attribute descriptor for the given name or
Optional.empty(), if the item type does not have an attribute with such name.
-
getAttributes
Description copied from interface:TypeDescriptorRetrieves all attributes defined in an integration object item.- Specified by:
getAttributesin interfaceTypeDescriptor- Returns:
- a collection of all attributes in the integration object item or an empty collection, if this description is for a primitive type or the item does not have attributes.
-
isPrimitive
public boolean isPrimitive()Description copied from interface:TypeDescriptorDetermines whether this descriptor is for type representing integration object item or for a primitive type.- Specified by:
isPrimitivein interfaceTypeDescriptor- Returns:
true, if this descriptor is for a primitive type, e.g. Integer, String, etc;false, otherwise.
-
isMap
public boolean isMap()Description copied from interface:TypeDescriptorDetermines whether this descriptor is for a type representing integration object item or for a map type.- Specified by:
isMapin interfaceTypeDescriptor- Returns:
true, if this descriptor is for a map type;false, otherwise.
-
isEnumeration
public boolean isEnumeration()Description copied from interface:TypeDescriptorDetermines whether this descriptor is for a type representing type system enumeration.- Specified by:
isEnumerationin interfaceTypeDescriptor- Returns:
true, if this descriptor is for an enumeration type;falseotherwise.
-
isAbstract
public boolean isAbstract()Description copied from interface:TypeDescriptorDetermines whether this descriptor is an abstract item type- Specified by:
isAbstractin interfaceTypeDescriptor- Returns:
true, if the item type of this descriptor hasabstract == true
-
isInstance
Description copied from interface:TypeDescriptorDetermines whether the specified object is an instance of the type presented by this type descriptor.- Specified by:
isInstancein interfaceTypeDescriptor- Parameters:
obj- an object to evaluate.- Returns:
true, if the specified object is an instance of the type presented by this type descriptor;false, if the object isnullor cannot be described by this type descriptor.
-
isRoot
public boolean isRoot()Description copied from interface:TypeDescriptorDetermines whether this descriptor is for the root item in the Integration Object- Specified by:
isRootin interfaceTypeDescriptor- Returns:
true, if this descriptor is the root;falseotherwise.
-
getKeyDescriptor
Description copied from interface:TypeDescriptorRetrieves key descriptor of this item type.- Specified by:
getKeyDescriptorin interfaceTypeDescriptor- Returns:
- descriptor of the key identifying instances of this item type.
-
getPathsToRoot
Description copied from interface:TypeDescriptorRetrieves attribute path from this item type to the root item type in the same integration object.- Specified by:
getPathsToRootin interfaceTypeDescriptor- Returns:
- a list of all possible paths in order from the shorter ones to the longer paths. If this type descriptor does not contain attribute(s) that eventually lead to the root item type, then an empty list is returned.
- See Also:
-
hasPathToRoot
public boolean hasPathToRoot()Description copied from interface:TypeDescriptorDetermines whether it's possible to navigate from an integration item described by this type descriptor to the root item of the integration object.- Specified by:
hasPathToRootin interfaceTypeDescriptor- Returns:
true, if this type descriptor describes a root item type in the integration object or it has aReferencePathto the root item type.- See Also:
-