Class DocumentSelectionOption.FolderOrDocuments

  • Enclosing class:
    DocumentSelectionOption

    public static class DocumentSelectionOption.FolderOrDocuments
    extends java.lang.Object
    The value type for DocumentSelectionOption which represents either a list of selected documents or a single selected folder which contains some documents of the correct type. To get the selected documents regardless of whether a folder is selected use DocumentSelectionOption.getDocuments().
    • Constructor Detail

      • FolderOrDocuments

        public FolderOrDocuments​(WritableDatabaseService folder)
        Create a FolderOrDocuments for a folder selection
        Parameters:
        folder - the selected folder
      • FolderOrDocuments

        public FolderOrDocuments​(java.util.List<AnnotatedPluginDocument> documents)
        Create a FolderOrDocuments for a selection of documents
        Parameters:
        documents - the selected documents
      • FolderOrDocuments

        public FolderOrDocuments​(AnnotatedPluginDocument document)
        Create a FolderOrDocuments for a selection of one document
        Parameters:
        document - the selected document
    • Method Detail

      • getFolder

        public WritableDatabaseService getFolder()
        Get the selected folder or null if a folder was not selected (documents are selected). Of getFolder() and getDocuments(), one will always return a non-null value while the other will return null.

        To get the selected documents regardless of whether a folder is selected use DocumentSelectionOption.getDocuments().

        Returns:
        the selected folder or null if a folder is not selected (documents are selected)
      • getDocuments

        public java.util.List<AnnotatedPluginDocument> getDocuments()
        Get the selected documents or null if documents are not selected (a folder is selected). Of getFolder() and getDocuments(), one will always return a non-null value while the other will return null.

        To get the selected documents regardless of whether a folder is selected use DocumentSelectionOption.getDocuments().

        Returns:
        the selected documents or null if documents are not selected (a folder is selected)
      • equals

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

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