Package com.unitesk.aspectrace.html
Class ReportPage
- java.lang.Object
-
- com.unitesk.aspectrace.ReportEntity
-
- com.unitesk.aspectrace.html.ReportPage
-
- Direct Known Subclasses:
HtmlReportPage
,StaticResource
public abstract class ReportPage extends ReportEntity
Report file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CHARSET
-
Constructor Summary
Constructors Constructor Description ReportPage()
ReportPage(java.lang.String path)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
buildRefs()
Builds a reference map.abstract void
generate()
Generates complete page text.java.lang.String
getCharset()
Gets a page coding.ReportGenerator
getGenerator()
Gets generator to which this report page is adjusted.java.lang.String
getPath()
Gets path to page relative to report root.protected static java.lang.String
getRelativePath(java.lang.String from, java.lang.String to)
Gets a relative path.java.lang.String
getRelativePathFrom(ReportPage from)
java.lang.String
getRelativePathFrom(java.lang.String from)
java.lang.String
getRelativePathTo(ReportPage to)
java.lang.String
getRelativePathTo(java.lang.String to)
void
setCharset(java.lang.String charset)
Sets explicitly page coding.protected void
setGenerator(ReportGenerator generator)
void
setPath(java.lang.String newPath)
Sets a path to a page relative to the report root.-
Methods inherited from class com.unitesk.aspectrace.ReportEntity
getAspect, getAssociatedChannel, getTagMarks, setAssociatedChannel, setTagMarks
-
-
-
-
Field Detail
-
DEFAULT_CHARSET
public static final java.lang.String DEFAULT_CHARSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPath
public void setPath(java.lang.String newPath)
Sets a path to a page relative to the report root. If path is set asnull
then the page wouldn't be generated.
-
getPath
public java.lang.String getPath()
Gets path to page relative to report root.
-
getRelativePathFrom
public java.lang.String getRelativePathFrom(java.lang.String from)
-
getRelativePathFrom
public java.lang.String getRelativePathFrom(ReportPage from)
-
getRelativePathTo
public java.lang.String getRelativePathTo(java.lang.String to)
-
getRelativePathTo
public java.lang.String getRelativePathTo(ReportPage to)
-
getRelativePath
protected static java.lang.String getRelativePath(java.lang.String from, java.lang.String to)
Gets a relative path.- Returns:
- Path in the form of "../../../a/b/c/d.html"
-
generate
public abstract void generate() throws java.io.IOException
Generates complete page text.- Throws:
java.io.IOException
- Input-Output error.
-
setCharset
public void setCharset(java.lang.String charset)
Sets explicitly page coding.
-
getCharset
public java.lang.String getCharset()
Gets a page coding. If the coding is not set then agenerator
default coding is returned.
-
buildRefs
public void buildRefs()
Builds a reference map. It's possible to include pages in one another as sections. Method is called by a report generator right before a generation start when there is full set of report pages and resolvers.
-
getGenerator
public ReportGenerator getGenerator()
Gets generator to which this report page is adjusted.
-
setGenerator
protected void setGenerator(ReportGenerator generator)
-
-