/** * @see org.opencms.workplace.editors.CmsEditor#actionClear(boolean) */ @Override public void actionClear(boolean forceUnlock) { // delete the temporary file deleteTempFile(); boolean directEditMode = Boolean.valueOf(getParamDirectedit()).booleanValue(); boolean modified = Boolean.valueOf(getParamModified()).booleanValue(); if (directEditMode || forceUnlock || !modified) { // unlock the resource when in direct edit mode, force unlock is true or resource was not modified try { getCms().unlockResource(getParamResource()); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
/** * @see org.opencms.workplace.editors.CmsEditor#actionClear(boolean) */ @Override public void actionClear(boolean forceUnlock) { // delete the temporary file deleteTempFile(); boolean directEditMode = Boolean.valueOf(getParamDirectedit()).booleanValue(); boolean modified = Boolean.valueOf(getParamModified()).booleanValue(); if (directEditMode || forceUnlock || !modified) { // unlock the resource when in direct edit mode, force unlock is true or resource was not modified try { getCms().unlockResource(getParamResource()); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
/** * Returns the list of active elements of the page.<p> * * @return the list of active elements of the page */ protected List getElementList() { if (m_elementList == null) { m_elementList = CmsDialogElements.computeElements(getCms(), m_page, getParamTempfile(), getElementLocale()); } return m_elementList; }
/** * Returns the list of active elements of the page.<p> * * @return the list of active elements of the page */ protected List<CmsDialogElement> getElementList() { if (m_elementList == null) { m_elementList = CmsDialogElements.computeElements(getCms(), m_page, getParamTempfile(), getElementLocale()); } return m_elementList; }
while (i.hasNext()) { I_CmsEditorCssHandler cssHandler = i.next(); if (cssHandler.matches(getCms(), getParamTempfile())) { m_uriStyleSheet = cssHandler.getUriStyleSheet(getCms(), getParamTempfile()); break; m_uriStyleSheet = getCms().readPropertyObject( currentTemplate, CmsPropertyDefinition.PROPERTY_TEMPLATE,
while (i.hasNext()) { I_CmsEditorCssHandler cssHandler = (I_CmsEditorCssHandler)i.next(); if (cssHandler.matches(getCms(), getParamTempfile())) { m_uriStyleSheet = cssHandler.getUriStyleSheet(getCms(), getParamTempfile()); break; m_uriStyleSheet = getCms().readPropertyObject( currentTemplate, CmsPropertyDefinition.PROPERTY_TEMPLATE,
/** * Returns the OpenCms VFS uri of the template of the current page.<p> * * @return the OpenCms VFS uri of the template of the current page */ public String getUriTemplate() { String result = ""; try { result = getCms().readPropertyObject(getParamTempfile(), CmsPropertyDefinition.PROPERTY_TEMPLATE, true).getValue( ""); } catch (CmsException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_TEMPLATE_PROP_FAILED_0), e); } return result; }
/** * Returns the OpenCms VFS uri of the template of the current page.<p> * * @return the OpenCms VFS uri of the template of the current page */ public String getUriTemplate() { String result = ""; try { result = getCms().readPropertyObject( getParamTempfile(), CmsPropertyDefinition.PROPERTY_TEMPLATE, true).getValue(""); } catch (CmsException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_TEMPLATE_PROP_FAILED_0), e); } return result; }
m_page.setStringValue(getCms(), body, locale, content); m_file = getCms().writeFile(m_file); m_page = CmsXmlPageFactory.unmarshal(getCms(), m_file); if (m_page.hasValue(body, locale)) { getCms().getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_EDITOR, Boolean.TRUE); content = m_page.getStringValue(getCms(), body, locale); if (content == null) { content = "";
m_file = getCms().writeFile(m_file); List locales = m_page.getLocales(); if (locales.size() > 0) {
m_page.setStringValue(getCms(), body, locale, content); m_file = getCms().writeFile(m_file); m_page = CmsXmlPageFactory.unmarshal(getCms(), m_file); if (m_page.hasValue(body, locale)) { getCms().getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_EDITOR, Boolean.TRUE); content = m_page.getStringValue(getCms(), body, locale); if (content == null) { content = "";
m_file = getCms().writeFile(m_file); List<Locale> locales = m_page.getLocales(); if (locales.size() > 0) {