code: 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;
      }
docs: 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