Class DefaultExportConfigurationGenerator
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.configuration.generators.DefaultExportConfigurationGenerator
- All Implemented Interfaces:
ExportConfigurationGenerator
public class DefaultExportConfigurationGenerator
extends Object
implements ExportConfigurationGenerator
Generates a JSON payload representation of a Postman collection for a
ConfigurationBundleEntity
and allows downloading of the payload.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultExportConfigurationGenerator(PostmanCollectionGenerator postmanCollectionGenerator) Instantiates a new export configuration generator. -
Method Summary
Modifier and TypeMethodDescriptionvoiddownloadExportConfig(ConfigurationBundleEntity configurationBundleEntity) Converts aConfigurationBundleEntityto JSON payload as byte array and calls the browser download functionality.byte[]generateExportConfig(ConfigurationBundleEntity configurationBundleEntity) Calls the Postman collection generator to generate a JSON payload representation of a Postman collection for aConfigurationBundleEntity
-
Constructor Details
-
DefaultExportConfigurationGenerator
Instantiates a new export configuration generator.- Parameters:
postmanCollectionGenerator- the service that generates Postman collections as JSON payload representations
-
-
Method Details
-
generateExportConfig
Calls the Postman collection generator to generate a JSON payload representation of a Postman collection for aConfigurationBundleEntity- Specified by:
generateExportConfigin interfaceExportConfigurationGenerator- Parameters:
configurationBundleEntity- a givenConfigurationBundleEntity- Returns:
- a byte array from the string representation of the JSON payload
-
downloadExportConfig
Converts aConfigurationBundleEntityto JSON payload as byte array and calls the browser download functionality. The file name will have a uniquely generated filename based on currentLocalDateTime.- Specified by:
downloadExportConfigin interfaceExportConfigurationGenerator- Parameters:
configurationBundleEntity- a givenConfigurationBundleEntity
-