Class ExportConfigurationEditorPresentation
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.configuration.data.ExportConfigurationEditorPresentation
- All Implemented Interfaces:
Serializable
Class that encapsulates a map where the keys are integration object codes and the values are sets of the root item's
selected
ItemModel instances. Represents what instances are selected in the export configuration editor. Can generate
ConfigurationBundleEntity from the map.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExportConfigurationEditorPresentation(com.hybris.cockpitng.util.notifications.NotificationService notificationService) Instantiate this export configuration presentation. -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the encapsulated map of entity instances and set selected entity tonull.Copy the map of selected entity instances, remove entries with no selected instances, and generate aConfigurationBundleEntity.Get currently selected entity.Get a copy of the set of selected instances for currently selected entity.Get selected entity's root type code.intgetSelectedInstancesCountForEntity(String entityType) Retrieves the current number of selected instances for a given entity type.booleanCheck if map has any entries with a non-empty set of selected instances.booleanisSelectedEntity(IntegrationObjectModel integrationObjectModel) Determine if the givenIntegrationObjectModelequalsselectedEntityvoidsetSelectedEntity(@NotNull IntegrationObjectModel selectedEntity) Set currently selected entity.voidsetSelectedEntityInstances(Set<ItemModel> selectedEntityInstances) Update the set of selected instances with a copy of the argument for currently selected entity.
-
Constructor Details
-
ExportConfigurationEditorPresentation
public ExportConfigurationEditorPresentation(com.hybris.cockpitng.util.notifications.NotificationService notificationService) Instantiate this export configuration presentation.- Parameters:
notificationService- service to display notifications in backoffice.
-
-
Method Details
-
getSelectedEntity
Get currently selected entity.- Returns:
- the
IntegrationObjectModelrepresenting the selected entity, ornullif no entity has been selected yet. - See Also:
-
isSelectedEntity
Determine if the givenIntegrationObjectModelequalsselectedEntity -
setSelectedEntity
Set currently selected entity.- Parameters:
selectedEntity- theIntegrationObjectModelrepresenting the selected entity. Can't benull.
-
getSelectedEntityRoot
Get selected entity's root type code. The selected entity must be set first.- Returns:
- the code of the selected entity's root item type, or an empty string if no entity has been selected yet.
- See Also:
-
getSelectedEntityInstances
Get a copy of the set of selected instances for currently selected entity. The selected entity must be set first.- Returns:
- a set of
ItemModelrepresenting selected entity's selected instances, or an empty set if no entity has been selected yet. - See Also:
-
setSelectedEntityInstances
Update the set of selected instances with a copy of the argument for currently selected entity. The selected entity must be set first.- Parameters:
selectedEntityInstances- the updated set ofItemModel- See Also:
-
clearSelection
public void clearSelection()Clear the encapsulated map of entity instances and set selected entity tonull. -
isAnyInstanceSelected
public boolean isAnyInstanceSelected()Check if map has any entries with a non-empty set of selected instances.- Returns:
- if any instance selected
-
generateConfigurationBundleEntity
Copy the map of selected entity instances, remove entries with no selected instances, and generate aConfigurationBundleEntity.- Returns:
- a
ConfigurationBundleEntityready for export
-
getSelectedInstancesCountForEntity
Retrieves the current number of selected instances for a given entity type. Returns 0 if entry not present in map. The code lookup is based off of theIntegrationObjectModel's code.- Parameters:
entityType- Entity type to retrieve count on- Returns:
- Number of selected instances
-