/** * Gets the ADE cache from the ADE manager.<p> * * @return the ADE cache */ private static CmsADECache getCache() { return OpenCms.getADEManager().getCache(); }
/** * Gets the ADE cache from the ADE manager.<p> * * @return the ADE cache */ private static CmsADECache getCache() { return OpenCms.getADEManager().getCache(); }
/** * Gets the setting configuration of an element.<p> * * @param cms the current CMS context * @param resource the resource for which the setting configuration should be returned * @return the setting configuration for that element * * @throws CmsException if something goes wrong */ protected Map<String, CmsXmlContentProperty> getSettingConfiguration(CmsObject cms, CmsResource resource) throws CmsException { return OpenCms.getADEManager().getElementSettings(cms, resource); }
/** * Returns the ADE configuration data for the current URI.<p> * * @return the ADE configuration data */ private CmsADEConfigData getConfigData() { if (m_adeConfig == null) { m_adeConfig = OpenCms.getADEManager().lookupConfiguration(m_cms, m_cms.addSiteRoot(m_currentPageUri)); } return m_adeConfig; }
/** * Returns the configuration data of the current container page context.<p> * * @param pageRootPath the container page root path * * @return the configuration data of the current container page context */ private CmsADEConfigData getConfigData(String pageRootPath) { if (m_configData == null) { m_configData = OpenCms.getADEManager().lookupConfiguration(getCmsObject(), pageRootPath); } return m_configData; }
/** * @see org.opencms.ade.detailpage.I_CmsDetailPageFinder#getAllDetailPages(org.opencms.file.CmsObject, int) */ public Collection<String> getAllDetailPages(CmsObject cms, int resType) throws CmsException { if (!OpenCms.getADEManager().isInitialized()) { return new ArrayList<String>(); } String typeName = OpenCms.getResourceManager().getResourceType(resType).getTypeName(); return OpenCms.getADEManager().getDetailPages(cms, typeName); }
/** * @see org.opencms.file.collectors.I_CmsCollectorPublishListProvider#getPublishResources(org.opencms.file.CmsObject, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo) */ public Set<CmsResource> getPublishResources(final CmsObject cms, final I_CmsContentLoadCollectorInfo info) throws CmsException { int collectorLimit = NumberUtils.toInt( OpenCms.getADEManager().getParameters(cms).get(CmsGwtConstants.COLLECTOR_PUBLISH_LIST_LIMIT), DEFAULT_LIMIT); CmsCollectorPublishListHelper helper = new CmsCollectorPublishListHelper(cms, info, collectorLimit); return helper.getPublishListFiles(); }
/** * @see org.opencms.gwt.shared.rpc.I_CmsCoreService#setShowEditorHelp(boolean) */ public void setShowEditorHelp(boolean visible) throws CmsRpcException { try { OpenCms.getADEManager().setShowEditorHelp(getCmsObject(), visible); } catch (Throwable e) { error(e); } }
/** * @see org.opencms.file.collectors.I_CmsCollectorPublishListProvider#getPublishResources(org.opencms.file.CmsObject, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo) */ public Set<CmsResource> getPublishResources(CmsObject cms, I_CmsContentLoadCollectorInfo info) throws CmsException { int collectorLimit = NumberUtils.toInt( OpenCms.getADEManager().getParameters(cms).get(CmsGwtConstants.COLLECTOR_PUBLISH_LIST_LIMIT), DEFAULT_LIMIT); CmsCollectorPublishListHelper helper = new CmsCollectorPublishListHelper(cms, info, collectorLimit); return helper.getPublishListFiles(); } }
/** * @see org.opencms.file.collectors.I_CmsCollectorPublishListProvider#getPublishResources(org.opencms.file.CmsObject, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo) */ public Set<CmsResource> getPublishResources(final CmsObject cms, final I_CmsContentLoadCollectorInfo info) throws CmsException { int collectorLimit = NumberUtils.toInt( OpenCms.getADEManager().getParameters(cms).get(CmsGwtConstants.COLLECTOR_PUBLISH_LIST_LIMIT), DEFAULT_LIMIT); CmsCollectorPublishListHelper helper = new CmsCollectorPublishListHelper(cms, info, collectorLimit); return helper.getPublishListFiles(); }
/** * @see org.opencms.loader.I_CmsResourceLoader#load(org.opencms.file.CmsObject, org.opencms.file.CmsResource, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ public void load(CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res) throws CmsException { getController(cms, resource, req, res, false, true); OpenCms.getADEManager().handleHtmlRedirect(cms, req, res, cms.getSitePath(resource)); CmsFlexController.removeController(req); }
/** * Returns the subsite path for the currently requested URI.<p> * * @return the subsite path */ public String getSubSitePath() { return m_cms.getRequestContext().removeSiteRoot( OpenCms.getADEManager().getSubSiteRoot(m_cms, m_cms.getRequestContext().getRootUri())); }
/** * Gets the cached formatters.<p> * * @return the cached formatters */ public CmsFormatterConfigurationCacheState getCachedFormatters() { return OpenCms.getADEManager().getCachedFormatters( getCms().getRequestContext().getCurrentProject().isOnlineProject()); }
/** * @see org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageService#addToFavoriteList(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, java.lang.String) */ public void addToFavoriteList(CmsContainerPageRpcContext context, String clientId) throws CmsRpcException { try { ensureSession(); List<CmsContainerElementBean> list = OpenCms.getADEManager().getFavoriteList(getCmsObject()); CmsResource containerPage = getCmsObject().readResource(context.getPageStructureId()); updateFavoriteRecentList(containerPage, clientId, list); OpenCms.getADEManager().saveFavoriteList(getCmsObject(), list); } catch (Throwable e) { error(e); } }
/** * @see org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageService#addToRecentList(org.opencms.ade.containerpage.shared.CmsContainerPageRpcContext, java.lang.String) */ public void addToRecentList(CmsContainerPageRpcContext context, String clientId) throws CmsRpcException { try { ensureSession(); List<CmsContainerElementBean> list = OpenCms.getADEManager().getRecentList(getCmsObject()); CmsResource containerPage = getCmsObject().readResource(context.getPageStructureId()); updateFavoriteRecentList(containerPage, clientId, list); OpenCms.getADEManager().saveRecentList(getCmsObject(), list); } catch (Throwable e) { error(e); } }
/** * @see org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapService#getNewElementInfo(java.lang.String) */ public List<CmsNewResourceInfo> getNewElementInfo(String entryPointUri) throws CmsRpcException { try { CmsObject cms = getCmsObject(); String rootPath = cms.getRequestContext().addSiteRoot(entryPointUri); CmsADEConfigData config = OpenCms.getADEManager().lookupConfiguration(cms, rootPath); List<CmsNewResourceInfo> result = getNewResourceInfos(cms, config, getWorkplaceLocale()); return result; } catch (Throwable e) { error(e); return null; } }
/** * @see org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageService#saveFavoriteList(java.util.List, java.lang.String) */ public void saveFavoriteList(List<String> clientIds, String uri) throws CmsRpcException { try { ensureSession(); OpenCms.getADEManager().saveFavoriteList( getCmsObject(), getCachedElements(clientIds, getCmsObject().getRequestContext().addSiteRoot(uri))); } catch (Throwable e) { error(e); } }
/** * @see org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageService#saveRecentList(java.util.List, java.lang.String) */ public void saveRecentList(List<String> clientIds, String uri) throws CmsRpcException { try { ensureSession(); OpenCms.getADEManager().saveRecentList( getCmsObject(), getCachedElements(clientIds, getCmsObject().getRequestContext().addSiteRoot(uri))); } catch (Throwable e) { error(e); } }
/** * Adds the current subsite.<p> * * @param referencePath the reference path */ public void addCurrentSubsite(String referencePath) { CmsADEConfigData configData = OpenCms.getADEManager().lookupConfiguration(m_cms, referencePath); String basePath = configData.getBasePath(); if (basePath != null) { addOption( Type.currentSubsite, basePath, Messages.get().getBundle(OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms)).key( Messages.GUI_SITESELECTOR_CURRENT_SUBSITE_0)); } }
/** * @see org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapService#disableModelPage(java.lang.String, org.opencms.util.CmsUUID, boolean) */ public void disableModelPage(String baseUri, CmsUUID modelPageId, boolean disabled) throws CmsRpcException { try { CmsObject cms = getCmsObject(); CmsResource rootResource = cms.readResource(baseUri); CmsModelPageHelper helper = new CmsModelPageHelper(getCmsObject(), rootResource); String configPath = CmsStringUtil.joinPaths(baseUri, ".content/.config"); CmsResource configResource = cms.readResource(configPath); helper.disableModelPage(configResource, modelPageId, disabled); OpenCms.getADEManager().waitForCacheUpdate(false); } catch (Throwable e) { error(e); } }