Class ExcelGenericReferenceTranslator

    • Constructor Detail

      • ExcelGenericReferenceTranslator

        public ExcelGenericReferenceTranslator()
    • Method Detail

      • canHandle

        public boolean canHandle​(AttributeDescriptorModel attributeDescriptor)
        Description copied from interface: ExcelValueTranslator
        Indicates whether the translator can handle given attribute descriptor. This method is Recommended during importing excel file.
        Parameters:
        attributeDescriptor - AttributeDescriptorModel
        Returns:
        whether the translator can handle request
      • referenceFormat

        public java.lang.String referenceFormat​(AttributeDescriptorModel attributeDescriptor)
        Description copied from interface: ExcelValueTranslator
        Format how a reference should be presented. Usually references consist of a few fields indicated as unique. Therefore all unique attributes should be included in the format. Example reference format: "catalog:version"
        Parameters:
        attributeDescriptor - AttributeDescriptorModel
        Returns:
        Format how a reference should be presented
      • exportData

        public java.util.Optional<java.lang.Object> exportData​(java.lang.Object objectToExport)
        Description copied from interface: ExcelValueTranslator
        Converts given object to value which should be put into cell of exported excel file.
        Returns:
        value which will be put into cell of exported excel file.
      • exportData

        public java.util.Optional<?> exportData​(AttributeDescriptorModel attributeDescriptor,
                                                java.lang.Object objectToExport)
        Description copied from interface: ExcelValueTranslator
        Converts given object to value which should be put into cell of exported excel file.
        Parameters:
        attributeDescriptor - AttributeDescriptorModel
        Returns:
        value which will be put into cell of exported excel file.
      • importData

        public Impex importData​(AttributeDescriptorModel attributeDescriptor,
                                ImportParameters importParameters)
        Description copied from interface: ExcelValueTranslator
        Imports data based on provided importParameters for given attributeDescriptor. The method returns Impex thanks to that it is possible to creating additional entries ( or example creating part-of entries: product - price row, ect.)
        Parameters:
        attributeDescriptor - describes attribute which should be imported
        importParameters - contains information about language for localized field, type code, parsed parameters inserted into excel's cell.
        Returns:
        Impex object which is representation of impex script.
      • setRequiredAttributesFactory

        public void setRequiredAttributesFactory​(RequiredAttributesFactory requiredAttributesFactory)
      • setReferenceFormatFactory

        public void setReferenceFormatFactory​(ReferenceFormatFactory referenceFormatFactory)
      • setExportDataFactory

        public void setExportDataFactory​(ExportDataFactory exportDataFactory)
      • setImportImpexFactory

        public void setImportImpexFactory​(ImportImpexFactory importImpexFactory)
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • getExcludedFields

        public java.util.List<java.lang.String> getExcludedFields()
      • setExcludedFields

        public void setExcludedFields​(java.util.List<java.lang.String> excludedFields)
      • setOrder

        public void setOrder​(int order)
      • getOrder

        public int getOrder()