Class SuppressionFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String file
      Filename of supression file.
      private FilterSet filters
      Set of individual suppresses.
      private boolean optional
      Tells whether config file existence is optional.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(AuditEvent event)
      Determines whether or not a filtered AuditEvent is accepted.
      boolean equals​(java.lang.Object obj)  
      protected void finishLocalSetup()
      Provides a hook to finish the part of this component's setup that was not handled by the bean introspection.
      java.util.Set<java.lang.String> getExternalResourceLocations()
      Returns a set of external configuration resource locations which are used by the module.
      int hashCode()  
      void setFile​(java.lang.String fileName)
      Sets name of the supression file.
      void setOptional​(boolean optional)
      Sets whether config file existence is optional.
      private static boolean suppressionSourceExists​(java.lang.String fileName)
      Checks if suppression source with given fileName exists.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • file

        private java.lang.String file
        Filename of supression file.
      • optional

        private boolean optional
        Tells whether config file existence is optional.
      • filters

        private FilterSet filters
        Set of individual suppresses.
    • Constructor Detail

      • SuppressionFilter

        public SuppressionFilter()
    • Method Detail

      • setFile

        public void setFile​(java.lang.String fileName)
        Sets name of the supression file.
        Parameters:
        fileName - name of the suppressions file.
      • setOptional

        public void setOptional​(boolean optional)
        Sets whether config file existence is optional.
        Parameters:
        optional - tells if config file existence is optional.
      • accept

        public boolean accept​(AuditEvent event)
        Description copied from interface: Filter
        Determines whether or not a filtered AuditEvent is accepted.
        Specified by:
        accept in interface Filter
        Parameters:
        event - the AuditEvent to filter.
        Returns:
        true if the event is accepted.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getExternalResourceLocations

        public java.util.Set<java.lang.String> getExternalResourceLocations()
        Description copied from interface: ExternalResourceHolder
        Returns a set of external configuration resource locations which are used by the module. ATTENTION! If 'getExternalResourceLocations()' return null, there will be NullPointerException in Checker. Such behaviour will signal that your module (check or filter) is designed incorrectly. It make sense to return an empty set from 'getExternalResourceLocations()' only for composite modules like TreeWalker.
        Specified by:
        getExternalResourceLocations in interface ExternalResourceHolder
        Returns:
        a set of external configuration resource locations which are used by the module.
      • suppressionSourceExists

        private static boolean suppressionSourceExists​(java.lang.String fileName)
        Checks if suppression source with given fileName exists.
        Parameters:
        fileName - name of the suppressions file.
        Returns:
        true if suppression file exists, otherwise false