/** * Reads the editor configuration file valid for the current user and caches the result in a Map.<p> * * The configuration settings of the found file are stored in a Map holding the loaded configuration * with the configuration file name as key.<p> * * The configuration file name to use for the current user is stored in another Map with the user name * as key.<p> * * @param jsp the JSP action element to access the VFS and current user information * @return the display options to use for the current user or null if no display options were found */ public Properties getDisplayOptions(CmsJspActionElement jsp) { return getDisplayOptions(jsp.getCmsObject()); }
/** * Determines if the given element should be shown in the editor.<p> * * @param key the element key name which should be displayed * @param displayOptions the display options for the current user * * @return true if the element should be shown, otherwise false */ public boolean showElement(String key, Properties displayOptions) { return showElement(key, null, displayOptions); }
Properties displayOptions = options.getDisplayOptions(cms); try { if (options.showElement("gallery.enhancedoptions", displayOptions)) { result.put("cmsGalleryEnhancedOptions", true); if (options.showElement("gallery.usethickbox", displayOptions)) { result.put("cmsGalleryUseThickbox", true);
/** * Implements the event listener of this class.<p> * * @see org.opencms.main.I_CmsEventListener#cmsEvent(org.opencms.main.CmsEvent) */ public void cmsEvent(CmsEvent event) { switch (event.getType()) { case I_CmsEventListener.EVENT_CLEAR_CACHES: // clear the cached message objects m_messages = new HashMap(); m_editorDisplayOptions.clearCache(); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_EVENT_CLEAR_CACHES_0)); } break; default: // no operation } }
m_editorDisplayOptions = new CmsEditorDisplayOptions();
/** * Implements the event listener of this class.<p> * * @see org.opencms.main.I_CmsEventListener#cmsEvent(org.opencms.main.CmsEvent) */ public void cmsEvent(CmsEvent event) { switch (event.getType()) { case I_CmsEventListener.EVENT_CLEAR_CACHES: flushMessageCache(); m_editorDisplayOptions.clearCache(); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_EVENT_CLEAR_CACHES_0)); } break; default: // no operation } }
m_editorDisplayOptions = new CmsEditorDisplayOptions();
/** * Determines if the given element should be shown in the editor.<p> * * @param key the element key name which should be displayed * @param displayOptions the display options for the current user * * @return true if the element should be shown, otherwise false */ public boolean showElement(String key, Properties displayOptions) { return showElement(key, null, displayOptions); }
/** * Reads the editor configuration file valid for the current user and caches the result in a Map.<p> * * The configuration settings of the found file are stored in a Map holding the loaded configuration * with the configuration file name as key.<p> * * The configuration file name to use for the current user is stored in another Map with the user name * as key.<p> * * @param jsp the JSP action element to access the VFS and current user information * @return the display options to use for the current user or null if no display options were found */ public Properties getDisplayOptions(CmsJspActionElement jsp) { return getDisplayOptions(jsp.getCmsObject()); }