Class ExcelMediaImportValidator

    • Field Detail

      • VALIDATION_DECLARED_MULTIPLE_REFERENCES

        public static final java.lang.String VALIDATION_DECLARED_MULTIPLE_REFERENCES
        See Also:
        Constant Field Values
      • VALIDATION_PATH_AND_CODE_EMPTY

        public static final java.lang.String VALIDATION_PATH_AND_CODE_EMPTY
        See Also:
        Constant Field Values
      • VALIDATION_MISSING_FILE_IN_ZIP

        public static final java.lang.String VALIDATION_MISSING_FILE_IN_ZIP
        See Also:
        Constant Field Values
      • VALIDATION_MISSING_ZIP

        public static final java.lang.String VALIDATION_MISSING_ZIP
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExcelMediaImportValidator

        public ExcelMediaImportValidator()
    • Method Detail

      • canHandle

        public boolean canHandle​(ImportParameters importParameters,
                                 AttributeDescriptorModel attributeDescriptor)
        Description copied from interface: ExcelValidator
        Indicates whether given validator can handle a cell based on attribute descriptor and import parameters.
        Specified by:
        canHandle in interface ExcelValidator
        Returns:
        boolean whether validator can handle the cell.
      • hasImportData

        protected boolean hasImportData​(ImportParameters importParameters)
      • validateSingleValue

        public java.util.List<ValidationMessage> validateSingleValue​(java.util.Map<java.lang.String,​java.lang.Object> context,
                                                                     java.util.Map<java.lang.String,​java.lang.String> parameters)
        Description copied from interface: ExcelSingleMediaValidator
        Allows to validate single media.
        Specified by:
        validateSingleValue in interface ExcelSingleMediaValidator
        Parameters:
        context - which allows to hold information about the file.
        parameters - values of excel's cell.
        Returns:
        the collection of errors. If media has no errors, then the empty collection should be returned.
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • getImportService

        @Deprecated(since="1808",
                    forRemoval=true)
        public ExcelImportService getImportService()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1808, not used anymore
      • setImportService

        @Deprecated(since="1808",
                    forRemoval=true)
        public void setImportService​(ExcelImportService importService)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1808, not used anymore