/** * Returns the log for the selected object.<p> * * If the provided object is a String, this String will * be used as channel name. Otherwise the objects * class name will be used as channel name.<p> * * @param obj the object channel to use * @return the log for the selected object channel */ public static Log getLog(Object obj) { return CmsLog.getLog(obj); }
/** * Represents the visibility status of a resource type in the 'Add' menu of the container page editor.<p> */ public enum AddMenuVisibility { /** Type not visible. */ disabled, /** Type does not belong to current view, but has been configured to be still visible in it. */ fromOtherView, /** Type is normally visible. */ visible }
/** * Returns the log for the selected object.<p> * * If the provided object is a String, this String will * be used as channel name. Otherwise the objects * class name will be used as channel name.<p> * * @param obj the object channel to use * @return the log for the selected object channel */ public static Log getLog(Object obj) { return CmsLog.getLog(obj); }
/** * @see org.opencms.report.I_CmsReport#println(java.lang.Throwable) */ public synchronized void println(Throwable t) { if (CmsLog.getLog(m_channel).isInfoEnabled()) { StringBuffer message = new StringBuffer(); message.append(getMessages().key(Messages.RPT_EXCEPTION_0)); message.append(t.getMessage()); m_buffer.append(message); addError(message.toString()); CmsLog.getLog(m_channel).info(m_buffer.toString(), t); } m_buffer = new StringBuffer(); setLastEntryTime(System.currentTimeMillis()); } }
/** * @see org.opencms.report.I_CmsReport#println(java.lang.Throwable) */ public synchronized void println(Throwable t) { if (CmsLog.getLog(m_clazz).isInfoEnabled()) { StringBuffer message = new StringBuffer(); message.append(getMessages().key(Messages.RPT_EXCEPTION_0)); message.append(t.getMessage()); m_buffer.append(message); addError(message.toString()); CmsLog.getLog(m_clazz).info(m_buffer.toString(), t); } m_buffer = new StringBuffer(); setLastEntryTime(System.currentTimeMillis()); } }
/** * Set the associated digester.<p> * * The digester gets assigned to use the OpenCms conform logging * * If needed, this class loads the parameter classes from their names.<p> * * @param aDigester the associated digester to set */ @Override public void setDigester(Digester aDigester) { aDigester.setLogger(CmsLog.getLog(aDigester.getClass())); // call superclass super.setDigester(aDigester); }
/** * Set the associated digester.<p> * * The digester gets assigned to use the OpenCms conform logging * * If needed, this class loads the parameter classes from their names.<p> * * @param aDigester the associated digester to set */ @Override public void setDigester(Digester aDigester) { aDigester.setLogger(CmsLog.getLog(aDigester.getClass())); // call superclass super.setDigester(aDigester); }
/** * @see org.xhtmlrenderer.util.XRLogger#log(java.lang.String, java.util.logging.Level, java.lang.String) */ public void log(String where, Level level, String msg) { Log log = CmsLog.getLog(getLoggerName(where)); sendMessageToLogger(level, msg, log, null); }
/** * @see org.xhtmlrenderer.util.XRLogger#log(java.lang.String, java.util.logging.Level, java.lang.String, java.lang.Throwable) */ public void log(String where, Level level, String msg, Throwable th) { Log log = CmsLog.getLog(getLoggerName(where)); sendMessageToLogger(level, msg, log, th); }
/** The available module export modes. */ public enum ExportMode { /** Default export mode. */ DEFAULT, /** Reduced export, that omits last modification information (dates and users). */ REDUCED; /** * @see java.lang.Enum#toString() */ @Override public String toString() { return super.toString().toLowerCase(); } }
/** * Writes the XML configuration for the provided configuration class.<p> * * @param clazz the configuration class to write the XML for */ protected void writeConfiguration(Class<?> clazz) { // exception handling is provided here to ensure identical log messages try { m_configurationManager.writeConfiguration(clazz); } catch (IOException e) { CmsLog.getLog(CmsConfigurationManager.class).error( Messages.get().getBundle().key(Messages.LOG_ERROR_WRITING_CONFIG_1, clazz.getName()), e); } catch (CmsConfigurationException e) { CmsLog.getLog(CmsConfigurationManager.class).error( Messages.get().getBundle().key(Messages.LOG_ERROR_WRITING_CONFIG_1, clazz.getName()), e); } }
/** * Writes the XML configuration for the provided configuration class.<p> * * @param clazz the configuration class to write the XML for */ protected void writeConfiguration(Class clazz) { // exception handling is provided here to ensure identical log messages try { m_configurationManager.writeConfiguration(clazz); } catch (IOException e) { CmsLog.getLog(CmsConfigurationManager.class).error( Messages.get().getBundle().key(Messages.LOG_ERROR_WRITING_CONFIG_1, clazz.getName()), e); } catch (CmsConfigurationException e) { CmsLog.getLog(CmsConfigurationManager.class).error( Messages.get().getBundle().key(Messages.LOG_ERROR_WRITING_CONFIG_1, clazz.getName()), e); } }
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
/** * Displays the throwable on the error page and logs the error.<p> * * @param wp the workplace class * @param t the throwable to be displayed on the error page * * @throws JspException if the include of the error page jsp fails */ public void includeErrorpage(CmsWorkplace wp, Throwable t) throws JspException { CmsLog.getLog(wp).error(Messages.get().getBundle().key(Messages.ERR_WORKPLACE_DIALOG_0), t); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, wp); getJsp().getRequest().setAttribute(ATTRIBUTE_THROWABLE, t); getJsp().include(FILE_DIALOG_SCREEN_ERRORPAGE); }
/** * Displays the throwable on the error page and logs the error.<p> * * @param wp the workplace class * @param t the throwable to be displayed on the error page * * @throws JspException if the include of the error page jsp fails */ public void includeErrorpage(CmsWorkplace wp, Throwable t) throws JspException { CmsLog.getLog(wp).error(Messages.get().getBundle().key(Messages.ERR_WORKPLACE_DIALOG_0), t); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, wp); getJsp().getRequest().setAttribute(ATTRIBUTE_THROWABLE, t); getJsp().include(FILE_DIALOG_SCREEN_ERRORPAGE); }
/** * The site localization modes.<p> */ public enum LocalizationMode { /** The multi tree localization mode. */ multiTree, /** The single tree localization mode. */ singleTree, /** The default mode. */ standard }
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
/** The dialog mode. */ public static enum DialogMode { /** Allow copy only. */ copy, /** Allow copy and move. */ copy_and_move, /** Allow move only. */ move }