|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.builders.webapp.methods.SqlBuilderComm
public class SqlBuilderComm
Implementation of methods used by the Sql builders to communicate amongst themselves during design-time, regen, and runtime. Any non-Sql builders that need to interract with the Sql builders at regen or runtime should use the methods and constants defined here.
Nested Class Summary | |
---|---|
static class |
SqlBuilderComm.Constants
Class defining all of the constants used in Sql builder communication. |
Field Summary | |
---|---|
static com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator |
cachingTransformLocator
Class used to locate webApp variables that are defined to contain cachable Sql Transform helpers at runtime. |
static com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator |
dataSourceLocator
Class used to locate webApp variables that are defined to contain Sql DataSource helpers at runtime. |
static com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator |
statementLocator
Class used to locate webApp variables that are defined to contain Sql Statement helpers at runtime. |
static com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator |
transactionLocator
Class used to locate webApp variables that are defined to contain Sql Transaction helpers at runtime. |
static com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator |
transformLocator
Class used to locate webApp variables that are defined to contain Sql Transform helpers at runtime. |
Constructor Summary | |
---|---|
SqlBuilderComm()
|
Method Summary | |
---|---|
static boolean |
artifactIsShared(WebAppObject artifact)
Determine if a webApp artifact is shared by more than one Sql builder. |
static IXml |
export(IXml xmlToUpdate,
java.lang.String path,
java.util.List children)
This method updates an XML structure with a list of new values for some arbitrary path. |
static IXml |
export(IXml xmlToUpdate,
java.lang.String path,
java.lang.Object value)
This method updates an XML structure with a new value for some arbitrary path. |
static IXml |
export(WebApp webApp,
java.lang.String builderName,
BuilderInputs builderInputs)
This method takes a set of builder inputs and exports them to the webApp so they can be referenced by other (possibly higher-level) builders during regen and runtime. |
static java.util.List |
getDataSourceVariableNames(WebApp webApp)
Get the names of all webApp variables that are defined to contain a Sql DataSource helper class at runtime. |
static IXml |
getExportedInput(WebApp webApp,
java.lang.String builderName,
java.lang.String xPath)
Method used to retrieve an XML element from some builder's exported inputs. |
static java.lang.String |
getExportedInputText(WebApp webApp,
java.lang.String builderName,
java.lang.String xPath)
Method used to retrieve a string from some builder's exported inputs. |
static java.util.List |
getStatementVariableNames(WebApp webApp)
List the names of all webApp variables that are defined to contain a Sql Statement helper class at runtime. |
static java.util.List |
getTransactionVariableNames(WebApp webApp)
List the names of all webApp variables that are defined to contain a Sql Transform helper class (regular or caching) at runtime. |
static java.util.List |
getTransformMethodNames(WebApp webApp)
Get the names of all webApp methods that qualify to be used as a custom transform selection for transaction steps defined in the Sql Transaction builders. |
static java.util.List |
getTransformVariableNames(WebApp webApp)
List the names of all webApp variables that are defined to contain a Sql Transform helper class (regular or caching) at runtime. |
static java.util.List |
getXmlResultVariableNames(WebApp webApp)
Get the names of all webApp variables that are defined to contain XML data transformed from JDBC ResultSets. |
static boolean |
isCachableTransformHelperVariable(Variable variable)
Check a webApp variable to see if it has been defined as containing a caching Sql Transform helper LJO at runtime. |
static boolean |
isDataSourceHelperVariable(Variable variable)
Check a webApp variable to see if it has been defined as containing a Sql DataSource helper LJO at runtime. |
static boolean |
isStatementHelperVariable(Variable variable)
Check a webApp variable to see if it has been defined as containing a Sql Statement helper LJO at runtime. |
static boolean |
isTransactionHelperVariable(Variable variable)
Check a webApp variable to see if it has been defined as containing a Sql Transaction helper LJO at runtime. |
static boolean |
isTransformHelperVariable(Variable variable)
Check a webApp variable to see if it has been defined as containing a Sql Transform helper LJO at runtime. |
static boolean |
isTransformMethod(Method method)
Method to verify that a webApp method has the proper signature to be a custom transform for a Sql Transaction step. |
static void |
markAsDependent(java.lang.String builderName,
WebAppObject artifact)
Register the Sql builder as being dependent upon the given webApp artifact. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator cachingTransformLocator
public static final com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator dataSourceLocator
public static final com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator statementLocator
public static final com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator transactionLocator
public static final com.bowstreet.builders.webapp.methods.SqlBuilderComm.SqlVariableLocator transformLocator
Constructor Detail |
---|
public SqlBuilderComm()
Method Detail |
---|
public static boolean artifactIsShared(WebAppObject artifact)
artifact
- The webApp artifact to be inspected.
true
if the artifact is shared by
2 or more Sql builders. Returns false
otherwise
and when artifact
is null
.public static IXml export(IXml xmlToUpdate, java.lang.String path, java.util.List children)
xmlToUpdate
.
xmlToUpdate
- The XML structure to be updated.path
- The path that identifies the element to be added/updated.children
- The content to be assigned to the identified element.
xmlToUpdate
or path
is
null
. If children
is null or empty and the
path is found, then all the content of the identified element will be
removed. Children values that are null
will be omitted.public static IXml export(IXml xmlToUpdate, java.lang.String path, java.lang.Object value)
xmlToUpdate
.
xmlToUpdate
- The XML structure to be updated.path
- The path that identifies the element to be added/updated.value
- The content to be assigned to the identified element.
xmlToUpdate
or path
is
null
. If value
is null and the path is
found, then all the content of the identified element will be
removed.public static IXml export(WebApp webApp, java.lang.String builderName, BuilderInputs builderInputs)
webApp
- The webApp into which the builder inputs will be exported.builderName
- The name of the builder whose inputs are being exported.builderInputs
- The builder inputs to be exported.
null
will be returned if webApp
or builderName
are null
.
If builderInputs
is null
, then a skeletal XML structure is
retured; this skeleton can be used as a wrapper for manually exporting a subset of
a builder's inputs. Note: a copy of this structure should be made before the XML
is modified unless you want the modifications to be visible to others.public static java.util.List getDataSourceVariableNames(WebApp webApp)
webApp
- The webApp in which to seach for DataSource helpers.
null
. If webApp
is
null
, then an empty list is returned.public static IXml getExportedInput(WebApp webApp, java.lang.String builderName, java.lang.String xPath)
xPath
parameter will be the name of
some builder input that was exported by the builder at regen. Most
of these names are defined in the builder API classes. For example,
SqlTransformToXml.BuilderStaticValues.XmlVariableName
defines the builder input used to identify the webApp variable that
will contain XML transformed from a JDBC ResultSet.
webApp
- The webApp into which the builder inputs were exported.builderName
- The name of the builder whose inputs were exported.xPath
- The XPath that identifies the element to be returned.
xPath
is null
, then the whole XML
structure of the exported builder inputs is returned. If either webApp
or builderName
is null
, then null
is
returned. Note: a copy of the returned XML structure should be made before
the XML is modified unless you want the modifications to be visible to
others.getExportedInputText( WebApp, String, String )
,
export( WebApp, String, BuilderInputs )
public static java.lang.String getExportedInputText(WebApp webApp, java.lang.String builderName, java.lang.String xPath)
xPath
parameter will be the name of
some string-values builder input that was exported by the builder at
regen. Most of these names are defined in the builder API classes.
For example, SqlTransformToXml.BuilderStaticValues.XmlVariableName
defines the builder input used to identify the webApp variable that
will contain XML transformed from a JDBC ResultSet.
webApp
- The webApp into which the builder inputs were exported.builderName
- The name of the builder whose inputs were exported.xPath
- The XPath that identifies the element whose text is to
be returned.
xPath
is null
, then null
is returned. If webApp
, builderName
, or
xPath
is null
, then null
is
returned.getExportedInput( WebApp, String, String )
,
export( WebApp, String, BuilderInputs )
public static java.util.List getStatementVariableNames(WebApp webApp)
webApp
- The webApp in which to seach for Statement helpers.
null
. If webApp
is
null
, then an empty list is returned.public static java.util.List getTransactionVariableNames(WebApp webApp)
webApp
- The webApp in which to seach for Transform helpers.
null
. If webApp
is
null
, then an empty list is returned.public static java.util.List getTransformMethodNames(WebApp webApp)
webApp
- The webApp in which to seach for transform methods.
null
. If webApp
is
null
, then an empty list is returned.public static java.util.List getTransformVariableNames(WebApp webApp)
webApp
- The webApp in which to seach for Transform helpers.
null
. If webApp
is
null
, then an empty list is returned.public static java.util.List getXmlResultVariableNames(WebApp webApp)
webApp
- The webApp in which to seach for XML result variables.
null
. If webApp
is
null
, then an empty list is returned.public static boolean isCachableTransformHelperVariable(Variable variable)
variable
- The webApp variable to be inspected.
true
if the variable has an object class
as defined by SqlTransformToXmlBuilder.cachableHelperInterfaceClass
.
Returns false
otherwise and when variable
is null
.isTransformHelperVariable( Variable )
public static boolean isDataSourceHelperVariable(Variable variable)
variable
- The webApp variable to be inspected.
true
if the variable has an object class
as defined by SqlDataSourceBuilder.helperInterfaceClass
.
Returns false
otherwise and when variable
is null
.public static boolean isStatementHelperVariable(Variable variable)
variable
- The webApp variable to be inspected.
true
if the variable has an object class
as defined by SqlStatementBuilder.helperInterfaceClass
.
Returns false
otherwise and when variable
is null
.public static boolean isTransactionHelperVariable(Variable variable)
variable
- The webApp variable to be inspected.
true
if the variable has an object class
as defined by SqlTransactionBuilder.helperInterfaceClass
.
Returns false
otherwise and when variable
is null
.public static boolean isTransformHelperVariable(Variable variable)
variable
- The webApp variable to be inspected.
true
if the variable has an object class
as defined by SqlTransformToXmlBuilder.helperInterfaceClass
.
Returns false
otherwise and when variable
is null
.isCachableTransformHelperVariable( Variable )
public static boolean isTransformMethod(Method method)
method
- A webApp method definiton to be checked for conformance
to the Sql Transaction custom transform method signature.
true
if the method signature matches what's
expected for a custom tranform. Otherwise false
is returned.public static void markAsDependent(java.lang.String builderName, WebAppObject artifact)
builderName
- The Sql builder that has a dependency.artifact
- The webApp artifact the builder is dependent upon.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |