Returns the initialized OpenCms singleton instance.<p>

@return the initialized OpenCms singleton instance
332780
protected static OpenCmsCore getInstance() {

        if (m_errorCondition != null) {
            // OpenCms is not properly initialized
            throw new CmsInitException(m_errorCondition, false);
        }

        if (m_instance != null) {
            return m_instance;
        }
        synchronized (LOCK) {
            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
                    LOG.debug(e.getMessage(), e);
                }
            }
        }
        return m_instance;
    }
267727
protected void init() {

        // initialize OpenCms access objects
        CmsFlexController controller = CmsFlexController.getController(pageContext.getRequest());
        m_cms = controller.getCmsObject();

        int startLevel = m_startLevel == null ? Integer.MIN_VALUE : Integer.parseInt(m_startLevel);
        int endLevel = m_endLevel == null ? Integer.MIN_VALUE : Integer.parseInt(m_endLevel);

        // load navigation bean in the JSP context
        CmsJspNavigationBean bean = new CmsJspNavigationBean(
            m_cms,
            m_type,
            startLevel,
            endLevel,
            m_resource,
            m_param,
            m_locale);
        storeAttribute(getVar(), bean);
    }
430
public Map<String, String> getProperty() {

        if (m_properties == null) {
            try {
                List<CmsProperty> properties = m_cms.readPropertyObjects(this, false);
                m_properties = CmsProperty.toMap(properties);
            } catch (CmsException e) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug(e.getMessage(), e);
                }
            }
        }
        return m_properties;
    }
474943
public CmsResource getResource() {

        return new CmsResource(
            m_base.getStructureId(),
            m_base.getResourceId(),
            m_rootPath,
            m_typeId,
            m_isFolder,
            m_base.getFlags(),
            m_base.getProjectLastModified(),
            m_base.getState(),
            m_base.getDateCreated(),
            m_base.getUserCreated(),
            m_base.getDateLastModified(),
            m_base.getUserLastModified(),
            m_base.getDateReleased(),
            m_base.getDateExpired(),
            m_base.getSiblingCount(),
            m_length,
            m_base.getDateContent(),
            m_base.getVersion());
    }
101685
private void iniCmsObject() {

        try {
            m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
            m_cms.getRequestContext().setSiteRoot("");
        } catch (CmsException e) {
            LOG.error("Unable to clone CmsObject", e);
        }
    }
1168826
protected static I_CmsPreviewServiceAsync getService() {

        if (m_previewService == null) {
            m_previewService = GWT.create(I_CmsPreviewService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.galleries.CmsPreviewService.gwt");
            ((ServiceDefTarget)m_previewService).setServiceEntryPoint(serviceUrl);
        }
        return m_previewService;
    }
1309880
public static PojoDescriptorBuilderFactory getInstance() {

    PojoDescriptorBuilderFactory instance = AbstractPojoDescriptorBuilderFactory.getInstance();
    if (instance == null) {
      synchronized (PojoDescriptorBuilderFactoryImpl.class) {
        if (instance == null) {
          PojoDescriptorBuilderFactoryImpl impl = new PojoDescriptorBuilderFactoryImpl();
          instance = impl;
          setInstance(impl);
          impl.initialize();
        }
      }
    }
    return instance;
  }
781038
protected CmsObject getRootCmsObject() {

        if (m_rootCms == null) {

            m_rootCms = getOfflineCmsObject(A_CmsUI.getCmsObject());
            m_rootCms.getRequestContext().setSiteRoot("");

        }
        return m_rootCms;
    }
357036
public synchronized void initialize() {

        // no need to try initialization in case the 'org.opencms.base' is not present and the contained resource types missing
        if ((m_initStatus == Status.notInitialized) && OpenCms.getModuleManager().hasModule(MODULE_NAME_ADE_CONFIG)) {
            try {
                CmsLog.INIT.info(". Initializing the ADE configuration, this may take a while...");
                m_initStatus = Status.initializing;
                m_configType = OpenCms.getResourceManager().getResourceType(CONFIG_TYPE);
                m_moduleConfigType = OpenCms.getResourceManager().getResourceType(MODULE_CONFIG_TYPE);
                m_elementViewType = OpenCms.getResourceManager().getResourceType(ELEMENT_VIEW_TYPE);
                CmsProject temp = getTempfileProject(m_onlineCms);
                m_offlineCms = OpenCms.initCmsObject(m_onlineCms);
                m_offlineCms.getRequestContext().setCurrentProject(temp);
                m_onlineCache = new CmsConfigurationCache(
                    m_onlineCms,
                    m_configType,
                    m_moduleConfigType,
                    m_elementViewType);
                m_offlineCache = new CmsConfigurationCache(
                    m_offlineCms,
                    m_configType,
                    m_moduleConfigType,
                    m_elementViewType);
                CmsLog.INIT.info(". Reading online configuration...");
                m_onlineCache.initialize();
                CmsLog.INIT.info(". Reading offline configuration...");
                m_offlineCache.initialize();
                m_onlineContainerConfigurationCache = new CmsContainerConfigurationCache(
                    m_onlineCms,
                    "online inheritance groups");
                m_offlineContainerConfigurationCache = new CmsContainerConfigurationCache(
                    m_offlineCms,
                    "offline inheritance groups");
                CmsLog.INIT.info(". Reading online inherited container configurations...");
                m_onlineContainerConfigurationCache.initialize();
                CmsLog.INIT.info(". Reading offline inherited container configurations...");
                m_offlineContainerConfigurationCache.initialize();
                m_offlineFormatterCache = new CmsFormatterConfigurationCache(m_offlineCms, "offline formatters");
                m_onlineFormatterCache = new CmsFormatterConfigurationCache(m_onlineCms, "online formatters");
                CmsLog.INIT.info(". Reading online formatter configurations...");
                m_onlineFormatterCache.initialize();
                CmsLog.INIT.info(". Reading offline formatter configurations...");
                m_offlineFormatterCache.initialize();

                m_offlineDetailIdCache = new CmsDetailNameCache(m_offlineCms);
                m_onlineDetailIdCache = new CmsDetailNameCache(m_onlineCms);
                CmsLog.INIT.info(". Initializing online detail name cache...");
                m_onlineDetailIdCache.initialize();
                CmsLog.INIT.info(". Initializing offline detail name cache...");
                m_offlineDetailIdCache.initialize();

                CmsGlobalConfigurationCacheEventHandler handler = new CmsGlobalConfigurationCacheEventHandler(
                    m_onlineCms);
                handler.addCache(m_offlineCache, m_onlineCache, "ADE configuration cache");
                handler.addCache(
                    m_offlineContainerConfigurationCache,
                    m_onlineContainerConfigurationCache,
                    "Inherited container cache");
                handler.addCache(m_offlineFormatterCache, m_onlineFormatterCache, "formatter configuration cache");
                handler.addCache(m_offlineDetailIdCache, m_onlineDetailIdCache, "Detail ID cache");
                OpenCms.getEventManager().addCmsEventListener(handler);
                CmsLog.INIT.info(". Done initializing the ADE configuration.");
                m_initStatus = Status.initialized;
            } catch (CmsException e) {
                m_initStatus = Status.notInitialized;
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
    }
10430
public String getAssignedOu() {

        try {
            CmsOrganizationalUnit ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn());
            return ou.getDisplayName(getLocale());
        } catch (CmsException e) {
            return null;
        }
    }
1315948
public CmsFile getFile() {

        if (m_base instanceof CmsFile) {
            CmsFile file = (CmsFile)m_base;

            return new CmsFile(
                file.getStructureId(),
                file.getResourceId(),
                m_rootPath,
                m_typeId,
                file.getFlags(),
                file.getProjectLastModified(),
                file.getState(),
                file.getDateCreated(),
                file.getUserCreated(),
                file.getDateLastModified(),
                file.getUserLastModified(),
                file.getDateReleased(),
                file.getDateExpired(),
                file.getSiblingCount(),
                file.getLength(),
                file.getDateContent(),
                file.getVersion(),
                file.getContents());
        }

        return new CmsFile(getResource());
    }
1281944
protected static CmsPrincipalSelectExtension getInstance() {

        A_CmsUI ui = A_CmsUI.get();
        CmsPrincipalSelectExtension instance = (CmsPrincipalSelectExtension)ui.getAttribute(
            CmsPrincipalSelectExtension.class.getName());
        if (instance == null) {
            instance = new CmsPrincipalSelectExtension(ui);
            ui.setAttribute(CmsPrincipalSelectExtension.class.getName(), instance);
        }
        return instance;
    }
811678
public static CmsGalleryDataBean getInitialSettings(HttpServletRequest request, CmsGalleryConfiguration config)
    throws CmsRpcException {

        CmsGalleryService srv = new CmsGalleryService();
        srv.setCms(CmsFlexController.getCmsObject(request));
        srv.setRequest(request);
        CmsGalleryDataBean result = null;
        try {
            result = srv.getInitialSettings(config);
        } finally {
            srv.clearThreadStorage();
        }
        return result;
    }
411527
public static final CPadawan getInstance() {
        try {
            mutex.acquire();

            CPadawan toReturn =
                (handle == null)
                ? (handle = new CPadawan())
                : handle;
            toReturn.init();

            return toReturn;
        } finally {
            try {
                mutex.release();
            } catch (Exception ignore) {
            }
        }
    }
1030809
public static OMMapManager getInstance() {
    if (instanceRef.get() == null) {
      synchronized (instanceRef) {
        if (instanceRef.compareAndSet(null, createInstance())) {
          instanceRef.get().init();
        }
      }
    }
    return instanceRef.get();
  }
469874
public static ComponentManager getInstance() throws SshException {
		synchronized (ComponentManager.class) {
			if (instance == null) {
				instance = new JCEComponentManager();
				instance.init();
			}
			return instance;
		}
	}
1367072
public static CmsContainerConfiguration emptyConfiguration() {

        return new CmsContainerConfiguration(
            null,
            new HashMap<String, Boolean>(),
            new HashMap<String, CmsContainerElementBean>());
    }