/** * Creates a new report for an export/import.<p> * * @return the new report */ private I_CmsReport createReport() { return new CmsLogReport(Locale.ENGLISH, CmsModuleImportExportRepository.class); }
/** * Returns the report in the given event data, if <code>null</code> * a new log report is used.<p> * * @param event the event to get the report for * * @return the report */ private I_CmsReport getEventReport(CmsEvent event) { I_CmsReport report = null; if (event.getData() != null) { report = (I_CmsReport)event.getData().get(I_CmsEventListener.KEY_REPORT); } if (report == null) { report = new CmsLogReport(Locale.ENGLISH, getClass()); } return report; }
/** * Returns the report in the given event data, if <code>null</code> * a new log report is used.<p> * * @param event the event to get the report for * * @return the report */ private I_CmsReport getEventReport(CmsEvent event) { I_CmsReport report = null; if (event.getData() != null) { report = (I_CmsReport)event.getData().get(I_CmsEventListener.KEY_REPORT); } if (report == null) { report = new CmsLogReport(Locale.ENGLISH, getClass()); } return report; }
/** * This method is called by the cron scheduler.<p> * * @param cms a OpenCms context object * @param parameters link check parameters * @return the String that is written to the OpenCms log * @throws CmsException if something goes wrong */ public String launch(CmsObject cms, Map parameters) throws CmsException { if (Boolean.valueOf((String)parameters.get("writeLog")).booleanValue()) { m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class); } validateLinks(cms); return "CmsExternLinkValidator.launch(): Links checked."; }
/** * This method is called by the cron scheduler.<p> * * @param cms a OpenCms context object * @param parameters link check parameters * @return the String that is written to the OpenCms log * @throws CmsException if something goes wrong */ public String launch(CmsObject cms, Map<String, String> parameters) throws CmsException { if (Boolean.valueOf(parameters.get("writeLog")).booleanValue()) { m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class); } validateLinks(cms); return "CmsExternLinkValidator.launch(): Links checked."; }
m_logReport = new CmsLogReport(locale, logChannel);
CmsLogReport report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsHistoryClearJob.class);
CmsLogReport report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsHistoryClearJob.class);
report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsSearchManager.class);
report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsSearchManager.class);
/** * @see java.lang.Thread#run() */ @Override public void run() { // create a log report for the output I_CmsReport report = new CmsLogReport(m_adminCms.getRequestContext().getLocale(), CmsSearchManager.class); try { while (m_isAlive) { List<CmsPublishedResource> resourcesToIndex = getResourcesToIndex(); if (resourcesToIndex.size() > 0) { // only start indexing if there is at least one resource updateIndexOffline(report, resourcesToIndex); } try { sleep(OpenCms.getSearchManager().getOfflineUpdateFrequency()); } catch (InterruptedException e) { // continue the thread after interruption } } } finally { // make sure that live status is reset in case of Exceptions m_isAlive = false; } }
report = new CmsLogReport(CmsLocaleManager.getDefaultLocale(), getClass());
I_CmsReport report = new CmsLogReport(m_adminCms.getRequestContext().getLocale(), CmsSearchManager.class); long offlineUpdateFrequency = getOfflineUpdateFrequency(); m_updateTriggered = false;
CmsProject project = cms.getRequestContext().getCurrentProject(); CmsLogReport report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsPublishJob.class);
report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsStaticExportJob.class); OpenCms.getStaticExportManager().exportFullStaticRender(true, report); Map<String, Object> eventData = new HashMap<String, Object>();
m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class);
report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsStaticExportJob.class); OpenCms.getStaticExportManager().exportFullStaticRender(true, report); Map eventData = new HashMap();
cms.getRequestContext().setCurrentProject(project); I_CmsReport report = new CmsLogReport( cms.getRequestContext().getLocale(), CmsDeleteExpiredResourcesJob.class);
/** * Copies language nodes in XML contents.<p> * * @param cms the current cms context * @param copyResources the resources to copy * @param delete the delete flag * @param sourceLanguage the source language * @param targetLanguage the target language */ public CmsLanguageCopyThread( final CmsObject cms, String[] copyResources, boolean delete, String sourceLanguage, String targetLanguage) { super(cms, Messages.get().getBundle().key(Messages.GUI_REPORT_LANGUAGECOPY_NAME_0)); m_copyresources = copyResources; m_sourceLanguage = sourceLanguage; m_targetLanguage = targetLanguage; m_delete = delete; initHtmlReport(cms.getRequestContext().getLocale()); CmsMultiplexReport report = new CmsMultiplexReport(); Locale locale = cms.getRequestContext().getLocale(); report.addReport(new CmsHtmlReport(locale, cms.getRequestContext().getSiteRoot())); report.addReport(new CmsLogReport(locale, CmsLanguageCopyThread.class)); m_report = report; }
/** * Finishes the session and publishes the changed resources if necessary.<p> * * @throws CmsException if something goes wrong */ public void finish() throws CmsException { m_finished = true; m_requiresCleanup = false; CmsProject project = getProject(); CmsObject projectCms = OpenCms.initCmsObject(m_adminCms); projectCms.getRequestContext().setCurrentProject(project); if (m_configuration.isAutoPublish()) { // we don't necessarily publish with the user who has the locks on the resources, so we need to steal the locks List<CmsResource> projectResources = projectCms.readProjectView(project.getUuid(), CmsResource.STATE_KEEP); for (CmsResource projectResource : projectResources) { CmsLock lock = projectCms.getLock(projectResource); if (!lock.isUnlocked() && !lock.isLockableBy(projectCms.getRequestContext().getCurrentUser())) { projectCms.changeLock(projectResource); } } OpenCms.getPublishManager().publishProject( projectCms, new CmsLogReport(Locale.ENGLISH, CmsUgcSession.class)); } else { // try to unlock everything - we don't need this in case of auto-publish, since publishing already unlocks the resources projectCms.unlockProject(project.getUuid()); } }