public interface DataSourceProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME_DATASET
getDatasourceName() will return this for a dataset.
|
static java.lang.String |
NAME_JSON
getDatasourceName() will return this for a JSON datasource.
|
static java.lang.String |
NAME_LITERAL
getDatasourceName() will return this for the internal literal datasource.
|
static java.lang.String |
NAME_ODATA
getDatasourceName() will return this for a OData datasource.
|
static java.lang.String |
NAME_SFDC
getDatasourceName() will return this for a SalesForce datasource.
|
static java.lang.String |
NAME_SQL
getDatasourceName() will return this for a SQL datasource.
|
static java.lang.String |
NAME_XML
getDatasourceName() will return this for a XML datasource.
|
static java.lang.String |
NAME_XML_1_0
getDatasourceName() will return this for a XML (XPath 1.0) datasource.
|
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<java.lang.String,java.lang.Object> |
getParameters()
This call is for internal engine use only.
|
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 |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
This call is for internal engine use only.
|
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.
|
static final java.lang.String NAME_SQL
static final java.lang.String NAME_JSON
static final java.lang.String NAME_LITERAL
static final java.lang.String NAME_ODATA
static final java.lang.String NAME_SFDC
static final java.lang.String NAME_XML
static final java.lang.String NAME_XML_1_0
static final java.lang.String NAME_DATASET
java.lang.String getDatasourceName()
int getParamMode()
void setParamMode(int paramMode)
paramMode
- the parameter substitution mode.void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters
- This object is directly assigned for use as it is shared. Therefore any changes to it after
this call effect the datasource.java.util.Map<java.lang.String,java.lang.Object> getParameters()
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)
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