/** * @see org.opencms.workplace.editors.CmsEditor#actionClear(boolean) */ @Override public void actionClear(boolean forceUnlock) { boolean modified = Boolean.valueOf(getParamModified()).booleanValue(); if (forceUnlock || !modified) { // unlock the resource when 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) { boolean modified = Boolean.valueOf(getParamModified()).booleanValue(); if (forceUnlock || !modified) { // unlock the resource when 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); } } } }
CmsFile editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); content = CmsEncoder.createString(editFile.getContents(), getFileEncoding()); } catch (CmsException e) {
editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); String decodedContent = decodeContentParameter(getParamContent(), getFileEncoding(), editFile); try { && (CmsResourceTypeXmlContent.isXmlContent(editFile))) { getCms().getRequestContext().setAttribute(CmsXmlContent.AUTO_CORRECTION_ATTRIBUTE, Boolean.TRUE); CmsFile writtenFile = getCms().writeFile(editFile); decodedContent = CmsEncoder.createString(writtenFile.getContents(), getFileEncoding()); setParamContent(encodeContent(decodedContent));
CmsFile editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); content = CmsEncoder.createString(editFile.getContents(), getFileEncoding()); } catch (CmsException e) {
editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); && CmsResourceTypeXmlContent.isXmlContent(editFile)) { getCms().getRequestContext().setAttribute(CmsXmlContent.AUTO_CORRECTION_ATTRIBUTE, Boolean.TRUE); CmsFile writtenFile = getCms().writeFile(editFile); decodedContent = CmsEncoder.createString(writtenFile.getContents(), getFileEncoding()); setParamContent(encodeContent(decodedContent));