Class WriteService


  • public class WriteService
    extends java.lang.Object
    Handles the write requests of the extension's widgets
    • Constructor Detail

      • WriteService

        public WriteService()
    • Method Detail

      • setModelService

        public void setModelService​(ModelService modelService)
      • setReadService

        public void setReadService​(ReadService readService)
      • createIntegrationObject

        public IntegrationObjectModel createIntegrationObject​(java.lang.String name,
                                                              IntegrationType type)
        Creates a base integration object.
        Parameters:
        name - the integration object's name
        type - the type of integration object (Inbound, Outbound)
        Returns:
        an empty integration object
      • persistVirtualAttributeDescriptor

        public IntegrationObjectVirtualAttributeDescriptorModel persistVirtualAttributeDescriptor​(java.lang.String code,
                                                                                                  java.lang.String logicLocation,
                                                                                                  java.lang.String type)
        Creates, persists and returns a Virtual Attribute Descriptor.
        Parameters:
        code - the descriptor's code
        logicLocation - the logicLocation of a script. eg, model://modelScript
        type - the type of Virtual Attribute Descriptor. eg, java.lang.String
        Returns:
        newly created Virtual Attribute Descriptor
      • clearIntegrationObject

        public IntegrationObjectModel clearIntegrationObject​(IntegrationObjectModel integrationObject)
        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,
                                                        java.util.Map<ComposedTypeModel,​java.util.List<AbstractListItemDTO>> objectMap,
                                                        java.lang.String rootCode)
        Builds an integration object's items and their associated attributes from a map.
        Parameters:
        integrationObject - the integration object to build
        objectMap - the map used to build the integration object's content
        rootCode - code of root item
        Returns:
        a built integration object
      • persistIntegrationObject

        public void persistIntegrationObject​(IntegrationObjectModel integrationObject)
        Saves an integration object with the model service.
        Parameters:
        integrationObject - the integration object to be saved
      • persistIntegrationObjectItems

        public void persistIntegrationObjectItems​(java.util.Collection<IntegrationObjectItemModel> integrationObjectItemModels)
        Saves an integration object item with the model service.
        Parameters:
        integrationObjectItemModels - the integration object item to be saved
      • deleteIntegrationObject

        public void deleteIntegrationObject​(IntegrationObjectModel integrationObject)
        Delete an integration object from the type system
        Parameters:
        integrationObject - the integration object to be deleted