|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apertereports.util.DashboardUtil
public final class DashboardUtil
Utility class with methods for report tags retrieval, regexp matching etc.
| Nested Class Summary | |
|---|---|
static class |
DashboardUtil.MatchHandler
Handles single group match. |
static class |
DashboardUtil.MatchHandlerWithList
Handles multiple groups match. |
| Field Summary | |
|---|---|
static String |
CHART_SOURCE_PREFIX_REGEXP
Regexp that identifies the anchor of the report drilldown in dashboard HTML. |
static String |
CHART_SOURCE_PREFIX_TEXT
Used as a JRExporter parameter to identify drilldown reports. |
static Pattern |
CHART_TAG_PATTERN
Regexp that identifies a complex drilldown anchor. |
static Pattern |
DRILLDOWN_TAG_PATTERN
|
static Pattern |
REPORT_TAG_PATTERN
Regexp that identifies the anchor of the report in dashboard HTML. |
| Method Summary | |
|---|---|
static void |
executeTemplateMatcher(String template,
Pattern pattern,
DashboardUtil.MatchHandler handler)
Searches a given template for a regexp pattern. |
static void |
executeTemplateMatcherWithList(String template,
Pattern pattern,
DashboardUtil.MatchHandlerWithList handler)
Searches a given template for a regexp pattern. |
static byte[] |
exportReportOrderData(ReportOrder reportOrder,
ReportConstants.ReportType format)
Extracts the report data from given ReportOrder instance. |
static Integer |
generateDrilldownId(Set<Integer> actualIds)
Generates a temporary drilldown component id based on actual ids. |
static Set<Integer> |
getReportConfigIds(String template)
Parses the input HTML and extracts the report tag. |
static Pair<String,Map<String,String>> |
parseHtmlTag(String tag,
boolean spanStyle)
This method parses a HTML tag. |
static Map<String,List<String>> |
parseHyperlinkParameters(String hyperlink)
This method parses a href HTML tag's parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CHART_SOURCE_PREFIX_REGEXP
public static final String CHART_SOURCE_PREFIX_TEXT
public static final Pattern REPORT_TAG_PATTERN
public static Pattern CHART_TAG_PATTERN
public static final Pattern DRILLDOWN_TAG_PATTERN
| Method Detail |
|---|
public static Integer generateDrilldownId(Set<Integer> actualIds)
actualIds - Used ids
public static Pair<String,Map<String,String>> parseHtmlTag(String tag,
boolean spanStyle)
throws Exception
href) tag that has been identified is later
transformed to a report generation link or drilldown. The parameters it contains are passed
to an Embedded instance holding the report.
tag - A HTML tagspanStyle - TRUE to include span styles
Exception - On XML exception
public static Map<String,List<String>> parseHyperlinkParameters(String hyperlink)
throws UnsupportedEncodingException
href HTML tag's parameters.
These are used as a report generation request parameters when a drilldown link was clicked.
hyperlink - Input hyperlink
UnsupportedEncodingException - On encoding errorpublic static Set<Integer> getReportConfigIds(String template)
report tag. These are used as report config ids.
template - Input HTML
public static void executeTemplateMatcher(String template,
Pattern pattern,
DashboardUtil.MatchHandler handler)
DashboardUtil.MatchHandler instance. Extracts only 1 group.
template - Input templatepattern - Search patternhandler - Match handler
public static void executeTemplateMatcherWithList(String template,
Pattern pattern,
DashboardUtil.MatchHandlerWithList handler)
DashboardUtil.MatchHandlerWithList instance.
template - Input templatepattern - Search patternhandler - Match handler
public static byte[] exportReportOrderData(ReportOrder reportOrder,
ReportConstants.ReportType format)
throws AperteReportsException
ReportOrder instance.
reportOrder - Input report orderformat - Output format
org.apertereports.common.exception.ReportException - On JRExporter error
net.sf.jasperreports.engine.JRException - On JasperPrint load error
AperteReportsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||