Codota Logo
Messages
Code IndexAdd Codota to your IDE (free)

How to use
Messages
in
org.opencms.main

Best Java code snippets using org.opencms.main.Messages (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.opencms/opencms-core

/**
 * Creates a new multi exception, a container for several exception messages.<p>
 */
public CmsMultiException() {
  this(Messages.get().container(Messages.ERR_MULTI_EXCEPTION_1, new Integer(0)));
}
origin: org.opencms/opencms-solr

/**
 * Creates a new multi exception, a container for several exception messages.<p>
 */
public CmsMultiException() {
  this(Messages.get().container(Messages.ERR_MULTI_EXCEPTION_1, new Integer(0)));
}
origin: org.opencms/opencms-core

/**
 * Creates a resource init exception for a given resource init handler class.<p>
 *
 * @param cls the resource init handler class
 */
public CmsResourceInitException(Class<? extends I_CmsResourceInit> cls) {
  this(Messages.get().container(Messages.ERR_RESOURCE_INIT_ABORTED_1, cls.getName()));
}
origin: org.opencms/opencms-solr

/**
 * Sets the default encoding, called after the configuration files have been read.<p>
 *  
 * @param encoding the default encoding to set
 */
protected void setDefaultEncoding(String encoding) {
  m_defaultEncoding = encoding.intern();
  if (CmsLog.INIT.isInfoEnabled()) {
    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_SET_DEFAULT_ENCODING_1, m_defaultEncoding));
  }
}
origin: org.opencms/opencms-core

/**
 * Sets the default encoding, called after the configuration files have been read.<p>
 *
 * @param encoding the default encoding to set
 */
protected void setDefaultEncoding(String encoding) {
  m_defaultEncoding = encoding.intern();
  if (CmsLog.INIT.isInfoEnabled()) {
    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_SET_DEFAULT_ENCODING_1, m_defaultEncoding));
  }
}
origin: org.opencms/opencms-core

  /**
   * Updates the intenal message for the Exception.<p>
   */
  protected void updateMessage() {

    if (!hasIndividualMessage()) {
      m_message = Messages.get().container(Messages.ERR_MULTI_EXCEPTION_1, new Integer(m_exceptions.size()));
    }
  }
}
origin: org.opencms/opencms-solr

  /**
   * Updates the intenal message for the Exception.<p>
   */
  protected void updateMessage() {

    if (!hasIndividualMessage()) {
      m_message = Messages.get().container(Messages.ERR_MULTI_EXCEPTION_1, new Integer(m_exceptions.size()));
    }
  }
}
origin: org.opencms/opencms-solr

/**
 * Sets the server name.<p>
 * 
 * The server name is set in <code>opencms.properties</code>.
 * It is not related to any DNS name the server might also have.
 * The server name is useful e.g. in a cluster to distinguish different servers,
 * or if you compare log files from multiple servers.<p>
 *  
 * @param serverName the server name to set
 */
protected void setServerName(String serverName) {
  m_serverName = serverName;
  if (CmsLog.INIT.isInfoEnabled()) {
    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_SET_SERVERNAME_1, m_serverName));
  }
}
origin: org.opencms/opencms-core

/**
 * Sets the server name.<p>
 *
 * The server name is set in <code>opencms.properties</code>.
 * It is not related to any DNS name the server might also have.
 * The server name is useful e.g. in a cluster to distinguish different servers,
 * or if you compare log files from multiple servers.<p>
 *
 * @param serverName the server name to set
 */
protected void setServerName(String serverName) {
  m_serverName = serverName;
  if (CmsLog.INIT.isInfoEnabled()) {
    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_SET_SERVERNAME_1, m_serverName));
  }
}
origin: org.opencms/opencms-core

  /**
   * Checks if this context info configuration is frozen.<p>
   *
   * @throws CmsRuntimeException in case the configuration is already frozen
   */
  protected void checkFrozen() throws CmsRuntimeException {

    if (m_frozen) {
      throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONTEXT_INFO_FROZEN_0));
    }
  }
}
origin: org.opencms/opencms-solr

  /**
   * Checks if this context info configuration is frozen.<p>
   * 
   * @throws CmsRuntimeException in case the configuration is already frozen
   */
  protected void checkFrozen() throws CmsRuntimeException {

    if (m_frozen) {
      throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONTEXT_INFO_FROZEN_0));
    }
  }
}
origin: org.opencms/opencms-core

/**
 * Sets the init level of this OpenCmsCore object instance.<p>
 *
 * For a detailed description about the possible run levels,
 * please see {@link OpenCms#getRunLevel()}.<p>
 *
 * @param level the level to set
 */
private void setRunLevel(int level) {
  if (m_instance != null) {
    if (m_instance.m_runLevel >= OpenCms.RUNLEVEL_1_CORE_OBJECT) {
      // otherwise the log is not available
      if (CmsLog.INIT.isInfoEnabled()) {
        CmsLog.INIT.info(
          Messages.get().getBundle().key(
            Messages.INIT_RUNLEVEL_CHANGE_2,
            new Integer(m_instance.m_runLevel),
            new Integer(level)));
      }
    }
    m_instance.m_runLevel = level;
  }
}
origin: org.opencms/opencms-solr

/**
 * Called by the {@link OpenCmsListener} when a http session is created.<p>
 * 
 * @param event the http session event
 * 
 * @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent)
 * @see OpenCmsListener#sessionCreated(HttpSessionEvent)
 */
protected void sessionCreated(HttpSessionEvent event) {
  synchronized (m_lockSessionCount) {
    m_sessionCountCurrent = (m_sessionCountCurrent <= 0) ? 1 : (m_sessionCountCurrent + 1);
    m_sessionCountTotal++;
    if (LOG.isInfoEnabled()) {
      LOG.info(Messages.get().getBundle().key(
        Messages.LOG_SESSION_CREATED_2,
        new Integer(m_sessionCountTotal),
        new Integer(m_sessionCountCurrent)));
    }
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug(Messages.get().getBundle().key(Messages.LOG_SESSION_CREATED_1, event.getSession().getId()));
  }
}
origin: org.opencms/opencms-solr

/**       
 * Sets the init level of this OpenCmsCore object instance.<p>
 * 
 * For a detailed description about the possible run levels, 
 * please see {@link OpenCms#getRunLevel()}.<p>
 * 
 * @param level the level to set
 */
private void setRunLevel(int level) {
  if (m_instance != null) {
    if (m_instance.m_runLevel >= OpenCms.RUNLEVEL_1_CORE_OBJECT) {
      // otherwise the log is not available
      if (CmsLog.INIT.isInfoEnabled()) {
        CmsLog.INIT.info(Messages.get().getBundle().key(
          Messages.INIT_RUNLEVEL_CHANGE_2,
          new Integer(m_instance.m_runLevel),
          new Integer(level)));
      }
    }
    m_instance.m_runLevel = level;
  }
}
origin: org.opencms/opencms-solr

  /**
   * Method to dump all currently known Threads.<p> 
   */
  private void dumpThreads() {

    if (LOG.isDebugEnabled()) {
      StringBuffer b = new StringBuffer(512);
      Iterator i = m_threads.keySet().iterator();
      while (i.hasNext()) {
        CmsUUID key = (CmsUUID)i.next();
        A_CmsReportThread thread = (A_CmsReportThread)m_threads.get(key);
        b.append(thread.getName());
        b.append(" - ");
        b.append(thread.getUUID());
        b.append('\n');
      }
      LOG.debug(Messages.get().getBundle().key(
        Messages.LOG_THREADSTORE_POOL_CONTENT_2,
        new Integer(m_threads.size()),
        b.toString()));
    }
  }
}
origin: org.opencms/opencms-core

  /**
   * Method to dump all currently known Threads.<p>
   */
  private void dumpThreads() {

    if (LOG.isDebugEnabled()) {
      StringBuffer b = new StringBuffer(512);
      Iterator<CmsUUID> i = m_threads.keySet().iterator();
      while (i.hasNext()) {
        CmsUUID key = i.next();
        A_CmsReportThread thread = m_threads.get(key);
        b.append(thread.getName());
        b.append(" - ");
        b.append(thread.getUUID());
        b.append('\n');
      }
      LOG.debug(
        Messages.get().getBundle().key(
          Messages.LOG_THREADSTORE_POOL_CONTENT_2,
          new Integer(m_threads.size()),
          b.toString()));
    }
  }
}
origin: org.opencms/opencms-core

/**
 * Adds the specified request handler to the Map of OpenCms request handlers. <p>
 *
 * @param handler the handler to add
 */
protected void addRequestHandler(I_CmsRequestHandler handler) {
  if (handler == null) {
    return;
  }
  String[] names = handler.getHandlerNames();
  for (int i = 0; i < names.length; i++) {
    String name = names[i];
    if (m_requestHandlers.get(name) != null) {
      CmsLog.INIT.error(Messages.get().getBundle().key(Messages.LOG_DUPLICATE_REQUEST_HANDLER_1, name));
      continue;
    }
    m_requestHandlers.put(name, handler);
    if (CmsLog.INIT.isInfoEnabled()) {
      CmsLog.INIT.info(
        Messages.get().getBundle().key(
          Messages.INIT_ADDED_REQUEST_HANDLER_2,
          name,
          handler.getClass().getName()));
    }
  }
}
origin: org.opencms/opencms-solr

/**
 * 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);
  }
}
origin: org.opencms/opencms-core

/**
 * 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);
  }
}
origin: org.opencms/opencms-solr

/**
 * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
 */
public void contextInitialized(ServletContextEvent event) {
  try {
    // upgrade the OpenCms runlevel
    OpenCmsCore.getInstance().upgradeRunlevel(event.getServletContext());
  } catch (CmsInitException e) {
    if (e.isNewError()) {
      // only log new init errors
      LOG.error(e.getLocalizedMessage(), e);
    }
  } catch (Throwable t) {
    // make sure all other errors are displayed in the OpenCms log
    LOG.error(Messages.get().getBundle().key(Messages.LOG_ERROR_GENERIC_0), t);
    // throw a new init Exception to make sure a "context destroyed" event is triggered
    throw new CmsInitException(Messages.get().container(Messages.ERR_CRITICAL_INIT_GENERIC_1, t.getMessage()));
  }
}
org.opencms.mainMessages

Javadoc

Convenience class to access the localized messages of this OpenCms package.

Most used methods

  • get
    Returns an instance of this localized message accessor.

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now