Java Doc for Cacheable.java in  » Ajax » dwr » jsx3 » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » dwr » jsx3.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.directwebremoting.proxy.io.Context
      jsx3.lang.Object
         jsx3.xml.Cacheable

Cacheable
public class Cacheable extends jsx3.lang.Object (Code)
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.
author:
   Joe Walker [joe at getahead dot org]
author:
   DRAPGEN - Dwr Reverse Ajax Proxy GENerator


Field Summary
final public static  intCLEANUPRESOURCES
     Value of the shareResources property for an object that removes its XML and XSL documents from the server XML cache when it is destroyed.
final public static  StringDEFAULTSTYLESHEET
    
final public static  intSHARERESOURCES
     Value of the shareResources property for an object that leaves its XML and XSL documents in the server XML cache when it is destroyed.

Constructor Summary
public  Cacheable(Context context, String extension, ScriptProxy scriptProxy)
    

Method Summary
public  voidclearXmlData()
     Resets the XML source document stored in the server cache under the XML ID of this object to an empty CDF document.
public  voidgetShareResources(org.directwebremoting.proxy.Callback<Integer> callback)
     Returns whether this object removes its XML and XSL source documents from the cache of its server when it is destroyed.
public  jsx3.xml.CdfDocumentgetXML()
     Returns the XML source document of this object.
public  TgetXML(Class<T> returnType)
     Returns the XML source document of this object.
public  voidgetXMLId(org.directwebremoting.proxy.Callback<String> callback)
     Returns the XML ID of this object.
public  voidgetXMLString(org.directwebremoting.proxy.Callback<String> callback)
     Returns the XML string of this object.
public  voidgetXMLTransformers(org.directwebremoting.proxy.Callback<Object[]> callback)
     Returns the list of XML transformers of this object.
public  voidgetXMLURL(org.directwebremoting.proxy.Callback<String> callback)
     Returns the XML URL of this object.
public  jsx3.xml.CdfDocumentgetXSL()
     Returns the XSL source document of this object.
public  TgetXSL(Class<T> returnType)
     Returns the XSL source document of this object.
public  voidgetXSLId(org.directwebremoting.proxy.Callback<String> callback)
     Returns the XSL ID of this object.
public  jsx3.lang.ObjectgetXSLParams()
     Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
public  TgetXSLParams(Class<T> returnType)
     Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
public  voidgetXmlAsync(org.directwebremoting.proxy.Callback<Integer> callback)
     Returns whether the XML data source of this object is loaded asynchronously.
public  voidgetXmlBind(org.directwebremoting.proxy.Callback<Integer> callback)
     Returns whether this object is bound to the XML document stored in the data cache.
public  voidonXmlBinding(jsx3.lang.Object objEvent)
     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.
public  jsx3.xml.CacheableremoveXSLParam(String strName)
     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.
public  TremoveXSLParam(String strName, Class<T> returnType)
     Removes a parameter from the list of parameters to pass to the XSL stylesheet during transformation.
public  jsx3.xml.CacheableremoveXSLParams()
     Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
public  TremoveXSLParams(Class<T> returnType)
     Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
public  voidresetCacheData(jsx3.app.Server objServer)
     Removes the XML and XSL source documents from the server cache.
Parameters:
  objServer - the server owning the cache to modify.
public  voidresetXmlCacheData(jsx3.app.Server objServer)
     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.
public  jsx3.xml.CacheablesetShareResources(int intShare)
     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.
public  jsx3.xml.CdfDocumentsetSourceXML(jsx3.xml.CdfDocument objDoc, jsx3.app.Cache objCache)
     Sets the source document of this object as though objDoc were retrieved from the XML URL or XML string of this object.
public  TsetSourceXML(jsx3.xml.CdfDocument objDoc, jsx3.app.Cache objCache, Class<T> returnType)
     Sets the source document of this object as though objDoc were retrieved from the XML URL or XML string of this object.
public  jsx3.xml.CacheablesetXMLId(String strXMLId)
     Sets the XML ID of this object.
public  jsx3.xml.CacheablesetXMLString(String strXML)
     Sets the XML string of this object.
public  voidsetXMLTransformers(Object[] arrTrans)
     Sets the list of XML transformers of this object.
public  jsx3.xml.CacheablesetXMLURL(String strXMLURL)
     Sets the XML URL of this object.
public  jsx3.xml.CacheablesetXSLParam(String strName, String strValue)
     Adds a name/value pair to the list of parameters to pass to the XSL stylesheet during transformation.
public  jsx3.xml.CacheablesetXmlAsync(boolean bAsync)
     Sets whether the XML data source of this object is loaded asynchronously.
public  voidsetXmlBind(boolean bBind, org.directwebremoting.proxy.Callback<Integer> callback)
     Sets whether this object is bound to the XML document stored in the data cache.

Field Detail
CLEANUPRESOURCES
final public static int CLEANUPRESOURCES(Code)
Value of the shareResources property for an object that removes its XML and XSL documents from the server XML cache when it is destroyed.



DEFAULTSTYLESHEET
final public static String DEFAULTSTYLESHEET(Code)
JSX/xsl/xml.xsl



SHARERESOURCES
final public static int SHARERESOURCES(Code)
Value of the shareResources property for an object that leaves its XML and XSL documents in the server XML cache when it is destroyed.




Constructor Detail
Cacheable
public Cacheable(Context context, String extension, ScriptProxy scriptProxy)(Code)
All reverse ajax proxies need context to work from
Parameters:
  scriptProxy - The place we are writing scripts to
Parameters:
  context - The script that got us to where we are now




Method Detail
clearXmlData
public void clearXmlData()(Code)
Resets the XML source document stored in the server cache under the XML ID of this object to an empty CDF document.



getShareResources
public void getShareResources(org.directwebremoting.proxy.Callback<Integer> callback)(Code)
Returns whether this object removes its XML and XSL source documents from the cache of its server when it is destroyed.
Parameters:
  callback - CLEANUPRESOURCES or SHARERESOURCES.



getXML
public jsx3.xml.CdfDocument getXML()(Code)
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.



getXML
public T getXML(Class<T> returnType)(Code)
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.
Parameters:
  returnType - The expected return type



getXMLId
public void getXMLId(org.directwebremoting.proxy.Callback<String> callback)(Code)
Returns the XML ID of this object.
Parameters:
  callback - the XML ID.



getXMLString
public void getXMLString(org.directwebremoting.proxy.Callback<String> callback)(Code)
Returns the XML string of this object.



getXMLTransformers
public void getXMLTransformers(org.directwebremoting.proxy.Callback<Object[]> callback)(Code)
Returns the list of XML transformers of this object.



getXMLURL
public void getXMLURL(org.directwebremoting.proxy.Callback<String> callback)(Code)
Returns the XML URL of this object.



getXSL
public jsx3.xml.CdfDocument getXSL()(Code)
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. the XSL source document.



getXSL
public T getXSL(Class<T> returnType)(Code)
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.
Parameters:
  returnType - The expected return type the XSL source document.



getXSLId
public void getXSLId(org.directwebremoting.proxy.Callback<String> callback)(Code)
Returns the XSL ID of this object.



getXSLParams
public jsx3.lang.Object getXSLParams()(Code)
Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.



getXSLParams
public T getXSLParams(Class<T> returnType)(Code)
Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
Parameters:
  returnType - The expected return type



getXmlAsync
public void getXmlAsync(org.directwebremoting.proxy.Callback<Integer> callback)(Code)
Returns whether the XML data source of this object is loaded asynchronously.
Parameters:
  callback - 0 or 1.



getXmlBind
public void getXmlBind(org.directwebremoting.proxy.Callback<Integer> callback)(Code)
Returns whether this object is bound to the XML document stored in the data cache.
Parameters:
  callback - 0 or 1.



onXmlBinding
public void onXmlBinding(jsx3.lang.Object objEvent)(Code)
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.



removeXSLParam
public jsx3.xml.Cacheable removeXSLParam(String strName)(Code)
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. this object.



removeXSLParam
public T removeXSLParam(String strName, Class<T> returnType)(Code)
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.
Parameters:
  returnType - The expected return type this object.



removeXSLParams
public jsx3.xml.Cacheable removeXSLParams()(Code)
Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation. this object.



removeXSLParams
public T removeXSLParams(Class<T> returnType)(Code)
Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
Parameters:
  returnType - The expected return type this object.



resetCacheData
public void resetCacheData(jsx3.app.Server objServer)(Code)
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 ifthis.getServer() does not returns a server instance.



resetXmlCacheData
public void resetXmlCacheData(jsx3.app.Server objServer)(Code)
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 ifthis.getServer() does not returns a server instance.



setShareResources
public jsx3.xml.Cacheable setShareResources(int intShare)(Code)
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. CLEANUPRESOURCESis the default value if the property is null. this object.



setSourceXML
public jsx3.xml.CdfDocument setSourceXML(jsx3.xml.CdfDocument objDoc, jsx3.app.Cache objCache)(Code)
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 element and its jsxassignids attribute is equal to 1, all 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:
  objDoc -
Parameters:
  objCache - the document stored in the server cache as the data source of this object. Iftransformers were run, this value will not be equal to the objDoc parameter.



setSourceXML
public T setSourceXML(jsx3.xml.CdfDocument objDoc, jsx3.app.Cache objCache, Class<T> returnType)(Code)
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 element and its jsxassignids attribute is equal to 1, all 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:
  objDoc -
Parameters:
  objCache -
Parameters:
  returnType - The expected return type the document stored in the server cache as the data source of this object. Iftransformers were run, this value will not be equal to the objDoc parameter.



setXMLId
public jsx3.xml.Cacheable setXMLId(String strXMLId)(Code)
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:
  strXMLId - this object.



setXMLString
public jsx3.xml.Cacheable setXMLString(String strXML)(Code)
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. this object.



setXMLTransformers
public void setXMLTransformers(Object[] arrTrans)(Code)
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:
  arrTrans -



setXMLURL
public jsx3.xml.Cacheable setXMLURL(String strXMLURL)(Code)
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 objectspecifies a valid XML document. this object.



setXSLParam
public jsx3.xml.Cacheable setXSLParam(String strName, String strValue)(Code)
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.
Parameters:
  strValue - the value of the XSL parameter to add. this object.



setXmlAsync
public jsx3.xml.Cacheable setXmlAsync(boolean bAsync)(Code)
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:
  bAsync - this object.



setXmlBind
public void setXmlBind(boolean bBind, org.directwebremoting.proxy.Callback<Integer> callback)(Code)
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:
  bBind -
Parameters:
  callback - 0 or 1.



Methods inherited from jsx3.lang.Object
public void ignoreReturn()(Code)(Java Doc)

Methods inherited from org.directwebremoting.proxy.io.Context
protected String getContextPath()(Code)(Java Doc)
protected ScriptBuffer getInitScript()(Code)(Java Doc)
protected ScriptProxy getScriptProxy()(Code)(Java Doc)
protected void setInitScript(ScriptBuffer initScript)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.