Java Doc for JUMPStore.java in  » 6.0-JDK-Modules » j2me » com » sun » jump » module » contentstore » 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 » 6.0 JDK Modules » j2me » com.sun.jump.module.contentstore 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jump.module.contentstore.JUMPStore

All known Subclasses:   com.sun.jumpimpl.module.contentstore.FileStoreImpl,  com.sun.jump.module.contentstore.InMemoryStore,
JUMPStore
abstract public class JUMPStore implements JUMPModule(Code)
JUMPStore provides methods to access a persistant store. The abstraction provided by the store is a hierarchical tree structure (very similar to a file system), where nodes in the tree could contain other nodes (like a directory in a file system) or contain data (like files in a file system). Every node in the store is identified using a unique URI. The root of the store is identified by ".".

The following code shows how the store can be used to save an application's title through JUMPStoreHandle.

 JUMPStoreHandle storeHandle;
 JUMPData titleData = new JUMPData("Sample App1");
 storeHandle.createNode("./apps/App1");  // cause JUMPStore.createNode
 storeHandle.createDataNode("./apps/App1/title", titleData);  // cause JUMPStore.createDataNode
 

All access to the store is controlled by higher level entities like repositories, through a subclass of JUMPContentStore.

The JUMP content store API limits the URI String to use the character set of [a--z] + [0--9] for the node name. The node string should appear in the unique format; the use of "." and ".." is prohibited except for "." as the first character representing the root. The String is treated as case insensitive, "/" as a path element separator, and the use of a trailing "/" character is not allowed for both the list and the data node (ex. "./a/b/" or "./").





Method Summary
abstract protected  voidcreateDataNode(String uri, JUMPData data)
     Create a JUMPNode.Data identified by this url in the store.
abstract protected  voidcreateNode(String uri)
     Create a JUMPNode.List identified by this URI in the store.
abstract protected  voiddeleteNode(String uri)
     Delete the node pointed to by the URI.
abstract protected  JUMPNodegetNode(String uri)
     Returns the node that is bound to the URI or null if no such node exists.
abstract protected  voidupdateDataNode(String uri, JUMPData data)
     Update the data associated with the URI.



Method Detail
createDataNode
abstract protected void createDataNode(String uri, JUMPData data) throws IOException(Code)
Create a JUMPNode.Data identified by this url in the store. The node contains this JUMPData. The method should behave in an atomic fashion, i.e either the data node is created completely or nothing at all. All the elements of the URI except for the part that represents the leaf node must exist within the store for this call to succeed. This does not create any intermediate nodes specified in the URI, if they do not exist. If the node represented by the URI already exists, then the method also fails.
exception:
  IOException - if the node creation fails.
exception:
  IllegalArgumentException - if the URI format is invalid.
exception:
  JUMPStoreRuntimeException - if the node represented by the URI already exists.



createNode
abstract protected void createNode(String uri) throws IOException(Code)
Create a JUMPNode.List identified by this URI in the store. If any of the intermediate nodes does not exist yet, then this method creates those intermediate nodes.
exception:
  IOException - if the node creation fails.
exception:
  IllegalArgumentException - if the URI format is invalid.
exception:
  JUMPStoreRuntimeException - if the node represented by the URI already exists.



deleteNode
abstract protected void deleteNode(String uri) throws IOException(Code)
Delete the node pointed to by the URI. If there are child nodes under this URI, then they are deleted as well.
exception:
  IOException - if the node deletion fails
exception:
  IllegalArgumentException - if the URI format is invalid.
exception:
  JUMPStoreRuntimeException - if the URI does not point to an existing node.



getNode
abstract protected JUMPNode getNode(String uri) throws IOException(Code)
Returns the node that is bound to the URI or null if no such node exists.
exception:
  IOException - if internal error occurs while retrieving the data.
exception:
  IllegalArgumentException - if the URI format is invalid.



updateDataNode
abstract protected void updateDataNode(String uri, JUMPData data) throws IOException(Code)
Update the data associated with the URI. The method can fail in the following cases
  • URI does not exist
  • URI does not point to a JUMPNode.Data
If the data cannot be updated, then the previous data in the node MUST be preserved.
exception:
  IOException - if the node update fails.
exception:
  IllegalArgumentException - if the URI format is invalid.
exception:
  JUMPStoreRuntimeException - if the URI does not exist or is not pointing to JUMPNode.Data



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.