interface Cacheable
All Known Implementing Classes:
jsx3.chart.AreaChart,
jsx3.chart.BCChart,
jsx3.chart.BarChart,
jsx3.chart.CartesianChart,
jsx3.chart.Chart,
jsx3.chart.ColumnChart,
jsx3.chart.LineChart,
jsx3.chart.PieChart,
jsx3.chart.PlotChart,
jsx3.chart.RadialChart,
jsx3.gui.BlockX,
jsx3.gui.CDF,
jsx3.gui.Grid,
jsx3.gui.List,
jsx3.gui.Matrix,
jsx3.gui.Menu,
jsx3.gui.Select,
jsx3.gui.Table,
jsx3.gui.Tree
interface Cacheable
A mixin interface that provides the following capabilities to implementing classes:
- fetching and caching of an XML document from an XML string, URL, or cache id
- fetching and caching of an XSL document from an XSL string, URL, or cache id
- transformation of the XML document by the XSL document
- XSL parameterization via setXSLParam/getXSLParams
- management of cached resources
A class that implement this interface should usually be a subclass of
jsx3.app.Model since this
interface assumes that its instances have methods in that class (in particular
getId() and
getServer()).
As of version 3.2 using custom XSL templates for built-in GUI classes implementing this interface is deprecated.
Therefore, several methods related to storing per-instance XSL documents are deprecated.
Since:
3.1
| Field Summary |
|---|
| static int | Value of the shareResources property for an object that removes its XML and XSL
documents from the server XML cache when it is destroyed. |
| static String | JSX/xsl/xml.xsl
|
| static String | |
| static int | Value of the shareResources property for an object that leaves its XML and XSL
documents in the server XML cache when it is destroyed. |
| Method Summary |
|---|
| void | Resets the XML source document stored in the server cache under the XML ID of this object to an empty CDF
document. |
| jsx3.xml.Entity | |
| int | Returns whether this object removes its XML and XSL source documents from the cache of its server when it
is destroyed. |
| static String | |
| jsx3.xml.Document | Returns the XML source document of this object. |
| String | Returns the XML ID of this object. |
| String | Returns the XML string of this object. |
| Array<String> | Returns the list of XML transformers of this object. |
| String | Returns the XML URL of this object. |
| jsx3.xml.Document | Returns the XSL source document of this object. |
| String | Returns the XSL ID of this object. |
| Object<String, String> | Returns a map containing all the parameters to pass to the XSL stylesheet during transformation. |
| String | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| String | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| int | Returns whether the XML data source of this object is loaded asynchronously. |
| int | Returns whether this object is bound to the XML document stored in the data cache. |
| protected void | This method is called in two situations:
When the datasource of this object finishes loading (success, error, or timeout), if the
xmlAsync property of this object is true, its datasource is specified as an
XML URL, and the first time doTransform() was called the datasource was still loading. |
| jsx3.xml.Cacheable | Removes a parameter from the list of parameters to pass to the XSL stylesheet during transformation. |
| jsx3.xml.Cacheable | Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation. |
| void | Removes the XML and XSL source documents from the server cache. |
| void | Deprecated. renamed to clearXmlData() |
| void | Removes the XML source document stored under the XML ID of this object from the server cache. |
| void | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| void | |
| jsx3.xml.Cacheable | Sets whether this object removes its XML and XSL source documents from the cache of its server when it
is destroyed. |
| jsx3.xml.Document | Sets the source document of this object as though objDoc were retrieved from the XML URL or XML
string of this object. |
| jsx3.xml.Cacheable | Sets the XML ID of this object. |
| jsx3.xml.Cacheable | Sets the XML string of this object. |
| void | Sets the list of XML transformers of this object. |
| jsx3.xml.Cacheable | Sets the XML URL of this object. |
| jsx3.xml.Cacheable | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| jsx3.xml.Cacheable | Adds a name/value pair to the list of parameters to pass to the XSL stylesheet during transformation. |
| jsx3.xml.Cacheable | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| jsx3.xml.Cacheable | Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead. |
| jsx3.xml.Cacheable | Sets whether the XML data source of this object is loaded asynchronously. |
| int | Sets whether this object is bound to the XML document stored in the data cache. |
static final
int CLEANUPRESOURCES
Value of the shareResources property for an object that removes its XML and XSL
documents from the server XML cache when it is destroyed.
static
String DEFAULTSTYLESHEET
static
String DEFAULTXSLCACHEID
static final
int SHARERESOURCES
Value of the shareResources property for an object that leaves its XML and XSL
documents in the server XML cache when it is destroyed.
void clearXmlData()
Resets the XML source document stored in the server cache under the XML ID of this object to an empty CDF
document.
See Also:
Deprecated.
Returns the node set of this object.
Returns:
Returns whether this object removes its XML and XSL source documents from the cache of its server when it
is destroyed.
Returns:
CLEANUPRESOURCES or SHARERESOURCES.
Deprecated.
gets the release/build for the class (i.e., "2.2.00")
Returns:
Returns the XML source document of this object. The XML document is determined by the following steps:
- If an XML document exists in the server cache under an ID equal to the XML ID of this object, that
document is returned.
- If the XML string of this object is not empty, a new document is created by parsing this string.
- If the XML URL of this object is not empty, a new document is created by parsing the file at the location
specified by the URL resolved against the server owning this object.
- Otherwise, an empty CDF document is returned.
If a new document is created for this object (any of the steps listed above except for the first one), the
following actions are also taken:
- If creating the document resulted in an error (XML parsing error, file not found error, etc) the offending
document is returned immediately.
- Otherwise,
setSourceXML is called on this object, passing in the created document.
Returns:
See Also:
Returns the XML ID of this object.
Returns:
the XML ID.
Returns the XML string of this object.
Returns:
See Also:
Returns the list of XML transformers of this object.
Returns:
Since:
3.2
See Also:
Returns the XML URL of this object.
Returns:
Returns the XSL source document of this object. The XSL document is determined by the following steps:
- If an XSL document exists in the server cache under an ID equal to the XSL ID of this object, that
document is returned.
- (Deprecated) If the XSL string of this object is not
null, a new document is created by parsing this string.
- (Deprecated) If the XSL URL of this object is not
null, a new document is created by parsing the file at the location
specified by the URL resolved against the server owning this object.
- Otherwise, the default stylesheet (
Cacheable.DEFAULTSTYLESHEET) is returned.
Returns:
the XSL source document.
Returns the XSL ID of this object.
Returns:
See Also:
Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
Returns:
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Returns the XSL string of this object.
Returns:
See Also:
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Returns the XSL URL of this object.
Returns:
See Also:
Returns whether the XML data source of this object is loaded asynchronously.
Returns:
0 or 1.
Since:
3.5
Returns whether this object is bound to the XML document stored in the data cache.
Returns:
0 or 1.
Since:
3.5
protected
void onXmlBinding(objEvent
: Object)
This method is called in two situations:
- When the datasource of this object finishes loading (success, error, or timeout), if the
xmlAsync property of this object is true, its datasource is specified as an
XML URL, and the first time doTransform() was called the datasource was still loading.
- Any time the value stored in the server XML cache under the key equal to the XML Id of this object
changes, if the
xmlBind property of this object is true.
Any methods overriding this method should begin with a call to
jsxsupermix().
Parameters:
objEvent – the event published by the cache.
Since:
3.5
Removes a parameter from the list of parameters to pass to the XSL stylesheet during transformation.
Parameters:
strName – the name of the XSL parameter to remove.
Returns:
this object.
Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
Returns:
this object.
Removes the XML and XSL source documents from the server cache.
Parameters:
objServer – the server owning the cache to modify. This is a required argument only if
this.getServer() does not returns a server instance.
void resetData()
Deprecated. renamed to clearXmlData()
Removes the XML source document stored under the XML ID of this object from the server cache.
Parameters:
objServer – the server owning the cache to modify. This is a required argument only if
this.getServer() does not returns a server instance.
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Removes the XSL source document stored under the XSL ID of this object from the server cache.
Parameters:
objServer – the server owning the cache to modify. This is a required argument only if
this.getServer() does not returns a server instance.
See Also:
Deprecated.
Sets the node set of this object. If the node set of this object is set by calling this method,
the default XSL transformation will use this node set instead of the return value of
getXML() as
the XML document to transform.
Parameters:
Sets whether this object removes its XML and XSL source documents from the cache of its server when it
is destroyed.
Parameters:
intShare – CLEANUPRESOURCES or SHARERESOURCES. CLEANUPRESOURCES
is the default value if the property is null.
Returns:
this object.
See Also:
Sets the source document of this object as though
objDoc were retrieved from the XML URL or XML
string of this object. This method executes the following steps:
- The document is transformed serially by each XML transformers of this object.
- The XML document is saved in the server cache under the XML ID of this object.
- If this object is an instance of
jsx3.xml.CDF and the root node is a <data> element
and its jsxassignids attribute is equal to 1, all <record> elements without a
jsxid attribute are assigned a unique jsxid.
- If this object is an instance of
jsx3.xml.CDF, convertProperties() is called
on this object.
Parameters:
Returns:
the document stored in the server cache as the data source of this object. If
transformers were run, this value will not be equal to the objDoc parameter.
See Also:
Sets the XML ID of this object. This value is the key under which the XML source document of this object is
saved in the cache of the server owning this object. The developer may specify either a unique or shared value.
If no value is specified, a unique id is generated.
Parameters:
Returns:
this object.
See Also:
Sets the XML string of this object. Setting this value to the string serialization of an XML document is one
way of specifying the source XML document of this object.
Parameters:
strXML – null or a well-formed serialized XML element.
Returns:
this object.
See Also:
Sets the list of XML transformers of this object. The XML source document of this object is transformed
serially by each of these transformers before it is placed in the XML cache.
Each transformer is either the URI of an XSLT document (which will be resolved against the
the server of this object) or the cache id of a XSLT document in the XML cache of the server
of this object. When any transformer is loaded from a URI it is placed in the server cache under the id
equal to its resolved URI. Any transformer that does not correspond to a valid XSLT document will be skipped
without throwing an error.
Parameters:
Since:
3.2
Sets the XML URL of this object. Settings this value to the URI of an XML document is one way of specifying the
source XML document of this object.
Parameters:
strXMLURL – null or a URI that when resolved against the server owning this object
specifies a valid XML document.
Returns:
this object.
See Also:
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Sets the XSL ID of this object.
Parameters:
Returns:
this object.
See Also:
Adds a name/value pair to the list of parameters to pass to the XSL stylesheet during transformation. If
strValue is null the parameter is removed.
Parameters:
strName – the name of the XSL parameter to add.
strValue – the value of the XSL parameter to add.
Returns:
this object.
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Sets the XSL string of this object.
Parameters:
Returns:
this object.
See Also:
Deprecated. Per-instance control of the XSL template is deprecated. Consider using the XML transformers
functionality instead.
Sets the XSL URL of this object.
Parameters:
Returns:
this object.
See Also:
Sets whether the XML data source of this object is loaded asynchronously. This setting only applies to
data sources loaded from an XML URL.
Parameters:
Returns:
this object.
Since:
3.5
int setXmlBind(bBind
: ?)
Sets whether this object is bound to the XML document stored in the data cache. If this object is bound to the
cache, then the onXmlBinding() method of this object is called any time the document stored in
the cache under the XML Id of this object changes.
Parameters:
Returns:
0 or 1.
Since:
3.5
Copyright © 2001-2008, TIBCO Software Inc.