code: public static CmsJspResourceWrapper convertResource(CmsObject cms, Object input) throws CmsException {
  
          CmsJspResourceWrapper result;
          if (input instanceof CmsResource) {
              result = CmsJspResourceWrapper.wrap(cms, (CmsResource)input);
          } else {
              result = CmsJspResourceWrapper.wrap(cms, convertRawResource(cms, input));
          }
          return result;
      }
docs: Returns a resource wrapper created from the input.
  
  The wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.
  
  @param cms the current OpenCms user context
  @param input the input to create a resource from
  
  @return a resource wrapper created from the given Object
  
  @throws CmsException in case of errors accessing the OpenCms VFS for reading the resource