public interface DataSourceProvider
Modifier and Type | Method and Description |
---|---|
void |
approveDenyModifySelect(BaseTag xmlTag)
Verifys that a tag select is approved by a user defined callback
Or denies by throwing a DatasourceException or modifies the select
Called in XmlSubNodeVisitor when tag is validated
|
void |
close()
Called when processing is complete.
|
java.lang.String |
getDatasourceName()
returns the name of this type in the form "sql", "xml", etc.
|
java.util.Map |
getMap()
Returns the map of variables for this datasource.
|
int |
getParamMode()
Get the parameter substitution mode.
|
int |
getQueryMode(java.lang.String select,
BaseTag tag)
Returns the mode of a query.
|
DataSourceNode |
getRootNode()
Returns the root node for this data set.
|
TagAttributes[] |
getTagAttributes()
Returns the allowed attributes for all tags.
|
void |
populateDatasourceException(DataSourceException exception,
BaseTag tag,
DataSourceNode[] stack)
Populates that properties in a DataSourceException via DataSourceException.setProperties().
|
void |
setDatasets(java.lang.Object[] datasets)
Set the datasets to use with this datasource.
|
void |
setMap(java.util.Map map)
Adds a map that is used for ${variable} substitution.
|
void |
setParamMode(int paramMode)
Set the parameter substitution mode.
|
void |
validateTag(BaseTag xmlTag)
Verifys that a tag has all required attributes and no unknown attributes.
|
java.lang.String getDatasourceName()
int getParamMode()
void setParamMode(int paramMode)
paramMode
- the parameter substitution mode.void setMap(java.util.Map map)
map
- The map of string pairs.java.util.Map getMap()
void setDatasets(java.lang.Object[] datasets)
datasets
- The datasets to use. Can be null to turn off datasets. This is a DatasetBase[] but because of
how the .NET engine is structured, we need to declare it as an object.DataSourceNode getRootNode() throws DataSourceException
DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.void close() throws DataSourceException
DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.TagAttributes[] getTagAttributes()
void validateTag(BaseTag xmlTag) throws TagException, DataSourceException
xmlTag
- The tag to checkTagException
- thrown if illegal parameters passed in.DataSourceException
void populateDatasourceException(DataSourceException exception, BaseTag tag, DataSourceNode[] stack)
exception
- The exception to populate.tag
- The tag we're processing. null if no tag.stack
- The node stack at the time of the exception. null if not relevant.void approveDenyModifySelect(BaseTag xmlTag) throws DataSourceException
xmlTag
- The tag to checkDataSourceException
- thrown if illegal parameters passed in.int getQueryMode(java.lang.String select, BaseTag tag) throws DataSourceException
select
- The querytag
- The tag this select is for. This may be null.DataSourceException
Copyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software