public synchronized void exportFullStaticRender(boolean purgeFirst, I_CmsReport report)
    throws CmsException, IOException, ServletException {

        // set member to true to get temporary export paths for rules
        m_fullStaticExport = true;
        // save the real export path
        String staticExportPathStore = m_staticExportPath;

        if (m_useTempDirs) {
            // set the export path to the export work path
            m_staticExportPath = m_staticExportWorkPath;
        }

        // delete all old exports if the purgeFirst flag is set
        if (purgeFirst) {
            Map<String, Object> eventData = new HashMap<String, Object>();
            eventData.put(I_CmsEventListener.KEY_REPORT, report);
            CmsEvent clearCacheEvent = new CmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, eventData);
            OpenCms.fireCmsEvent(clearCacheEvent);

            scrubExportFolders(report);
            // this will always use the root site
            CmsObject cms = OpenCms.initCmsObject(OpenCms.getDefaultUsers().getUserExport());
            cms.deleteAllStaticExportPublishedResources(EXPORT_LINK_WITHOUT_PARAMETER);
            cms.deleteAllStaticExportPublishedResources(EXPORT_LINK_WITH_PARAMETER);
        }

        // do the export
        CmsAfterPublishStaticExportHandler handler = new CmsAfterPublishStaticExportHandler();
        // export everything
        handler.doExportAfterPublish(null, report);

        // set export path to the original one
        m_staticExportPath = staticExportPathStore;

        // set member to false for further exports
        m_fullStaticExport = false;

        // check if report contents no errors
        if (m_useTempDirs && !report.hasError()) {
            // backup old export folders for default export
            File staticExport = new File(m_staticExportPath);
            createExportBackupFolders(staticExport, m_staticExportPath, getExportBackups().intValue(), null);

            // change the name of the used temporary export folder to the original default export path
            File staticExportWork = new File(m_staticExportWorkPath);
            staticExportWork.renameTo(new File(m_staticExportPath));

            // backup old export folders of rule based exports
            Iterator<CmsStaticExportRfsRule> it = m_rfsRules.iterator();
            while (it.hasNext()) {
                CmsStaticExportRfsRule rule = it.next();
                File staticExportRule = new File(rule.getExportPath());
                File staticExportWorkRule = new File(rule.getExportWorkPath());
                // only backup if a temporary folder exists for this rule
                if (staticExportWorkRule.exists()) {
                    createExportBackupFolders(
                        staticExportRule,
                        rule.getExportPath(),
                        rule.getExportBackups().intValue(),
                        OpenCms.getResourceManager().getFileTranslator().translateResource(rule.getName()));
                    staticExportWorkRule.renameTo(new File(rule.getExportPath()));
                }
            }
        } else if (report.hasError()) {
            report.println(Messages.get().container(Messages.ERR_EXPORT_NOT_SUCCESSFUL_0), I_CmsReport.FORMAT_WARNING);
        }
    }
public synchronized void exportFullStaticRender ( boolean purgeFirst , I_CmsReport report ) throws CmsException , IOException , ServletException { m_fullStaticExport = true ; String staticExportPathStore = m_staticExportPath ; if ( m_useTempDirs ) { m_staticExportPath = m_staticExportWorkPath ; } if ( purgeFirst ) { Map < String , Object > eventData = new HashMap < String , Object > ( ) ; eventData . put ( I_CmsEventListener . KEY_REPORT , report ) ; CmsEvent clearCacheEvent = new CmsEvent ( I_CmsEventListener . EVENT_CLEAR_CACHES , eventData ) ; OpenCms . fireCmsEvent ( clearCacheEvent ) ; scrubExportFolders ( report ) ; CmsObject cms = OpenCms . initCmsObject ( OpenCms . getDefaultUsers ( ) . getUserExport ( ) ) ; cms . deleteAllStaticExportPublishedResources ( EXPORT_LINK_WITHOUT_PARAMETER ) ; cms . deleteAllStaticExportPublishedResources ( EXPORT_LINK_WITH_PARAMETER ) ; } CmsAfterPublishStaticExportHandler handler = new CmsAfterPublishStaticExportHandler ( ) ; handler . doExportAfterPublish ( null , report ) ; m_staticExportPath = staticExportPathStore ; m_fullStaticExport = false ; if ( m_useTempDirs && ! report . hasError ( ) ) { File staticExport = new File ( m_staticExportPath ) ; createExportBackupFolders ( staticExport , m_staticExportPath , getExportBackups ( ) . intValue ( ) , null ) ; File staticExportWork = new File ( m_staticExportWorkPath ) ; staticExportWork . renameTo ( new File ( m_staticExportPath ) ) ; Iterator < CmsStaticExportRfsRule > it = m_rfsRules . iterator ( ) ; while ( it . hasNext ( ) ) { CmsStaticExportRfsRule rule = it . next ( ) ; File staticExportRule = new File ( rule . getExportPath ( ) ) ; File staticExportWorkRule = new File ( rule . getExportWorkPath ( ) ) ; if ( staticExportWorkRule . exists ( ) ) { createExportBackupFolders ( staticExportRule , rule . getExportPath ( ) , rule . getExportBackups ( ) . intValue ( ) , OpenCms . getResourceManager ( ) . getFileTranslator ( ) . translateResource ( rule . getName ( ) ) ) ; staticExportWorkRule . renameTo ( new File ( rule . getExportPath ( ) ) ) ; } } } else if ( report . hasError ( ) ) { report . println ( Messages . get ( ) . container ( Messages . ERR_EXPORT_NOT_SUCCESSFUL_0 ) , I_CmsReport . FORMAT_WARNING ) ; } }
Starts a complete static export of all resources.<p>

@param purgeFirst flag to delete all resources in the export folder of the rfs
@param report an I_CmsReport instance to print output message, or null to write messages to the log file

@throws CmsException in case of errors accessing the VFS
@throws IOException in case of errors writing to the export output stream
@throws ServletException in case of errors accessing the servlet