Class FindFileOrFolderPanel

  • All Implemented Interfaces:
    Referenceable

    public final class FindFileOrFolderPanel
    extends InstallPanelAction
    This panel implements a search process that, depending on specifications made by the setup author, searches portions of the file system for a specific named file or for a file that matches a certain pattern. The end user can also choose a matching file.
    • Constructor Detail

      • FindFileOrFolderPanel

        public FindFileOrFolderPanel()
    • Method Detail

      • setOnZeroResult

        public void setOnZeroResult​(FileFileOrFolderOnZeroResults reaction)
        Sets this action how to react to an unsuccessful search.
        Parameters:
        reaction - can be set to ASK_WITH_DIALOG or RETURN_EMPTY.
      • getOnZeroResult

        public FileFileOrFolderOnZeroResults getOnZeroResult()
        gets the action's instructions on how to react to an unsuccessful search.
        Returns:
        the integers ASK_WITH_DIALOG or RETURN_EMPTY.
      • setOnMultiResult

        public void setOnMultiResult​(FileFileOrFolderOnMultiResults reaction)
        sets this action on how to react to a multiple result search.
        Parameters:
        reaction - can be set to RETURN_FIRST, RETURN_LIST or ASK_WITH_DIALOG.
      • getOnMultiResult

        public FileFileOrFolderOnMultiResults getOnMultiResult()
        gets FindFileOrFolder's instructions on how to react to a multiple result search.
        Returns:
        the integers RETURN_FIRST, RETURN_LIST or ASK_WITH_DIALOG.
      • setFilenamePattern

        public void setFilenamePattern​(java.lang.String pattern)
        set the filename pattern for search.
        Parameters:
        String - the filename or regular expression to use in searching
      • getFilenamePattern

        public java.lang.String getFilenamePattern()
        gets the filename pattern for search.
        Returns:
        the filename or regular expression to search for.
      • getMagicFolder

        public DestinationFolder getMagicFolder()
        gets the magic folder
        Returns:
        the magic folder
      • setMagicFolder

        public void setMagicFolder​(DestinationFolder folder)
        sets the magic folder
        Parameters:
        folder - a disk path
      • setPathTail

        public void setPathTail​(java.lang.String path)
        sets the path tail to start searching from. This is what would go on the right of the magic folder.
        Parameters:
        path - a partial path
      • getPathTail

        public java.lang.String getPathTail()
        gets the path tail
        Returns:
        the path tail
      • setUseRecursion

        public void setUseRecursion​(boolean status)
        sets the disk searching procedure to use recursion (or not).
        Parameters:
        status - can be true or false
      • getAllowsUserOverride

        public boolean getAllowsUserOverride()
        MMA - 2001.09.25 Get whether or not the user is allowed to pre-empt searching and choose an item manually.
        Returns:
        boolean true or false
      • setAllowsUserOverride

        public void setAllowsUserOverride​(boolean override)
        MMA - 2001.09.25 Allow the user to pre-empt searching and choose an item manually (or not).
        Parameters:
        status - can be true or false
      • getUseRecursion

        public boolean getUseRecursion()
        Get the status of the use of recursion in the disk searching procedure.
        Returns:
        boolean true or false
      • setAllowRemoteDisk

        public void setAllowRemoteDisk​(boolean status)
        sets to allow the search procedure to search on mounted, remote volumes
        Parameters:
        status - can be true or false
      • getAllowRemoteDisk

        public boolean getAllowRemoteDisk()
        gets the status of the search procedure's ability to search on mounted, remote volumes
        Returns:
        boolean true or false
      • setFindType

        public void setFindType​(FileFileOrFolderFindType type)
        sets the type of disk entities to search for.
        Parameters:
        type - can be FIND_TYPE_ALL, FIND_TYPE_FILE, FIND_TYPE_FOLDER or FIND_TYPE_APPLICATION.
      • getFindType

        public FileFileOrFolderFindType getFindType()
        gets the current type of disk entities to search for.
        Returns:
        FIND_TYPE_ALL, FIND_TYPE_FILE, FIND_TYPE_FOLDER or FIND_TYPE_APPLICATION.
      • setAskPrompt

        public void setAskPrompt​(java.lang.String prompt)
        sets the prompt for the file dialog used when multiple results are returned from a search.
        Parameters:
        prompt - a prompt String.
      • getAskPrompt

        public java.lang.String getAskPrompt()
        gets the prompt for the file dialog used when multiple results are returned from a search.
        Returns:
        the prompt String.
      • setVariableName

        public void setVariableName​(java.lang.String name)
        sets the name of the Variable Manager variable which will hold the single path of the search results
        Parameters:
        variableName - a String which holds the name of the variable.
      • getVariableName

        public java.lang.String getVariableName()
        gets the name of the Variable Manager variable which will hold the single path of the search results
        Returns:
        a String of name of the Variable Manager variable.
      • getIsMatchTypeRegExpression

        public boolean getIsMatchTypeRegExpression()
        gets the status on whether the action is matching the search pattern with regular expression.
      • setIsMatchTypeRegExpression

        public void setIsMatchTypeRegExpression​(boolean whether)
        sets the action by matching the search pattern with regular expression.
      • getMagicFolderId

        public int getMagicFolderId()
        an id for the magic folder
      • setMagicFolderId

        public void setMagicFolderId​(int MagicFolderId)
        an id for the magic folder