/** * @see org.opencms.gwt.CmsGwtService#getCmsObject() */ @Override public CmsObject getCmsObject() { CmsObject result = super.getCmsObject(); // disable link invalidation in the editor result.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); return result; }
/** * Returns a cloned cms instance that prevents the time range resource filter check.<p> * * Use it always for unmarshalling and file writing.<p> * * @return a cloned cms instance that prevents the time range resource filter check * * @throws CmsException if something goes wrong */ protected CmsObject getCloneCms() throws CmsException { CmsObject cloneCms = OpenCms.initCmsObject(getCms()); cloneCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); return cloneCms; }
/** * Returns a cloned cms instance that prevents the time range resource filter check.<p> * * Use it always for unmarshalling and file writing.<p> * * @return a cloned cms instance that prevents the time range resource filter check * * @throws CmsException if something goes wrong */ protected CmsObject getCloneCms() throws CmsException { if (m_cloneCms == null) { m_cloneCms = OpenCms.initCmsObject(getCms()); m_cloneCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); } return m_cloneCms; }
try { cms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); xmlContent = CmsXmlContainerPageFactory.unmarshal(cms, file); } catch (CmsException e) { cms.getRequestContext().setRequestTime(requestTime);
try { cms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); xmlContent = CmsXmlContentFactory.unmarshal(cms, file); } catch (CmsException e) { cms.getRequestContext().setRequestTime(requestTime);
try { cms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); xmlContent = CmsXmlContentFactory.unmarshal(cms, file); } catch (CmsException e) { cms.getRequestContext().setRequestTime(requestTime);
/** * Gets an initialized CmsObject to be used for the actual search for a given search bean.<p> * * @param searchObj the search object * @return the initialized CmsObject * * @throws CmsException if something goes wrong */ protected CmsObject getSearchCms(CmsGallerySearchBean searchObj) throws CmsException { CmsObject searchCms = getCmsObject(); if (searchObj.isIncludeExpired()) { searchCms = OpenCms.initCmsObject(getCmsObject()); searchCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); } return searchCms; }
/** * Initializes a CmsObject based on the given one, but with adjusted project information and configured, such that release and expiration date are ignored.<p> * @param cms the original CmsObject. * * @param online true if a CmsObject for the Online project should be returned * @return the initialized CmsObject * * @throws CmsException if something goes wrong */ public static CmsObject adjustCmsObject(CmsObject cms, boolean online) throws CmsException { CmsObject result = OpenCms.initCmsObject(cms); if (online) { CmsProject onlineProject = cms.readProject(CmsProject.ONLINE_PROJECT_ID); result.getRequestContext().setCurrentProject(onlineProject); } result.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE); return result; } }
int typeId; CmsObject cloneCms = OpenCms.initCmsObject(cms); cloneCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE);
adminCms.getRequestContext().setSiteRoot(cms.getRequestContext().getSiteRoot()); adminCms.getRequestContext().setCurrentProject(cms.getRequestContext().getCurrentProject()); adminCms.getRequestContext().setRequestTime(cms.getRequestContext().getRequestTime()); cmsForReadingProperties = adminCms; } catch (Exception e) {
/** * Creates a copy of the admin cms object which is initialize with the data of the current cms object.<p> * * @param cms the current cms object * @return the new admin cms object * * @throws CmsException if something goes wrong */ private CmsObject getAdminCms(CmsObject cms) throws CmsException { CmsObject adminCms = OpenCms.initCmsObject(m_adminCms); adminCms.getRequestContext().setSiteRoot(cms.getRequestContext().getSiteRoot()); adminCms.getRequestContext().setRequestTime(cms.getRequestContext().getRequestTime()); adminCms.getRequestContext().setCurrentProject(cms.getRequestContext().getCurrentProject()); adminCms.getRequestContext().setEncoding(cms.getRequestContext().getEncoding()); adminCms.getRequestContext().setUri(cms.getRequestContext().getUri()); return adminCms; }
/** * Creates a copy of the admin cms object which is initialize with the data of the current cms object.<p> * * @param cms the current cms object * @return the new admin cms object * * @throws CmsException if something goes wrong */ private CmsObject getAdminCms(CmsObject cms) throws CmsException { CmsObject adminCms = OpenCms.initCmsObject(m_adminCms); adminCms.getRequestContext().setSiteRoot(cms.getRequestContext().getSiteRoot()); adminCms.getRequestContext().setRequestTime(cms.getRequestContext().getRequestTime()); adminCms.getRequestContext().setCurrentProject(cms.getRequestContext().currentProject()); adminCms.getRequestContext().setEncoding(cms.getRequestContext().getEncoding()); adminCms.getRequestContext().setUri(cms.getRequestContext().getUri()); return adminCms; }