Class WriteService
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.modeling.services.WriteService
Handles the write requests of the extension's widgets
-
Constructor Summary
ConstructorsConstructorDescriptionWriteService(@NotNull ModelService modelService, @NotNull ReadService readService, @NotNull ReturnIntegrationObjectItemService returnIntegrationObjectItemService) Default constructor forWriteService. -
Method Summary
Modifier and TypeMethodDescriptionclearIntegrationObject(IntegrationObjectModel integrationObject) Clears the old definition of an integration object.cloneIntegrationObject(IntegrationObjectModel integrationObjectModel, IntegrationObjectModel integrationObjectModelClone) Clones an integration object's items and their associated attributes from an original integration object.createDefinitions(IntegrationObjectModel integrationObject, IntegrationObjectDefinition objectMap, String rootCode) Builds an integration object's items and their associated attributes from a map.createIntegrationObject(String name, IntegrationType type) Creates a base integration object.voiddeleteIntegrationObject(IntegrationObjectModel integrationObject) Delete an integration object from the type systemvoidpersistIntegrationObject(IntegrationObjectModel integrationObject) Saves an integration object with the model service.voidpersistIntegrationObjectItems(Collection<IntegrationObjectItemModel> integrationObjectItemModels) Saves an integration object item with the model service.persistVirtualAttributeDescriptor(String code, String logicLocation, String type) Creates, persists and returns a Virtual Attribute Descriptor.
-
Constructor Details
-
WriteService
public WriteService(@NotNull @NotNull ModelService modelService, @NotNull @NotNull ReadService readService, @NotNull @NotNull ReturnIntegrationObjectItemService returnIntegrationObjectItemService) Default constructor forWriteService.- Parameters:
modelService- the service to perform modeling operations.readService- the service to perform database queries.returnIntegrationObjectItemService- the service to determine the returnIntegrationObject of integration object's attributes.
-
-
Method Details
-
createIntegrationObject
Creates a base integration object.- Parameters:
name- the integration object's nametype- the type of integration object (Inbound, Outbound)- Returns:
- an empty integration object
-
persistVirtualAttributeDescriptor
public IntegrationObjectVirtualAttributeDescriptorModel persistVirtualAttributeDescriptor(String code, String logicLocation, String type) Creates, persists and returns a Virtual Attribute Descriptor.- Parameters:
code- the descriptor's codelogicLocation- the logicLocation of a script. eg, model://modelScripttype- the type of Virtual Attribute Descriptor. eg, java.lang.String- Returns:
- newly created Virtual Attribute Descriptor
-
clearIntegrationObject
Clears the old definition of an integration object. The integration object is not deleted, this method simply removes all of its items and their associated attributes.- Parameters:
integrationObject- the integration object to be cleared- Returns:
- a cleared integration object
-
createDefinitions
public IntegrationObjectModel createDefinitions(IntegrationObjectModel integrationObject, IntegrationObjectDefinition objectMap, String rootCode) Builds an integration object's items and their associated attributes from a map.- Parameters:
integrationObject- the integration object to buildobjectMap- the map used to build the integration object's contentrootCode- code of root item- Returns:
- a built integration object
-
cloneIntegrationObject
public IntegrationObjectModel cloneIntegrationObject(IntegrationObjectModel integrationObjectModel, IntegrationObjectModel integrationObjectModelClone) Clones an integration object's items and their associated attributes from an original integration object.- Parameters:
integrationObjectModel- the original integration object to cloneintegrationObjectModelClone- the integration object clone to add cloned items and attributes onto- Returns:
- an integration object with its contents cloned
-
persistIntegrationObject
Saves an integration object with the model service.- Parameters:
integrationObject- the integration object to be saved
-
persistIntegrationObjectItems
public void persistIntegrationObjectItems(Collection<IntegrationObjectItemModel> integrationObjectItemModels) Saves an integration object item with the model service.- Parameters:
integrationObjectItemModels- the integration object item to be saved
-
deleteIntegrationObject
Delete an integration object from the type system- Parameters:
integrationObject- the integration object to be deleted
-