code: public static void initialize(CmsObject cms) throws CmsException {
  
          OpenCms.getRoleManager().checkRole(cms, CmsRole.ADMINISTRATOR);
          try {
              // store the Admin cms to index Cms resources
              m_adminCms = OpenCms.initCmsObject(cms);
              m_adminCms.getRequestContext().setSiteRoot("");
          } catch (CmsException e) {
              // this should never happen
          }
      }
docs: Initialize the formatter configuration.<p>
  
  @param cms an initialized admin OpenCms user context
  
  @throws CmsException in case the initialization fails