Retrieves the body of a page in HTML rendering.

@param page a {@link com.atlassian.confluence.pages.Page} object.
@return the body of a page in HTML rendering.
423380
public String getPageContent(Page page) {
        try {
            return getPageContent(page, false);
        } catch (GreenPepperServerException e) {
            return e.getMessage();
        }
    }
877971
protected function getPage($page)
    {
        // Handle passed cID
        if (is_numeric($page)) {
            return Page::getByID($page);
        }

        // Handle passed /path/to/collection
        if (is_string($page)) {
            return Page::getByPath($page);
        }

        // If it's a page, just return the page
        if ($page instanceof Page) {
            return $page;
        }

        // If it's not a page but it's a collection, lets try getting a page by id
        if ($page instanceof Collection) {
            return $this->getPage($page->getCollectionID());
        }
    }
251334
public String getRootPath(Page page) {
    if (page == null) {
      return null;
    }
    return getRootPath(page.adaptTo(Resource.class));
  }
950132
public PageResult<Entity> page(Entity where, Page page) throws SQLException {
		return this.page(where.getFieldNames(), where, page);
	}
99893
public static Document parseBodyFragment(String bodyHtml, String baseUri) {
        return Parser.parseBodyFragment(bodyHtml, baseUri);
    }
1119725
public int pagein(Page og){
    byte[] header_base=og.header_base;
    int header=og.header;
    byte[] body_base=og.body_base;
    int body=og.body;
    int bodysize=og.body_len;
    int segptr=0;

    int version=og.version();
    int continued=og.continued();
    int bos=og.bos();
    int eos=og.eos();
    long granulepos=og.granulepos();
    int _serialno=og.serialno();
    int _pageno=og.pageno();
    int segments=header_base[header+26]&0xff;

    // clean up 'returned data'
    {
      int lr=lacing_returned;
      int br=body_returned;

      // body data
      if(br!=0){
        body_fill-=br;
        if(body_fill!=0){
          System.arraycopy(body_data, br, body_data, 0, body_fill);
        }
        body_returned=0;
      }

      if(lr!=0){
        // segment table
        if((lacing_fill-lr)!=0){
          System.arraycopy(lacing_vals, lr, lacing_vals, 0, lacing_fill-lr);
          System.arraycopy(granule_vals, lr, granule_vals, 0, lacing_fill-lr);
        }
        lacing_fill-=lr;
        lacing_packet-=lr;
        lacing_returned=0;
      }
    }

    // check the serial number
    if(_serialno!=serialno)
      return (-1);
    if(version>0)
      return (-1);

    lacing_expand(segments+1);

    // are we in sequence?
    if(_pageno!=pageno){
      int i;

      // unroll previous partial packet (if any)
      for(i=lacing_packet; i<lacing_fill; i++){
        body_fill-=lacing_vals[i]&0xff;
        //System.out.println("??");
      }
      lacing_fill=lacing_packet;

      // make a note of dropped data in segment table
      if(pageno!=-1){
        lacing_vals[lacing_fill++]=0x400;
        lacing_packet++;
      }

      // are we a 'continued packet' page?  If so, we'll need to skip
      // some segments
      if(continued!=0){
        bos=0;
        for(; segptr<segments; segptr++){
          int val=(header_base[header+27+segptr]&0xff);
          body+=val;
          bodysize-=val;
          if(val<255){
            segptr++;
            break;
          }
        }
      }
    }

    if(bodysize!=0){
      body_expand(bodysize);
      System.arraycopy(body_base, body, body_data, body_fill, bodysize);
      body_fill+=bodysize;
    }

    {
      int saved=-1;
      while(segptr<segments){
        int val=(header_base[header+27+segptr]&0xff);
        lacing_vals[lacing_fill]=val;
        granule_vals[lacing_fill]=-1;

        if(bos!=0){
          lacing_vals[lacing_fill]|=0x100;
          bos=0;
        }

        if(val<255)
          saved=lacing_fill;

        lacing_fill++;
        segptr++;

        if(val<255)
          lacing_packet=lacing_fill;
      }

      /* set the granulepos on the last pcmval of the last full packet */
      if(saved!=-1){
        granule_vals[saved]=granulepos;
      }
    }

    if(eos!=0){
      e_o_s=1;
      if(lacing_fill>0)
        lacing_vals[lacing_fill-1]|=0x200;
    }

    pageno=_pageno+1;
    return (0);
  }
542478
@Deprecated
  public RequestTemplate body(String bodyText) {
    byte[] bodyData = bodyText != null ? bodyText.getBytes(UTF_8) : null;
    return body(bodyData, UTF_8);
  }
1172725
private Page loadPhysical(PageContext pc, Page page) throws TemplateException {
	if (!mapping.hasPhysical()) return null;

	ConfigWeb config = pc.getConfig();
	PageContextImpl pci = (PageContextImpl) pc;
	if ((mapping.getInspectTemplate() == Config.INSPECT_NEVER || pci.isTrusted(page)) && isLoad(LOAD_PHYSICAL)) return page;
	Resource srcFile = getPhyscalFile();

	long srcLastModified = srcFile.lastModified();
	if (srcLastModified == 0L) return null;

	// Page exists
	if (page != null) {
	    // if(page!=null && !recompileAlways) {
	    if (srcLastModified != page.getSourceLastModified()) {

		// same size, maybe the content has not changed?
		boolean same = false;
		if (page instanceof PagePro && ((PagePro) page).getSourceLength() == srcFile.length()) {
		    PagePro pp = (PagePro) page;
		    try {
			same = pp.getHash() == PageSourceCode.toString(this, config.getTemplateCharset()).hashCode();
		    }
		    catch (IOException e) {/*
					    * in case this exception happen, the following compile process will fail as well and report the
					    * error
					    */}

		}
		if (!same) {
		    this.page = page = compile(config, mapping.getClassRootDirectory(), page, false, pc.ignoreScopes());
		    page.setPageSource(this);
		    page.setLoadType(LOAD_PHYSICAL);
		}
	    }

	}
	// page doesn't exist
	else {
	    Resource classRootDir = mapping.getClassRootDirectory();
	    Resource classFile = classRootDir.getRealResource(getJavaName() + ".class");
	    boolean isNew = false;
	    // new class
	    if (flush || !classFile.exists()) {
		this.page = page = compile(config, classRootDir, null, false, pc.ignoreScopes());
		flush = false;
		isNew = true;
	    }
	    // load page
	    else {
		try {
		    this.page = page = newInstance(mapping.getPhysicalClass(this.getClassName()));
		}
		catch (Throwable t) {
		    ExceptionUtil.rethrowIfNecessary(t);
		    this.page = page = null;
		}
		if (page == null) this.page = page = compile(config, classRootDir, null, false, pc.ignoreScopes());
	    }

	    // check if version changed or lasMod
	    if (!isNew && (srcLastModified != page.getSourceLastModified() || page.getVersion() != pc.getConfig().getFactory().getEngine().getInfo().getFullVersionInfo())) {
		isNew = true;
		this.page = page = compile(config, classRootDir, page, false, pc.ignoreScopes());
	    }
	    page.setPageSource(this);
	    page.setLoadType(LOAD_PHYSICAL);
	}
	pci.setPageUsed(page);
	return page;
    }
335107
private Page getExistingPage(final String name) throws FrameworkException {
		return StructrApp.getInstance().nodeQuery(Page.class).andName(name).getFirst();
	}
1142309
public static responderhtmlpage get(nitro_service service, String name) throws Exception{
		responderhtmlpage obj = new responderhtmlpage();
		obj.set_name(name);
		responderhtmlpage response = (responderhtmlpage) obj.get_resource(service);
		return response;
	}
1186801
String getHTMLForAdminPage(Map<String,String> params) {
        try {
            String template = m_htmlTemplates.get("admintemplate.html");
            for (Entry<String, String> e : params.entrySet()) {
                String key = e.getKey().toUpperCase();
                String value = e.getValue();
                if (key == null) continue;
                if (value == null) value = "NULL";
                template = template.replace("#" + key + "#", value);
            }
            return template;
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return "<html><body>An unrecoverable error was encountered while generating this page.</body></html>";
    }
566219
public Page<T> nextPage(final Page<T> page) {
        return nextPage(page, Twilio.getRestClient());
    }
830271
public function render_head_html($page = null) {
        if (is_null($page)) {
            global $PAGE;
            $page = $PAGE;
        }
        // TODO go via behaviour.
        return $this->question->get_renderer($page)->head_code($this) .
                $this->behaviour->get_renderer($page)->head_code($this);
    }
1351040
public static <C extends Page> String absoluteUrlFor(final Class<C> page)
	{
		return absoluteUrlFor(page, null, false);
	}
1249869
public static PageRequest of(final int page, final int size) {
    return PageRequest.of(page, size, Sort.unsorted());
  }
1222909
public function getAll($page = null)
    {
        $page = !empty($page) ? "page={$page}" : '';
        $request = $this->paystackHttpClient->get(
            $this->transformUrl(Resource::CUSTOMERS_URL, '').$page
        );

        return $this->processResourceRequestResponse($request);
    }
1106829
protected String renderErrorPageToHTML(final WComponent errorPage) {

		// Check if using the default error page
		boolean defaultErrorPage = errorPage instanceof FatalErrorPage;

		String html = null;

		// If not default implementation of error page, Transform error page to HTML
		if (!defaultErrorPage) {
			// Set UIC and Environment (Needed for Theme Paths)
			UIContext uic = new UIContextImpl();
			uic.setEnvironment(createEnvironment());
			UIContextHolder.pushContext(uic);
			try {
				html = WebUtilities.renderWithTransformToHTML(errorPage);
			} catch (Exception e) {
				LOG.warn("Could not transform error page.", e);
			} finally {
				UIContextHolder.popContext();
			}
		}

		// Not transformed. So just render.
		if (html == null) {
			UIContextHolder.pushContext(new UIContextImpl());
			try {
				html = WebUtilities.render(errorPage);
			} catch (Exception e) {
				LOG.warn("Could not render error page.", e);
				html = "System error occurred but could not render error page.";
			} finally {
				UIContextHolder.popContext();
			}
		}

		return html;
	}