Interface DomainFileFilter

All Superinterfaces:
DomainFolderFilter
All Known Implementing Classes:
DefaultDomainFileFilter

public interface DomainFileFilter extends DomainFolderFilter
DomainFileFilter interface to indicate whether a domain file should be included in a list or set of domain files. This interface extends DomainFolderFilter which also controls the following of linked-folders.

Without specific overrides the default behavior:

The specific handling of link-files is determined by the consumer of this filter.

  • Field Details

    • ALL_FILES_FILTER

      static final DomainFileFilter ALL_FILES_FILTER
      File filter which accepts all files, including all external file-links, and allows opening/expanding of external folder-links. All broken links are ignored.
    • ALL_FILES_NO_EXTERNAL_FOLDERS_FILTER

      static final DomainFileFilter ALL_FILES_NO_EXTERNAL_FOLDERS_FILTER
      File filter which accepts all files, including all external file-links, but does not allow opening/expanding of external folder-links. All broken links are ignored.
    • ALL_INTERNAL_FILES_FILTER

      static final DomainFileFilter ALL_INTERNAL_FILES_FILTER
      File filter which allows all internal folders and files. All external and broken links are ignored. This filter is useful when selecting a file with an arbitrary content type. If targeting a specific file content type the use of DefaultDomainFileFilter may be preferred.
    • NON_LINKED_FILE_FILTER

      static final DomainFileFilter NON_LINKED_FILE_FILTER
      File filter which allows all non-linked internal folders and files. All links are ignored. This filter is useful if code does not handle some of the implications of following links such as:
      • External repository authentication
      • Processing the same project content more than once or lack of support for link-files
      If targeting a specific file content type the use of DefaultDomainFileFilter may be preferred.
  • Method Details

    • accept

      boolean accept(DomainFile df)
      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.

      Parameters:
      df - The domain file to be tested
      Returns:
      true if and only if df
    • followExternallyLinkedFolders

      default boolean followExternallyLinkedFolders()
      Check if the children of an externally-linked folder should be loaded/processed.

      If this method is not implemented the value returned is NOT-DomainFolderFilter.ignoreExternalLinks() AND NOT-DomainFolderFilter.ignoreFolderLinks().

      NOTE: Following an external link utilizes the application's active project to retain and external project as one of it's viewed-projects. In the process of accessing a viewed-project the user may be required to authenticate to a remote server.

      Returns:
      true if children of an externally-linked folder should be traversed or displayed (subject to a successful connection to the referenced project or server-based repository).