Class DefaultDomainFileFilter

java.lang.Object
ghidra.framework.model.DefaultDomainFileFilter
All Implemented Interfaces:
DomainFileFilter, DomainFolderFilter

public class DefaultDomainFileFilter extends Object implements DomainFileFilter
DefaultDomainFileFilter provides a simple default domain file filter which accepts files for a specified domain object interface class.
  • Constructor Details

    • DefaultDomainFileFilter

      public DefaultDomainFileFilter(Class<? extends DomainObject> domainObjectClass, boolean ignoreExternalLinks)
      Construct a DomainFileFilter which accepts a specific domain object interface class and either shows or hides external links. If external links are not ignored the filter will allow following external folder-links into other projects or server repositories. Note that this should be enabled carefully since it may required proper repository authentication support to facilitate access. Broken links are always ignored and all internal linked-folders and linked-files will be followed/processed.
      Parameters:
      domainObjectClass - domain object interface class. May be null to disallow all files (i.e., only folders and folder-links are shown).
      ignoreExternalLinks - true to ignore/skip external links, else they will be shown/processed and opening/following such links will be supported.
  • Method Details

    • accept

      public boolean accept(DomainFile file)
      Description copied from interface: DomainFileFilter
      Tests whether or not the specified domain file should be included in a domain file list. Since link-files will also be subject to this constraint the ability to handle or follow such links must be considered.

      NOTE: File-links have the same DomainFile.getDomainObjectClass() as the file they refer to, while their DomainFile.getContentType() is specific to their LinkHandler implementation.

      Specified by:
      accept in interface DomainFileFilter
      Parameters:
      file - The domain file to be tested
      Returns:
      true if and only if df
    • ignoreExternalLinks

      public boolean ignoreExternalLinks()
      Description copied from interface: DomainFolderFilter
      Check if link-files should be ignored if the link is external (i.e., Ghidra-URL). Multi-level internal links are followed within the same project before a determination is made.

      If this method is not implemented the default behavior will ignore external links. This method should be ignored for folder-links if DomainFolderFilter.ignoreFolderLinks() returns true.

      Specified by:
      ignoreExternalLinks in interface DomainFolderFilter
      Returns:
      true if external links should be ignored (i.e., not displayed)