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