001package com.credibledoc.substitution.reporting.report; 002 003import java.io.File; 004import java.util.ArrayList; 005import java.util.List; 006 007/** 008 * Contains a global state of generated reports. It contains for example 009 * {@link #directory}, {@link #linesNumber} and {@link #transactionsFilter}. 010 */ 011public class Report { 012 /** 013 * Where all reports will be placed. 014 */ 015 private File directory; 016 017 /** 018 * If this list is empty, all transactions will be parsed. 019 * Else only defined in the list transactions will be parsed. 020 */ 021 private List<String> transactionsFilter; 022 023 /** 024 * A total number of lines in all log files. 025 */ 026 private int linesNumber; 027 028 /** 029 * When this field is 'true', then a special behavior will be applied. 030 * Visualizer will create its own documentation. 031 */ 032 private boolean creationOfSelfDocumentation; 033 034 /** 035 * Initializes all lists. 036 */ 037 public Report() { 038 transactionsFilter = new ArrayList<>(); 039 } 040 041 @Override 042 public String toString() { 043 return "Report{" + 044 "directory=" + directory + 045 ", transactionsFilter=" + transactionsFilter + 046 ", linesNumber=" + linesNumber + 047 ", creationOfSelfDocumentation=" + creationOfSelfDocumentation + 048 '}'; 049 } 050 051 /** 052 * @return The {@link #directory} field value. 053 */ 054 public File getDirectory() { 055 return directory; 056 } 057 058 /** 059 * @param directory see the {@link #directory} field 060 */ 061 public void setDirectory(File directory) { 062 this.directory = directory; 063 } 064 065 /** 066 * @return The {@link #transactionsFilter} field value. 067 */ 068 public List<String> getTransactionsFilter() { 069 return transactionsFilter; 070 } 071 072 /** 073 * @param transactionsFilter see the {@link #transactionsFilter} field 074 */ 075 public void setTransactionsFilter(List<String> transactionsFilter) { 076 this.transactionsFilter = transactionsFilter; 077 } 078 079 /** 080 * @return The {@link #linesNumber} field value. 081 */ 082 public int getLinesNumber() { 083 return linesNumber; 084 } 085 086 /** 087 * @param linesNumber see the {@link #linesNumber} field 088 */ 089 public void setLinesNumber(int linesNumber) { 090 this.linesNumber = linesNumber; 091 } 092 093 /** 094 * @return The {@link #creationOfSelfDocumentation} field value. 095 */ 096 public boolean isCreationOfSelfDocumentation() { 097 return creationOfSelfDocumentation; 098 } 099 100 /** 101 * @param creationOfSelfDocumentation see the {@link #creationOfSelfDocumentation} field 102 */ 103 public void setCreationOfSelfDocumentation(boolean creationOfSelfDocumentation) { 104 this.creationOfSelfDocumentation = creationOfSelfDocumentation; 105 } 106}