/** * @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); } } } }
checkLock(getParamResource()); CmsFile editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); content = CmsEncoder.createString(editFile.getContents(), getFileEncoding()); } catch (CmsException e) {
checkLock(getParamResource()); 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 { } catch (UnsupportedEncodingException e) { throw new CmsException( Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()), e);
editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL); } catch (UnsupportedEncodingException e) { throw new CmsException( Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()), e);