Interface DocumentComparator

    • Method Detail

      • compare

        void compare​(String sid,
                     File original,
                     File modified,
                     File dest)
              throws IOException
        Performs the comparison
        Parameters:
        sid - identifier of the session
        original - The original file
        modified - The modified file
        dest - The comparison output as PDF file
        Throws:
        IOException - error writing the temporary files or in the comparation
      • compare

        void compare​(String sid,
                     com.logicaldoc.core.document.Version originalVersion,
                     com.logicaldoc.core.document.Version modifiedVersion,
                     File dest)
              throws IOException,
                     com.logicaldoc.core.PersistenceException
        Performs the comparison
        Parameters:
        sid - The actual Session ID
        originalVersion - The original version
        modifiedVersion - The modified version
        dest - The comparison output as PDF file
        Throws:
        IOException - error writing the temporary files or in the comparation
        com.logicaldoc.core.PersistenceException
      • getParameterNames

        List<String> getParameterNames()
        Implementations should return the list of the required parameters. A parameter is stored in the context as comparator.SimpleClassName.parameter = value
        Returns:
        the list of configuration parameters
      • getParameters

        Map<String,​String> getParameters()
        Returns the map of parameters
        Returns:
        map of parameters
      • getParameter

        String getParameter​(String name)
        Gets the value of a parameter
        Parameters:
        name - name of the parameter
        Returns:
        value of the configuration parameter
      • loadParameters

        void loadParameters()
        Reads it's own parameters and stores them in the parameters map
      • isEnabled

        boolean isEnabled()
        Checks if the comparator is enabled or not
        Returns:
        the enabled status
      • setEnabled

        void setEnabled​(boolean enabled)
        Enables or disables the comparator
        Parameters:
        enabled - the new enabled status