1 31 32 package org.opencms.workplace.editors; 33 34 import org.opencms.jsp.CmsJspActionElement; 35 import org.opencms.main.CmsException; 36 import org.opencms.main.CmsLog; 37 import org.opencms.security.CmsPermissionSet; 38 import org.opencms.util.CmsStringUtil; 39 import org.opencms.workplace.CmsWorkplaceSettings; 40 41 import javax.servlet.http.HttpServletRequest ; 42 43 import org.apache.commons.logging.Log; 44 45 60 public class CmsEditorFrameset extends CmsEditor { 61 62 63 private static final Log LOG = CmsLog.getLog(CmsEditorFrameset.class); 64 65 66 private String m_paramEditorTitle; 67 68 73 public CmsEditorFrameset(CmsJspActionElement jsp) { 74 75 super(jsp); 76 } 77 78 86 public void actionClear(boolean forceUnlock) { 87 88 deleteTempFile(); 90 if (Boolean.valueOf(getParamDirectedit()).booleanValue() || forceUnlock) { 91 try { 93 getCms().unlockResource(getParamResource()); 94 } catch (CmsException e) { 95 if (LOG.isInfoEnabled()) { 97 LOG.info(e); 98 } 99 } 100 } 101 } 102 103 106 public final void actionExit() { 107 108 } 110 111 114 public final void actionSave() { 115 116 } 118 119 122 public final String getEditorResourceUri() { 123 124 return ""; 126 } 127 128 133 public String getParamEditorTitle() { 134 135 if (CmsStringUtil.isEmpty(m_paramEditorTitle)) { 136 return key(Messages.GUI_EDITOR_TITLE_PREFIX_0) + " " + getParamResource(); 137 } 138 return m_paramEditorTitle; 139 } 140 141 146 public void setParamEditorTitle(String editorTitle) { 147 148 m_paramEditorTitle = editorTitle; 149 } 150 151 154 protected final void initContent() { 155 156 } 158 159 162 protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { 163 164 fillParamValues(settings, request); 166 167 if (getDialogRealUri().endsWith("editor.jsp")) { 168 if (!checkResourcePermissions(CmsPermissionSet.ACCESS_WRITE, true)) { 170 try { 172 actionClose(); 173 } catch (Exception e) { 174 if (LOG.isInfoEnabled()) { 176 LOG.info(e); 177 } 178 } 179 } 180 } 181 } 182 } 183 | Popular Tags |