Class MImportTemplate

    • Constructor Detail

      • MImportTemplate

        public MImportTemplate​(Properties ctx,
                               int AD_ImportTemplate_ID,
                               String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_ImportTemplate_ID - id
        trxName - transaction
      • MImportTemplate

        public MImportTemplate​(Properties ctx,
                               ResultSet rs,
                               String trxName)
        Load Constructor
        Parameters:
        ctx - ctx
        rs - result set
        trxName - transaction
      • MImportTemplate

        public MImportTemplate​(MImportTemplate copy)
        Parameters:
        copy -
    • Method Detail

      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new record
        Returns:
        true if record can be saved
      • isAllowed

        public boolean isAllowed​(String importMode,
                                 int roleID)
      • validateFile

        public InputStream validateFile​(InputStream in)
        Validate that InputStream header is CSVHeader or AliasCSVHeader If the header is AliasCSVHeader it replaces it with the CSVHeader so it can be processed
        Parameters:
        in - input file
        Returns:
        InputStream with the CSVHeader that can be processed by CsvMapReader