Class IntegrationObjectRootUtils
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.modeling.utility.IntegrationObjectRootUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationObjectModelcorrectRoot(IntegrationObjectModel integrationObject, String rootCode) Corrects an IntegrationObject's root property which is located at the IntegrationObjectItemModel level.static IntegrationObjectItemModelgetRootFromReturnIntegrationObjectItem(IntegrationObjectModel integrationObject) Old algorithm to determine the root ComposedType from a IntegrationObject's IntegrationObjectItems.static IntegrationObjectItemModelgetRootIntegrationObjectItem(IntegrationObjectModel integrationObject) Checks if an IntegrationObject has a root IntegrationObjectItem and returns it.static IntegrationObjectModelresolveIntegrationObjectRoot(IntegrationObjectModel integrationObject) Uses both the boolean attribute root detector and legacy algorithm in the case of boolean method failure to determine the root of the IntegrationObject.
-
Method Details
-
getRootIntegrationObjectItem
public static IntegrationObjectItemModel getRootIntegrationObjectItem(IntegrationObjectModel integrationObject) Checks if an IntegrationObject has a root IntegrationObjectItem and returns it. Otherwise returns null- Parameters:
integrationObject- an IntegrationObjectModel- Returns:
- the root IntegrationObjectItemModel
-
getRootFromReturnIntegrationObjectItem
public static IntegrationObjectItemModel getRootFromReturnIntegrationObjectItem(IntegrationObjectModel integrationObject) Old algorithm to determine the root ComposedType from a IntegrationObject's IntegrationObjectItems. The root is the IntegrationObjectItem which has no parent IntegrationObjectItem. Algorithm: every IntegrationObjectItem is also an IntegrationObjectItemAttribute with ReturnIntegrationObjectItem != null, except for the root.- Parameters:
integrationObject- an IntegrationObjectModel- Returns:
- the root IntegrationObjectItemModel
-
correctRoot
public static IntegrationObjectModel correctRoot(IntegrationObjectModel integrationObject, String rootCode) Corrects an IntegrationObject's root property which is located at the IntegrationObjectItemModel level. This method will set all other item's root boolean to false, except for the actual root.- Parameters:
integrationObject- IntegrationObjectModel to fixrootCode- Code of the root item- Returns:
- The same IntegrationObjectModel with root type property corrected to contain a single valid root
-
resolveIntegrationObjectRoot
public static IntegrationObjectModel resolveIntegrationObjectRoot(IntegrationObjectModel integrationObject) Uses both the boolean attribute root detector and legacy algorithm in the case of boolean method failure to determine the root of the IntegrationObject.- Parameters:
integrationObject- an IntegrationObjectModel- Returns:
- the IntegrationObjectModel with its root fixed if necessary
-