Java Doc for ResourceStore.java in  » Web-Server » Jigsaw » org » w3c » tools » resources » store » 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 » Web Server » Jigsaw » org.w3c.tools.resources.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.tools.resources.store.ResourceStore

All known Subclasses:   org.w3c.tools.resources.store.ResourceStoreImpl,
ResourceStore
public interface ResourceStore (Code)
A resource store implements persistency for a set of resources. A resource store may implement a number of strategies along different axis, for example:
  • It may connect to some database to get the resource attributes.
  • It may restrict the classes of the resource it handles (for security reasons), by using a specific class loader.
  • It may implement some caching scheme, to keep memory requirements low.
  • It may be distributed (eg using a ResourceStoreStub in the client, but providing access to a server-side resource store.).




Method Summary
abstract public  booleanacceptUnload()
     Can this resource store be unloaded now ? This method gets called by the ResourceStoreManager before calling the shutdown method, when possible.
public  voidaddResource(Resource resource)
     Add this resource to this resource store.
public  EnumerationenumerateResourceIdentifiers()
     Enumerate all the resources saved in this store.
public  StringgetIdentifier()
     Get the identifier for that store.
public  intgetVersion()
     Get the version of that resource store. Version numbers are used to distinguish between pickling format.
public  booleanhasResource(String identifier)
     Check for the existence of a resource in this store.
Parameters:
  identifier - The identifier of the resource to check.
public  voidinitialize(ResourceStoreManager manager, Object token, File repository, Serializer serializer)
     This resource store is being built, initialize it with the given arg.
public  ResourceloadResource(String identifier, Hashtable defs)
     Restore the resource whose name is given. This method doesn't assume that the resource will actually be restored, it can be kept in a cache by the ResourceStore object, and the cached version of the resource may be returned.
Parameters:
  identifier - The identifier of the resource to restore.
Parameters:
  defs - Default attribute values.
public  ResourcelookupResource(String identifier)
     Get this resource, but only if already loaded. The resource store may (recommended) maintain a cache of the resource it loads from its store.
public  voidmarkModified(Resource resource)
     Mark this resource as modified.
public  voidremoveResource(String identifier)
     Remove this resource from the repository.
public  voidrenameResource(String oldid, String newid)
     Rename a given resource.
public  voidsave()
     Save this store.
public  voidsaveResource(Resource resource)
     Stabilize the given resource.
public  voidshutdown()
     Shutdown this store.



Method Detail
acceptUnload
abstract public boolean acceptUnload()(Code)
Can this resource store be unloaded now ? This method gets called by the ResourceStoreManager before calling the shutdown method, when possible. An implementation of that method is responsible for checking the acceptUnload method of all its loaded resource before returning true, meaning that the resource store can be unloaded. A boolean true if the resource store can beunloaded.



addResource
public void addResource(Resource resource)(Code)
Add this resource to this resource store.
Parameters:
  resource - The resource to be added.



enumerateResourceIdentifiers
public Enumeration enumerateResourceIdentifiers()(Code)
Enumerate all the resources saved in this store. An enumeration of Strings, giving the identifier for all the resources that this store knows about.



getIdentifier
public String getIdentifier()(Code)
Get the identifier for that store. A uniq store identifier, as a String.



getVersion
public int getVersion()(Code)
Get the version of that resource store. Version numbers are used to distinguish between pickling format. A resource store implementator has the duty of bumping the returned number whenever it's archiving format changes. Resource stores that relies on some external archiving mechanisms (such as a database), may return a constant. An integer version number.



hasResource
public boolean hasResource(String identifier)(Code)
Check for the existence of a resource in this store.
Parameters:
  identifier - The identifier of the resource to check. A boolean true if the resource existsin this store, false otherwise.



initialize
public void initialize(ResourceStoreManager manager, Object token, File repository, Serializer serializer)(Code)
This resource store is being built, initialize it with the given arg.
Parameters:
  manager - The ResourceStoreManager instance that asks yourselfto initialize.
Parameters:
  token - The resource store manager key to that resource store, this token should be used when calling methods from the manager thatare to act on yourself.
Parameters:
  repository - A file, giving the location of the associated repository.



loadResource
public Resource loadResource(String identifier, Hashtable defs) throws InvalidResourceException(Code)
Restore the resource whose name is given. This method doesn't assume that the resource will actually be restored, it can be kept in a cache by the ResourceStore object, and the cached version of the resource may be returned.
Parameters:
  identifier - The identifier of the resource to restore.
Parameters:
  defs - Default attribute values. If the resource needs to berestored from its pickled version, this Hashtable providesa set of default values for some of the attributes. A Resource instance, or null.
exception:
  InvalidResourceException - If the resource could notbe restored from the store.



lookupResource
public Resource lookupResource(String identifier)(Code)
Get this resource, but only if already loaded. The resource store may (recommended) maintain a cache of the resource it loads from its store. If the resource having this identifier has already been loaded, return it, otherwise, return null.
Parameters:
  identifier - The resource identifier. A Resource instance, or null.



markModified
public void markModified(Resource resource)(Code)
Mark this resource as modified.
Parameters:
  resource - The resource that has changed (and will have to bepickled some time latter).



removeResource
public void removeResource(String identifier)(Code)
Remove this resource from the repository.
Parameters:
  identifier - The identifier of the resource to be removed.



renameResource
public void renameResource(String oldid, String newid)(Code)
Rename a given resource.
Parameters:
  oldid - The olde resource identifier.
Parameters:
  newid - The new resource identifier.



save
public void save()(Code)
Save this store.



saveResource
public void saveResource(Resource resource)(Code)
Stabilize the given resource.
Parameters:
  resource - The resource to save.



shutdown
public void shutdown()(Code)
Shutdown this store.



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