/**
     * @param SQLIImportHandlerOptions $options
     */
    public function __construct( SQLIImportHandlerOptions $options = null )
    {
        parent::__construct( $options );

        $ftpFolder       = 'oscar1';
        $modeUAT         = false;
        $this->startDate = microtime( true );

        if ( $this->importINI->hasVariable( 'XMLImportSettings', 'ModeUAT' )
             && $this->importINI->variable( 'XMLImportSettings', 'ModeUAT' ) == 'enabled' )
        {
            $modeUAT = true;
        }

        if ( is_object($this->options) )
        {
            if ( $this->options->hasAttribute( 'reportLevel' ) && is_numeric($reportLevel = $this->options->attribute( 'reportLevel' )) )
                XMLImportMonitor::setReportLevel( $reportLevel );

            if ( $this->options->hasAttribute( 'ftpFolder' ) && in_array($this->options->attribute( 'ftpFolder' ),array('oscar1','oscar2') ) )
                $ftpFolder = $this->options->attribute( 'ftpFolder' );
        }

        $this->rootImportFolder = $ftpFolder;

        // Initialize sqliImportItem Statistics and logs
        XMLImportDB::init( $this->importINI );
        XMLImportMapping::init( $this->importINI );
        eZLog::setMaxLogSize( 2000000 );
        eZLog::setLogrotateFiles( 20 );
        XMLImportMonitor::setOrigin($ftpFolder);
        XMLImportMonitor::setSQLiImportItem( $this->getCurrentSQLiImportItem() );
        XMLImportMonitor::pushStatistic( 'start_date', time() );

        $this->fileHandler = XMLImportFileHandler::instance($this->importINI, $ftpFolder, $modeUAT);
        XMLImportDataHandler::setIni ( $this->importINI );
        XMLImportDataHandler::setFileHandler ( $this->fileHandler );
    }
    /**
     * Runs the defined error module
     * Sets the state of the module object to \c failed and sets the error code.
     *
     * @param mixed $errorCode
     * @param mixed $errorType
     * @param array $parameters
     * @param mixed $userParameters
     *
     * @see setErrorModule(), errorModule()
     */
    function handleError( $errorCode, $errorType = false, $parameters = array(), $userParameters = false )
    {
        if ( !$errorType )
        {
            eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.", __METHOD__ );
            $errorType = 'kernel';
        }
        $errorModule = $this->errorModule();

        $module = eZModule::findModule( $errorModule['module'], $this );

        if ( $module === null )
        {
            return false;
        }

        if ( $errorCode == eZError::KERNEL_ACCESS_DENIED )
        {
            eZLog::setMaxLogSize( 10 * 1024 * 1024 );
            eZLog::write("Request : " . var_export($_REQUEST, true), 'access_denied.log');
            eZLog::write('Server : ' . var_export($_SERVER, true), 'access_denied.log');
            eZLog::write("Env : " . var_export($_ENV, true), 'access_denied.log');
        }
        elseif ( $errorCode == eZError::KERNEL_MODULE_NOT_FOUND )
        {
            eZLog::setMaxLogSize( 10 * 1024 * 1024 );
            eZLog::write("Request : " . var_export($_REQUEST, true), 'module_not_found.log');
            eZLog::write('Server : ' . var_export($_SERVER, true), 'module_not_found.log');
            eZLog::write("Env : " . var_export($_ENV, true), 'module_not_found.log');
        }

        $result = $module->run( $errorModule['view'], array( $errorType, $errorCode, $parameters, $userParameters ) );
        // The error module may want to redirect to another URL, see error.ini
        if ( $this->exitStatus() != eZModule::STATUS_REDIRECT and
             $this->exitStatus() != eZModule::STATUS_RERUN )
        {
            $this->setExitStatus( eZModule::STATUS_FAILED );
            $this->setErrorCode( $errorCode );
        }
        return $result;
    }