/** * Initialize a HTML report for this Thread.<p> * * This method is reserved for older report threads that still use * XML templates to generate their output.<p> * * @param locale the locale for the report output messages */ protected void initOldHtmlReport(Locale locale) { m_report = new CmsHtmlReport(locale, m_cms.getRequestContext().getSiteRoot(), true, false); } }
/** * Initialize a HTML report for this Thread.<p> * * @param locale the locale for the report output messages */ protected void initHtmlReport(Locale locale) { m_report = new CmsHtmlReport(locale, m_cms.getRequestContext().getSiteRoot()); }
/** * Initialize a HTML report for this Thread.<p> * * @param locale the locale for the report output messages */ protected void initHtmlReport(Locale locale) { boolean isVaadin = A_CmsUI.get() != null; m_report = isVaadin ? new CmsVaadinHtmlReport(locale, m_cms.getRequestContext().getSiteRoot(), getLogChannel()) : new CmsHtmlReport(locale, m_cms.getRequestContext().getSiteRoot()); }
/** * Initialize a HTML report for this Thread.<p> * * This method is reserved for older report threads that still use * XML templates to generate their output.<p> * * @param locale the locale for the report output messages */ protected void initOldHtmlReport(Locale locale) { boolean isVaadin = A_CmsUI.get() != null; m_report = isVaadin ? new CmsVaadinHtmlReport(locale, m_cms.getRequestContext().getSiteRoot(), true, false, getLogChannel()) : new CmsHtmlReport(locale, m_cms.getRequestContext().getSiteRoot(), true, false); } }
/** * Publishes the given list of resources.<p> * * @param resources list of resources to publish * * @throws CmsException if something goes wrong */ public void publishResources(List<CmsResource> resources) throws CmsException { CmsObject cms = m_cms; I_CmsReport report = new CmsHtmlReport( cms.getRequestContext().getLocale(), cms.getRequestContext().getSiteRoot()); CmsPublishManager publishManager = OpenCms.getPublishManager(); CmsPublishList publishList = publishManager.getPublishListAll(m_cms, resources, false, true); OpenCms.getPublishManager().publishProject(m_cms, report, publishList); }
/** * Starts the publish thread for the project.<p> */ private void startPublishThread() { // create a publish thread from the current publish list CmsPublishList publishList = getSettings().getPublishList(); try { OpenCms.getPublishManager().publishProject( getCms(), new CmsHtmlReport(getLocale(), getCms().getRequestContext().getSiteRoot()), publishList); } catch (CmsException e) { throw new CmsRuntimeException(e.getMessageContainer()); } setParamAction(REPORT_END); setAction(ACTION_REPORT_END); setParamThreadHasNext(CmsStringUtil.FALSE); }
/** * @see org.opencms.workplace.CmsMultiDialog#performDialogOperation() */ @Override protected boolean performDialogOperation() throws CmsException { CmsPublishList publishList = getSettings().getPublishList(); if (publishList == null) { throw new CmsException(Messages.get().container( org.opencms.db.Messages.ERR_GET_PUBLISH_LIST_PROJECT_1, getProjectname())); } OpenCms.getPublishManager().publishProject( getCms(), new CmsHtmlReport(getLocale(), getCms().getRequestContext().getSiteRoot()), publishList); // wait 2 seconds, may be it finishes fast OpenCms.getPublishManager().waitWhileRunning(1500); return true; }
/** * @see org.opencms.workplace.CmsMultiDialog#performDialogOperation() */ @Override protected boolean performDialogOperation() throws CmsException { CmsPublishList publishList = getSettings().getPublishList(); if (publishList == null) { throw new CmsException( Messages.get().container(org.opencms.db.Messages.ERR_GET_PUBLISH_LIST_PROJECT_1, getProjectname())); } OpenCms.getPublishManager().publishProject( getCms(), new CmsHtmlReport(getLocale(), getCms().getRequestContext().getSiteRoot()), publishList); // wait 2 seconds, may be it finishes fast OpenCms.getPublishManager().waitWhileRunning(1500); return true; }
OpenCms.getPublishManager().publishProject( m_cms, new CmsHtmlReport(m_cms.getRequestContext().getLocale(), m_cms.getRequestContext().getSiteRoot()), shared, false);
/** * 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; }