Class FileBasedScriptingEngine

    • Field Detail

      • m_Incoming

        protected PlaceholderDirectory m_Incoming
        the directory to monitor for incoming commands.
      • m_Processing

        protected PlaceholderDirectory m_Processing
        the directory containing the elements being processed.
      • m_Processed

        protected PlaceholderDirectory m_Processed
        the directory containing the elements that were processed successfully.
      • m_Failed

        protected PlaceholderDirectory m_Failed
        the directory containing the elements that couldn't be processed.
      • m_AtomicMove

        protected boolean m_AtomicMove
        whether to perform an atomic move.
    • Constructor Detail

      • FileBasedScriptingEngine

        public FileBasedScriptingEngine()
    • Method Detail

      • setIncoming

        public void setIncoming​(PlaceholderDirectory value)
        Sets the directory to monitor.
        Parameters:
        value - the directory
      • getIncoming

        public PlaceholderDirectory getIncoming()
        Returns the directory to monitor.
        Returns:
        the directory
      • incomingTipText

        public String incomingTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setProcessing

        public void setProcessing​(PlaceholderDirectory value)
        Sets the "processing" directory.
        Parameters:
        value - the directory
      • getProcessing

        public PlaceholderDirectory getProcessing()
        Returns the "processing" directory.
        Returns:
        the directory
      • processingTipText

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

        public void setProcessed​(PlaceholderDirectory value)
        Sets the "processed" directory.
        Parameters:
        value - the directory
      • getProcessed

        public PlaceholderDirectory getProcessed()
        Returns the "processed" directory.
        Returns:
        the directory
      • processedTipText

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

        public void setFailed​(PlaceholderDirectory value)
        Sets the "failed" directory.
        Parameters:
        value - the directory
      • getFailed

        public PlaceholderDirectory getFailed()
        Returns the "failed" directory.
        Returns:
        the directory
      • failedTipText

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

        public void setAtomicMove​(boolean value)
        Sets whether to attempt atomic move operation.
        Parameters:
        value - if true then attempt atomic move operation
      • getAtomicMove

        public boolean getAtomicMove()
        Returns whether to attempt atomic move operation.
        Returns:
        true if to attempt atomic move operation
      • atomicMoveTipText

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

        protected File prepareData​(File file)
        Moves the data to the "processing" directory.
        Parameters:
        file - the file/dir to move
        Returns:
        the new location
      • processData

        protected boolean processData​(File file)
        Processes the given data.
        Parameters:
        file - the file/dir to process
        Returns:
        true if everything went alright
      • postProcessData

        protected boolean postProcessData​(File file,
                                          boolean success)
        Post-processes the data.
        Parameters:
        file - the file to finish up
        success - whether processing was successful
        Returns:
        true if successful
      • doExecute

        protected String doExecute()
        Executes the scripting engine.
        Specified by:
        doExecute in class AbstractScriptingEngine
        Returns:
        error message in case of failure to start up or run, otherwise null
      • main

        public static void main​(String[] args)
        Starts the scripting engine from commandline.
        Parameters:
        args - additional options for the scripting engine