|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.xreporter.report.Catalog
A catalog groups a number of report definitions and child catalogs. The goal is to be able to show a hierarchical list of report definitions to the user.
Field Summary | |
protected static java.lang.String |
CATALOG_EL
|
protected java.util.List |
childCatalogs
|
protected java.util.Map |
childCatalogsByName
|
protected java.util.List |
childReportDefinitions
|
protected static java.lang.String |
DESCRIPTION_ATTR
|
protected static java.lang.String |
ID_ATTR
|
protected java.lang.String |
name
|
protected static java.lang.String |
NAME_ATTR
|
protected static java.lang.String |
REPORT_DEF_EL
|
Constructor Summary | |
protected |
Catalog(java.lang.String name)
|
Method Summary | |
protected void |
addCatalog(Catalog catalog)
|
void |
addReportDefinition(ReportDefinition reportDefinition)
|
void |
generateSaxFragment(org.xml.sax.ContentHandler contentHandler,
java.util.Set allowedReportDefinitionIds,
DataSource dataSource,
ResourceHandle resourceHandle)
Generates an XML representation of this catalog and its subcatalogs. |
void |
generateSaxFragmentsForChildCatalogs(org.xml.sax.ContentHandler contentHandler,
java.util.Set allowedReportDefinitionIds,
DataSource dataSource,
ResourceHandle resourceHandle)
Special variant of generateSaxFragment(org.xml.sax.ContentHandler, java.util.Set, org.outerj.xreporter.datasource.DataSource, org.outerj.xreporter.resource.ResourceHandle) that only generates SAX events for the child catalogs
of this catalog, and not for this catalog itself. |
protected Catalog |
getCatalog(java.util.List catalogPathList)
Finds and returns a catalog, creating it if it does not exist. |
java.lang.String |
getName()
Returns the name of this catalog, which is actually a resource bundle key. |
java.lang.String |
getName(ResourceHandle resourceHandle)
|
static java.util.List |
parseCatalogPath(java.lang.String catalogPath)
Parses a path-string in a form like "abc/def/ghi" to a list of catalog names (i.e. |
protected boolean |
somethingAllowedPresent(java.util.Set allowedReportDefinitions,
DataSource dataSource)
Checks if there is any report in this catalog that is allowed, or if not found, if there is any in any of the subcatalogs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected java.util.List childCatalogs
protected java.util.Map childCatalogsByName
protected java.util.List childReportDefinitions
protected static final java.lang.String CATALOG_EL
protected static final java.lang.String NAME_ATTR
protected static final java.lang.String REPORT_DEF_EL
protected static final java.lang.String ID_ATTR
protected static final java.lang.String DESCRIPTION_ATTR
Constructor Detail |
protected Catalog(java.lang.String name)
Method Detail |
public java.lang.String getName()
getName()
.
public java.lang.String getName(ResourceHandle resourceHandle)
public void addReportDefinition(ReportDefinition reportDefinition)
public static java.util.List parseCatalogPath(java.lang.String catalogPath)
protected Catalog getCatalog(java.util.List catalogPathList)
catalogPathList
- a list in which each item is a string representing a portion of the path to the
catalog. E.g. if the catalog-path would be 'abc/def/ghi', then the items in this list are 'abc', 'def', 'ghi'.protected void addCatalog(Catalog catalog)
public void generateSaxFragment(org.xml.sax.ContentHandler contentHandler, java.util.Set allowedReportDefinitionIds, DataSource dataSource, ResourceHandle resourceHandle) throws org.xml.sax.SAXException
contentHandler
- allowedReportDefinitionIds
- a set containing the report definition id's that a certain user can viewdataSource
- the selected dataSource, only reports compatible with this datasource will be added to the catalog
org.xml.sax.SAXException
public void generateSaxFragmentsForChildCatalogs(org.xml.sax.ContentHandler contentHandler, java.util.Set allowedReportDefinitionIds, DataSource dataSource, ResourceHandle resourceHandle) throws org.xml.sax.SAXException
generateSaxFragment(org.xml.sax.ContentHandler, java.util.Set, org.outerj.xreporter.datasource.DataSource, org.outerj.xreporter.resource.ResourceHandle)
that only generates SAX events for the child catalogs
of this catalog, and not for this catalog itself. Usefull if you have a "root" catalog for which you
do not want to generate SAX events.
org.xml.sax.SAXException
protected boolean somethingAllowedPresent(java.util.Set allowedReportDefinitions, DataSource dataSource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |