Class TextFileBasedViolationStore

java.lang.Object
com.tngtech.archunit.library.freeze.TextFileBasedViolationStore
All Implemented Interfaces:
ViolationStore

@PublicAPI(usage=ACCESS) public final class TextFileBasedViolationStore extends Object implements ViolationStore
A text file based implementation of a ViolationStore.
This ViolationStore will store the violations of every single FreezingArchRule in a dedicated file.
It will keep an index of all stored rules as well as a mapping to the individual rule violation files in the same folder.
By default, the layout within the configured store folder will look like:

 storeFolder
   |-- stored.rules (the index file of all stored rules)
   |-- 6fc2fd04-b3ab-44e0-8f78-215c66f2174a (a rule violation file named randomly by UUID and referenced from stored.rules)
   |-- 2186b43a-c24c-417d-bd96-547e2dfdba1c (another rule violation file)
   |-- ... (more rule violation files for every rule that has been stored so far)
 
To adjust the strategy how the individual rule violation files are named use the constructor TextFileBasedViolationStore(RuleViolationFileNameStrategy).
This ViolationStore can be configured through the following properties:

 default.path=...               # string: the path of the folder where violation files will be stored
 default.allowStoreCreation=... # boolean: whether to allow creating a new index file
 default.allowStoreUpdate=...   # boolean: whether to allow updating any store file