Class AbstractMessageDigestBasedMonitor

    • Constructor Detail

      • AbstractMessageDigestBasedMonitor

        public AbstractMessageDigestBasedMonitor()
    • Method Detail

      • setType

        public void setType​(MessageDigestType value)
        Sets the type of digest to use.
        Parameters:
        value - the type
      • getType

        public MessageDigestType getType()
        Returns the type of digest to use.
        Returns:
        the type
      • typeTipText

        public String typeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • computeDigest

        protected abstract String computeDigest​(File file,
                                                MessageCollection errors)
        Generates the message digest, if possible.
        Parameters:
        file - the file to generate the digest for
        errors - for collecting any errors
        Returns:
        the digest
      • doInitialize

        protected String doInitialize​(File file)
        Performs the actual initialization of the monitor with the specified file.
        Specified by:
        doInitialize in class AbstractFileChangeMonitor
        Parameters:
        file - the file to initialize with
        Returns:
        null if successful, otherwise error message
      • checkChange

        protected boolean checkChange​(File file)
        Performs the actual check whether the file has changed.
        Specified by:
        checkChange in class AbstractFileChangeMonitor
        Parameters:
        file - the file to check
        Returns:
        true if changed
      • doUpdate

        protected String doUpdate​(File file)
        Performs the actual updating of the monitor with the specified file.
        Specified by:
        doUpdate in class AbstractFileChangeMonitor
        Parameters:
        file - the file to update with
        Returns:
        null if successful, otherwise error message