Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Config

Index

Constructors

constructor

  • new Config(jsonConfig: {}): Config

Properties

Private _analyticsTool

_analyticsTool: {}

Type declaration

  • [key: string]: {}
    • [key: string]: string[]

Private _analyticsToolName

_analyticsToolName: string

Private _columnNames

_columnNames: string[]

Private _csvSeparator

_csvSeparator: string[]

Private _dependenciesConfig

_dependenciesConfig: DependencyConfig[]

Private _insertTime

_insertTime: string

Private _medias

_medias: {}

Type declaration

  • [key: string]: any

Private _separator

_separator: string

Private _spaceSeparator

_spaceSeparator: string

Private _validationRules

_validationRules: {}

Type declaration

  • [key: string]: string[]

Private _version

_version: number

Accessors

analyticsTool

  • get analyticsTool(): {}

analyticsToolName

  • get analyticsToolName(): string

columnNames

  • get columnNames(): string[]

csvSeparator

  • get csvSeparator(): string[]

insertTime

  • get insertTime(): string
  • set insertTime(insertTime: string): void

medias

  • get medias(): {}

separator

  • get separator(): string

spaceSeparator

  • get spaceSeparator(): string

validationRules

  • get validationRules(): {}

version

  • get version(): number
  • set version(version: number): void

Methods

Private _buildDependenciesConfig

  • _buildDependenciesConfig(dependenciesConfig: { columnDestiny: string; columnReference: string; hasMatch: boolean; matches: string[]; valuesReference: string[] }[]): DependencyConfig[]
  • Parameters

    • dependenciesConfig: { columnDestiny: string; columnReference: string; hasMatch: boolean; matches: string[]; valuesReference: string[] }[]

    Returns DependencyConfig[]

Private _existsValidationRuleFor

  • _existsValidationRuleFor(csvColumn: string): boolean
  • Verifica se existe alguma regra de validação cadastrada para a coluna especificada do csv

    Parameters

    • csvColumn: string

      coluna do CSV a ser conferida

    Returns boolean

Private _getAllDependencyConfigFor

existsColumn

  • existsColumn(csvColumn: string): boolean
  • Verifica se a coluna informada existe no atributo columns da configuração

    Parameters

    • csvColumn: string

    Returns boolean

toCsvTemplate

  • toCsvTemplate(): string
  • Transforma a configuração em um cabeçalho csv

    Returns string

    String correspondente ao CSV gerado

toJson

  • toJson(): {}
  • Converte o objeto Config no JSON inserido no banco de dados

    Returns {}

    • [key: string]: any

toString

  • toString(): string

validateConfig

  • validateConfig(): boolean

validateDependencyRulesFor

  • validateDependencyRulesFor(csvLine: {}, csvColumn: string, value: string): boolean
  • Valida as regras de dependência para a coluna especificada

    Parameters

    • csvLine: {}

      Linha do CSV

      • [key: string]: string
    • csvColumn: string

      Coluna do CSV a ser validada

    • value: string

      Valor da coluna

    Returns boolean

validateRulesFor

  • validateRulesFor(csvColumn: string, value: string): boolean
  • Valida se a coluna do CSV foi preenchida corretamente

    Parameters

    • csvColumn: string

      Coluna do CSV a ser validada

    • value: string

      Valor da coluna

    Returns boolean

Generated using TypeDoc