Changes between Version 6 and Version 7 of SERVER_DATABASE_PERSISTENCE


Ignore:
Timestamp:
02/19/10 15:59:01 (15 years ago)
Author:
meddle
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SERVER_DATABASE_PERSISTENCE

    v6 v7  
    8686      * {{{public T doSQL() throws SQLException}}} -> Executes a SQL query using the JDBC API, which can throw SQLException...  
    8787     * Its implementations are used to manage the connection from the connection manager and use a ConnectionCallback. 
    88    * Interface : ConnectionCallback<T> -> Represents a callback to the database with managed JDBC connection. 
     88   * Interface : [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.server.core/src/main/java/org/sophie2/server/core/persistence/db/jdbc/ConnectionCallback.java ConnectionCallback<T>] -> Represents a callback to the database with managed JDBC connection. 
    8989    * Public methods: 
    9090     * {{{public T doInConnection(Connection conn) throws SQLException}}} -> Executes a SQL query using the provided connection. 
     
    151151    * [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.server.core/src/main/java/org/sophie2/server/core/persistence/db/params/DBResource.java DBResource] -> contains a name ofor a new resource and its parent resource DB id. 
    152152    * [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.server.core/src/main/java/org/sophie2/server/core/persistence/db/params/DBRevision.java DBRevision] -> contains a revision id for a new revision and it's causing change stored to a IO Reader. 
     153  === Resource Helpers === 
     154  * The old logic will be kept as a mock server in the memory only. 
     155   * For that to happen ServerResourceHelpers will be registered as extensions. These helpers will be used to retrieve ResourceServices for the facade, to open accesses to resources and to initialize server module environment.  
     156   * May be in the s2s ServerModule there will be extension point for them. Ideas form the reviewers here? And you can give better names for the classes too. 
     157   * Interface : [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.base.connectivity/src/main/java/org/sophie2/base/connectivity/resources/ServerResourceHelper.java ServerResourceHelper] -> Initializes Server model environment (like DB or connection to DB, ResourceLocator or some other thing) 
     158    * Methods: 
     159     * {{{void initialize()}}} -> Initializes the environment, for example creates a ResourceLocator -> AppLocator or creates connection to a DB. 
     160     * {{{ResourceService getResourceService(String serverUrl)}}} -> Retrieves ResourceServices for example the old mem access implementation is moved in such service, the ServerFacade works with services and they generate its Response to the client. 
     161     * {{{ResourceAccess getResourceAccess(ResourceRefR4 ref, String serverLocation)}}} -> Retrieves (opens) ResourceAccess to a resource specified by its ref. Accesses for books on the server can be retrieved by this way for example. 
     162   * Implementations - For now two, the old mem access implementation and the new DB implementation: 
     163    * [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.base.connectivity/src/main/java/org/sophie2/base/connectivity/resources/ServerResourceHelperAccessImpl.java ServerResourceHelperAccessImpl] -> Creates a memory resource dir when initialized and opens memory accesses to resources in it. The ResourceService provided by it works with memory resources. 
     164    * [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.server.core/src/main/java/org/sophie2/server/core/persistence/db/ServerResourceHelperDBImpl.java ServerResourceHelperDBImpl] -> When initialized it connects to the database in the dist directory of the core module, if the schema does not exist, it creates it using the schema.sql file and puts a resource dirctory in it (the main directory), creates services using a dao created by JDBCTemplate conected to the DB and opens DBResourceAccesses to the database. 
     165  === Resource Services === 
     166  * The services manage the resource model. 
     167  * They are used by the ServerFacade and contain some of the Response logic, like the ResponseExceptions, if there is some problem on the server. 
     168  * The services are something like a server alternative of the ResourceAccesses, there is a special DBResourceAccess that uses service to adapt the logic of the accesses on the server. However the facade needs the Response logic of the services and works with them. 
     169  * Interface : [browser:branches/private/tsachev/paragraphs/modules/org.sophie2.base.connectivity/src/main/java/org/sophie2/base/connectivity/resources/ResourceService.java ResourceService] -> Can be retrieved form the Resource Helpers and constructed/cached by them. 
     170   * Methods: 
     171    * {{{<T> T findValue(ResourceRefR4 ref, Key<T> key, RevisionId revisionId) throws ResponseException}}} -> Finds value of a key for resource specified by the passed ref at the specified revision. If there is problem finding the value throws a ResponseException for the ServerFacade. Can retrieve any value at any revision of the resource. 
     172    * {{{<T> T findValue(ResourceRefR4 ref, Key<T> key) throws ResponseException}}} -> The same as the above but for the current revision. This method is the server alternative of ResourceAccess.getRaw(Key<T>).. 
    153173 
    154174= Implementation =