com.groupdocs.search.dictionaries

Class PasswordDictionary

    • Constructor Detail

      • PasswordDictionary

        protected PasswordDictionary(String filePath,
                                     boolean saveOnChange)

        Initializes a new instance of the PasswordDictionary class.

        Parameters:
        filePath - The file name.
        saveOnChange - The save on change flag.
    • Method Detail

      • getCount

        public abstract int getCount()

        Gets the number of elements contained in the dictionary.

        Returns:
        The number of elements contained in the dictionary.
      • getPassword

        public abstract String getPassword(String filePath)

        Gets the password for the file.

        Parameters:
        filePath - The file path.
        Returns:
        The password for the file.
      • clear

        public abstract void clear()

        Removes all passwords from this PasswordDictionary object.

      • contains

        public abstract boolean contains(String filePath)

        Determines whether the dictionary contains a password for the specified document.

        Parameters:
        filePath - The document file path.
        Returns:
        true if the dictionary contains a password for the document; otherwise, false.
      • add

        public abstract void add(String filePath,
                                 String password)

        Adds a password for a document to the dictionary.

        Parameters:
        filePath - The document file path.
        password - The document password.
      • remove

        public abstract boolean remove(String filePath)

        Removes a password of the specified document from the dictionary.

        Parameters:
        filePath - The document file path.
        Returns:
        true if the password was successfully removed; otherwise, false. This method also returns false if filePath was not found in the dictionary.
      • iterator

        public abstract Iterator<String> iterator()

        Returns an iterator that iterates through the collection.

        Specified by:
        iterator in interface Iterable<String>
        Returns:
        An iterator that can be used to iterate through the collection.