Package org.apache.sling.cms.insights
Interface PageInsightRequest
-
- All Superinterfaces:
InsightRequest
public interface PageInsightRequest extends InsightRequest
Represents an insight request
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sling.cms.insights.InsightRequest
InsightRequest.TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PagegetPage()Gets the page backing this requestorg.jsoup.nodes.ElementgetPageBodyElement()Gets a JSoup Element of the body of the page, not the full page (e.g.StringgetPageBodyHtml()Gets the HTML of the body of the page, not the full page (e.g.org.jsoup.nodes.DocumentgetPageDocument()Gets the page HTML as a JSoup Document.StringgetPageHtml()Gets the page HTML.default InsightRequest.TYPEgetType()Get the type of this request.-
Methods inherited from interface org.apache.sling.cms.insights.InsightRequest
getResource
-
-
-
-
Method Detail
-
getPage
Page getPage()
Gets the page backing this request- Returns:
- the page
-
getPageBodyElement
org.jsoup.nodes.Element getPageBodyElement() throws IOExceptionGets a JSoup Element of the body of the page, not the full page (e.g. no header).- Returns:
- the HTML of the body
- Throws:
IOException- an exception occurs retrieving the content
-
getPageBodyHtml
String getPageBodyHtml() throws IOException
Gets the HTML of the body of the page, not the full page (e.g. no header).- Returns:
- the HTML of the body
- Throws:
IOException- an exception occurs retrieving the content
-
getPageDocument
org.jsoup.nodes.Document getPageDocument() throws IOExceptionGets the page HTML as a JSoup Document.- Returns:
- the page HTML
- Throws:
IOException- an exception occurs retrieving the content
-
getPageHtml
String getPageHtml() throws IOException
Gets the page HTML. Loads the HTML lazily so the initial request may take a bit but others will be quick.- Returns:
- a string representation of the HTML for a page
- Throws:
IOException- an exception occurs retrieving the content
-
getType
default InsightRequest.TYPE getType()
Description copied from interface:InsightRequestGet the type of this request.- Specified by:
getTypein interfaceInsightRequest- Returns:
- the type
-
-