Class CheckFileFolderAttributesRule

  • All Implemented Interfaces:
    Referenceable

    public final class CheckFileFolderAttributesRule
    extends Rule
    This Rule checks to see if the file/folder as specified by a path meets the criteria as set forth by this rule. Rule criteria includes: - Whether the specified object is a file or a folder - Whether the file exists (or does not exist) - if looking for a folder, whether that folder is writeable/writeable. - if looking for a file, whether that file is readable/writeable.
    • Constructor Detail

      • CheckFileFolderAttributesRule

        public CheckFileFolderAttributesRule()
    • Method Detail

      • setPath

        public void setPath​(java.lang.String newPath)
        To set file/folder path to be evaluated.
      • getPath

        public java.lang.String getPath()
        To get file/folder path to be evaluated.
      • setPerformFileFolderTypeCheck

        public void setPerformFileFolderTypeCheck​(boolean newCheckIsFileFolder)
        To set whether to perform file/folder type check.
        Parameters:
        newCheckIsFileFolder - true to perform check on whether the specified path is a file or folder
      • getPerformFileFolderTypeCheck

        public boolean getPerformFileFolderTypeCheck()
        To get whether to perform file/folder type check.
        Returns:
        true to perform check on whether the specified path is a file or folder
      • setFileFolderTypeCheck

        public void setFileFolderTypeCheck​(boolean newIsFile)
        To set to check whether the file/folder type is a file.
        Parameters:
        newIsFile - true to check if the specified path is a file. false to check if the specified path is a folder.
      • getFileFolderTypeCheck

        public boolean getFileFolderTypeCheck()
        To get to check whether the file/folder type is a file.
        Returns:
        true to check if the specified path is a file. False to check if the specified path is a folder.
      • setFolderIsEmpty

        public void setFolderIsEmpty​(boolean newisEmpty)
        To set to check whether the file/folder type is a file.
        Parameters:
        newIsFile - true to check if the specified path is empty. false to check if the specified path is not empty.
      • getFolderIsEmpty

        public boolean getFolderIsEmpty()
        To get to check whether the file/folder type is a file.
        Returns:
        true to check if the specified path empty. False to check if the specified path is not empty.
      • setPerformFileFolderExistenceCheck

        public void setPerformFileFolderExistenceCheck​(boolean newCheckExists)
        To set whether file/file existence check should be performed.
        Parameters:
        newCheckExists - true to perform if file/folder existence check
      • getPerformFileFolderExistenceCheck

        public boolean getPerformFileFolderExistenceCheck()
        To get whether file/file existence check should be performed.
      • setCheckIfFileFolderAlreadyExists

        public void setCheckIfFileFolderAlreadyExists​(boolean newExists)
        To set whether the rule will evaluate as true if file/folder existed
      • getCheckIfFileFolderAlreadyExists

        public boolean getCheckIfFileFolderAlreadyExists()
        To get whether the rule will evaluate as true if file/folder existed
      • setPerformFileReadWriteAttributeCheck

        public void setPerformFileReadWriteAttributeCheck​(boolean newCheckReadWrite)
        To set whether this rule should evaluate the read/write attribute of the file.
      • getPerformFileReadWriteAttributeCheck

        public boolean getPerformFileReadWriteAttributeCheck()
        To get whether this rule should evaluate the read/write attribute of the file.
      • setIsReadable

        public void setIsReadable​(boolean newIsReadable)
        To set whether this rule should check whether the file is readable.
      • getIsReadable

        public boolean getIsReadable()
        To get whether this rule should check whether the file is readable.
      • setIsWriteable

        public void setIsWriteable​(boolean newIsWriteable)
        To set whether this rule should check whether the file is writable.
      • getIsWriteable

        public boolean getIsWriteable()
        To get whether this rule should check whether the file is writable.
      • setPerformInUseCheck

        public void setPerformInUseCheck​(boolean checkInUse)
        To set whether this rule should evaluate if the file is in use.
      • getPerformInUseCheck

        public boolean getPerformInUseCheck()
        To get whether this rule should evaluate if the file is in use.
      • setCheckInUse

        public void setCheckInUse​(boolean checksInUseNotNotInUse)
        To set whether the rule should expect in use(true) or expect not in use(false)
      • getCheckInUse

        public boolean getCheckInUse()
        To get whether the rule should expect in use(true) or expect not in use(false)