/** * Returns the configured authorization handler.<p> * * @return the configured authorization handler */ public static I_CmsAuthorizationHandler getAuthorizationHandler() { return OpenCmsCore.getInstance().getAuthorizationHandler(); }
/** * Returns the configured list of default directory file names (instances of <code>{@link String}</code>).<p> * * Caution: This list can not be modified.<p> * * @return the configured list of default directory file names */ public static List<String> getDefaultFiles() { return OpenCmsCore.getInstance().getDefaultFiles(); }
/** * Returns the default user and group name configuration.<p> * * @return the default user and group name configuration */ public static CmsDefaultUsers getDefaultUsers() { return OpenCmsCore.getInstance().getDefaultUsers(); }
/** * Returns the initialized import/export manager, * which contains information about how to handle imported resources.<p> * * @return the initialized import/export manager */ public static CmsImportExportManager getImportExportManager() { return OpenCmsCore.getInstance().getImportExportManager(); }
getSystemInfo().setServerName(serverName); m_configurationManager = new CmsConfigurationManager(getSystemInfo().getAbsoluteRfsPathRelativeToWebInf( CmsSystemInfo.FOLDER_CONFIG)); getSystemInfo().setDefaultEncoding(defaultEncoding); getSystemInfo().setVersionHistorySettings( systemConfiguration.isHistoryEnabled(), systemConfiguration.getHistoryVersions(), systemConfiguration.getHistoryVersionsAfterDeletion()); getSystemInfo().setMailSettings(systemConfiguration.getMailSettings()); getSystemInfo().setHttpAuthenticationSettings(systemConfiguration.getHttpAuthenticationSettings()); getSystemInfo().setNotificationTime(systemConfiguration.getNotificationTime()); getSystemInfo().setNotificationProject(systemConfiguration.getNotificationProject()); while (it.hasNext()) { I_CmsRequestHandler handler = (I_CmsRequestHandler)it.next(); addRequestHandler(handler); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key( addExportPoints(m_workplaceManager.getExportPoints()); adminCms = initCmsObject(null, null, getDefaultUsers().getUserAdmin(), (String)null, (String)null); } catch (CmsException e) {
m_opencms = OpenCmsCore.getInstance(); null, null); m_opencms.getSystemInfo().init(settings); String propertyPath = m_opencms.getSystemInfo().getConfigurationFileRfsPath(); out.println(m_messages.key(Messages.GUI_SHELL_CONFIG_FILE_1, propertyPath)); out.println(); m_opencms = m_opencms.upgradeRunlevel(configuration); m_cms = m_opencms.initCmsObject(m_opencms.getDefaultUsers().getUserGuest());
/** * Returns the event manger that handles all OpenCms events.<p> * * @return the event manger that handles all OpenCms events */ public static CmsEventManager getEventManager() { return OpenCmsCore.getInstance().getEventManager(); }
/** * Displays a resource from the OpenCms by writing the result to the provided * Servlet response output stream.<p> * * @param req the current servlet request * @param res the current servlet response */ protected void showResource(HttpServletRequest req, HttpServletResponse res) { CmsObject cms = null; try { cms = initCmsObject(req, res); // user is initialized, now deliver the requested resource CmsResource resource = initResource(cms, cms.getRequestContext().getUri(), req, res); if (resource != null) { // a file was read, go on process it m_resourceManager.loadResource(cms, resource, req, res); m_sessionManager.updateSessionInfo(cms, req); } } catch (Throwable t) { errorHandling(cms, req, res, t); } }
user = getDefaultUsers().getUserGuest(); CmsObject cms = initCmsObject( req, m_securityManager.readUser(null, user), ouFqn); if ((password != null) && !getDefaultUsers().isUserGuest(user)) { cms.loginUser(user, password, CmsContextInfo.LOCALHOST);
/** * Returns the configured export points, * the returned set being an unmodifiable set.<p> * * @return an unmodifiable set of the configured export points */ public static Set<CmsExportPoint> getExportPoints() { return OpenCmsCore.getInstance().getExportPoints(); }
/** * Initializes the system with the OpenCms servlet.<p> * * This is the final step that is called on the servlets "init()" method. * It registers the servlets request handler and also outputs the final * startup message. The servlet should auto-load since the <load-on-startup> * parameter is set in the 'web.xml' by default.<p> * * @param servlet the OpenCms servlet */ protected void initServlet(OpenCmsServlet servlet) { synchronized (LOCK) { // add the servlets request handler addRequestHandler(servlet); // output the final 'startup is finished' message if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key( Messages.INIT_SYSTEM_RUNNING_1, CmsStringUtil.formatRuntime(getSystemInfo().getRuntime()))); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LINE_0)); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_DOT_0)); } } }
/** * Returns the initialized OpenCms singleton instance.<p> * * @return the initialized OpenCms singleton instance */ protected static OpenCmsCore getInstance() { if (m_errorCondition != null) { // OpenCms is not properly initialized throw new CmsInitException(m_errorCondition, false); } if (m_instance == null) { try { // create a new core object with runlevel 1 m_instance = new OpenCmsCore(); } catch (CmsInitException e) { // already initialized, this is all we need } } return m_instance; }
Messages.get().getBundle().key(Messages.INIT_WEBAPP_NAME_1, getSystemInfo().getWebApplicationName())); CmsLog.INIT.info( Messages.get().getBundle().key(Messages.INIT_SERVLET_PATH_1, getSystemInfo().getServletPath())); CmsLog.INIT.info( Messages.get().getBundle().key(Messages.INIT_OPENCMS_CONTEXT_1, getSystemInfo().getOpenCmsContext())); CmsLog.INIT.info( Messages.get().getBundle().key(Messages.INIT_WEBINF_PATH_1, getSystemInfo().getWebInfRfsPath())); CmsLog.INIT.info( Messages.get().getBundle().key( Messages.INIT_PROPERTY_FILE_1, getSystemInfo().getConfigurationFileRfsPath())); String logFileRfsPath = getSystemInfo().getLogFileRfsPath(); CmsLog.INIT.info( Messages.get().getBundle().key( getSystemInfo().setServerName(serverName); m_configurationManager = new CmsConfigurationManager(getSystemInfo().getConfigFolder()); getSystemInfo().setDefaultEncoding(defaultEncoding); getSystemInfo().setVersionHistorySettings( systemConfiguration.isHistoryEnabled(), systemConfiguration.getHistoryVersions(), systemConfiguration.getHistoryVersionsAfterDeletion()); getSystemInfo().setMailSettings(systemConfiguration.getMailSettings());
m_opencms = OpenCmsCore.getInstance(); null, null); m_opencms.getSystemInfo().init(settings); String propertyPath = m_opencms.getSystemInfo().getConfigurationFileRfsPath(); System.out.println(m_messages.key(Messages.GUI_SHELL_CONFIG_FILE_1, propertyPath)); System.out.println(); m_opencms = m_opencms.upgradeRunlevel(configuration); m_cms = m_opencms.initCmsObject(m_opencms.getDefaultUsers().getUserGuest());
/** * Returns the event manger that handles all OpenCms events.<p> * * @return the event manger that handles all OpenCms events */ public static CmsEventManager getEventManager() { return OpenCmsCore.getInstance().getEventManager(); }
cms = initCmsObject(req, res); CmsResource resource = initResource(cms, cms.getRequestContext().getUri(), req, res); if (resource != null) { errorHandling(cms, req, res, t);
user = getDefaultUsers().getUserGuest(); CmsObject cms = initCmsObject( req, m_securityManager.readUser(null, user), ouFqn); if ((password != null) && !getDefaultUsers().isUserGuest(user)) { cms.loginUser(user, password, CmsContextInfo.LOCALHOST);
/** * Returns the initialized import/export manager, * which contains information about how to handle imported resources.<p> * * @return the initialized import/export manager */ public static CmsImportExportManager getImportExportManager() { return OpenCmsCore.getInstance().getImportExportManager(); }
/** * Returns the configured export points, * the returned set being an unmodifiable set.<p> * * @return an unmodifiable set of the configured export points */ public static Set getExportPoints() { return OpenCmsCore.getInstance().getExportPoints(); }
/** * Initializes the system with the OpenCms servlet.<p> * * This is the final step that is called on the servlets "init()" method. * It registers the servlets request handler and also outputs the final * startup message. The servlet should auto-load since the <load-on-startup> * parameter is set in the 'web.xml' by default.<p> * * @param servlet the OpenCms servlet */ protected void initServlet(OpenCmsServlet servlet) { synchronized (LOCK) { // add the servlets request handler addRequestHandler(servlet); // output the final 'startup is finished' message if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info( Messages.get().getBundle().key( Messages.INIT_SYSTEM_RUNNING_1, CmsStringUtil.formatRuntime(getSystemInfo().getRuntime()))); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LINE_0)); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_DOT_0)); } } }