Interface ViolationStore


@PublicAPI(usage=INHERITANCE)
public interface ViolationStore
Provides some sort of storage for violations to FreezingArchRule.
  • Method Summary

    Modifier and Type Method Description
    boolean contains​(ArchRule rule)  
    java.util.List<java.lang.String> getViolations​(ArchRule rule)  
    void initialize​(java.util.Properties properties)
    Provides custom initialization with properties derived from "archunit.properties" by considering the sub properties of freeze.store.
    void save​(ArchRule rule, java.util.List<java.lang.String> violations)
    Provides a way to initially store or later update violations of an ArchRule.
  • Method Details

    • initialize

      void initialize​(java.util.Properties properties)
      Provides custom initialization with properties derived from "archunit.properties" by considering the sub properties of freeze.store.

      If "archunit.properties" contains, e.g.,
      
       freeze.store.propOne=valueOne
       freeze.store.propTwo=valueTwo
       
      then this method will be called with properties containing
      
       propOne=valueOne
       propTwo=valueTwo
      Parameters:
      properties - The properties derived from the "archunit.properties" prefix freeze.store.
    • contains

      boolean contains​(ArchRule rule)
      Parameters:
      rule - An ArchRule
      Returns:
      true, if and only if this ViolationStore contains stored violations for the passed ArchRule
    • save

      void save​(ArchRule rule, java.util.List<java.lang.String> violations)
      Provides a way to initially store or later update violations of an ArchRule. If there are violations currently stored for the passed rule, those violations will be completely overwritten.
      Parameters:
      rule - An ArchRule to store violations for
      violations - A list of lines of violations of an ArchRule
    • getViolations

      java.util.List<java.lang.String> getViolations​(ArchRule rule)
      Parameters:
      rule - An ArchRule
      Returns:
      The lines of violations currently stored for the passed ArchRule