|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.designer.domino.xsp.api.published.AbstractDataPublishedProvider
public abstract class AbstractDataPublishedProvider
An abstract Published Object provider used by data sources to contribute to the Domino Designer data tooling.
A subclass should be created for any data source or data context that wishes to contribute to the
Domino Designer Data Tooling model, e.g. data sources wishing to appear in the Data Palette, and in the
data panel for controls must implement the
com.ibm.designer.domino.scripting.api.published.PublishedObjectProvider interface
or preferrably extend this abstract class.
| Field Summary | |
|---|---|
static java.lang.String |
DESIGNER_NAMESPACEURI
The namespace URI used by the XPages runtime; "http://www.ibm.com/xsp/core" |
| Fields inherited from interface com.ibm.designer.domino.scripting.api.published.PublishedObjectProvider |
|---|
CURRENT_DOC_VAR |
| Constructor Summary | |
|---|---|
AbstractDataPublishedProvider()
|
|
| Method Summary | |
|---|---|
protected DesignerPublishedObject |
createPublishedObject(java.lang.String var)
Create a new published object. |
abstract java.lang.String |
getLocalName()
Returns the localName of this tag. |
protected java.lang.String |
getNameSpaceURI()
Returns the XML namespace URI for the tag returned in getLocalName(). |
void |
getPublishedObject(java.util.Map<java.lang.String,IScriptData.PublishedObject> map,
org.w3c.dom.Node node,
DesignerProject project,
boolean addCurrentDocument)
Gets called by the XPage Editor data tooling framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DESIGNER_NAMESPACEURI
"http://www.ibm.com/xsp/core"
| Constructor Detail |
|---|
public AbstractDataPublishedProvider()
| Method Detail |
|---|
public abstract java.lang.String getLocalName()
node.getLocalName() on the same
tag.
public void getPublishedObject(java.util.Map<java.lang.String,IScriptData.PublishedObject> map,
org.w3c.dom.Node node,
DesignerProject project,
boolean addCurrentDocument)
throws com.ibm.designer.prj.resources.commons.DesignerProjectException
PublishedObjectProviderPublishedObject is added
to the map as is appropriate based on the selection parameter. The selection parameter is the currently selected
tag in the XPages Editor.
<xp:view>
<xp:this.data>
<my:myRelationalDataSource var="db2" server="mydb2serverB" db="mydb" ...../>
</xp:this.data>
<xp:panel>
<xp:this.data>
<my:myRelationalDataSource var="db1" server="mydb2serverA" db="mydb" ...../>
</xp:this.data>
........
<xp:inputText id="inputText1"></xp:inputText>
</xp:panel>
</xp:view>
As a use case we will assume that the user has selected the inputText tag in the XPage above. At this point the
Domino Designer data tooling framework must find out what data is available to the inputText tag. com.ibm.designer.domino.xsp.api.published.AbstractDataContainerPublishedProvider
using the com.ibm.designer.domino.scripting.publishedProvider extension point. This concrete implementation searches through
the children of <xp:panel> for instances of the this.data tag.this.data tag is found. The <xp:panel> implementation next searches through the children
of the this.data tag. It finds a tag called myRelationalDataSource. myRelationalDataSource to provide an implementation of
com.ibm.designer.domino.scripting.api.published.PublishedObjectProvider using the
com.ibm.designer.domino.scripting.publishedProvider extension point so that the Domino Designer
data tooling code can interpret the data being contributed by the myRelationalDataSource tag.
In this case myRelationalDataSource has contributed a concrete implementation of com.ibm.designer.domino.xsp.api.published.AbstractDataPublishedProvider.
This implementation reads the relational database that is defined in its attributes and provides a schema representation
of the database to the Domino Designer data tooling framework via its
PublishedObject.
this.data have contributed their PublishedObjects to the map
the data tooling will once again walk upwards through the DOM hierarchy.
this.data tag.myRelationalDataSource tag is encountered and it PublishedObjectProvider is
queried to add a PublishedObject to the map via the getPublishedObject(Map, Node, ICommonDesignerProject, boolean)
method.
PublishedObject map.
The string that corresponds to the PublishedObject in the map is assumed to be the PublishedObject's
name. The name is shown in the list of Data Sources in both the properties panels and also in the Data Palette view. Once the user
selects that name in the data panel or in the data palette view the PublishedObject is queried for information that
is required to further populate the tooling. Specifically the PublishedObject is queried for objects that correspond to the
properties defined in IScriptData
getPublishedObject in interface PublishedObjectProvidermap - a map of PublishedObjects. Items are contributed to the map on a key - value pair basis where
the key is typically the string returned by IScriptData.PublishedObject.getName()
and the value is an instance of IScriptData.PublishedObject. PublishedObects which are in turn queried for further information about the data source.node - the currently selected DOM node on the XPage.project - an interface used to describe the currently selected IBM Lotus Notes application.
com.ibm.designer.prj.resources.commons.DesignerProjectException - an error was encountered when accessing the db.IScriptData,
IScriptData.PublishedObject,
DesignerPublishedObject,
IScriptData.PublishedObject.getProperty(String)protected DesignerPublishedObject createPublishedObject(java.lang.String var)
com.ibm.designer.domino.scripting.api.published.DesignerPublishedObject
var - - string from "var" attribute of the element.
protected java.lang.String getNameSpaceURI()
getLocalName().
"http://www.ibm.com/xsp/core"
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||