You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2001/01/12 18:43:06 UTC

cvs commit: jakarta-slide/src/stores/slidestore/reference FileContentStore.java

juergen     01/01/12 09:43:06

  Modified:    src/stores/slidestore/reference FileContentStore.java
  Log:
  Interface change in the ContentStore. detailed email will follow soon.
  
  Revision  Changes    Path
  1.2       +39 -39    jakarta-slide/src/stores/slidestore/reference/FileContentStore.java
  
  Index: FileContentStore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/reference/FileContentStore.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileContentStore.java	2000/12/05 06:46:50	1.1
  +++ FileContentStore.java	2001/01/12 17:43:05	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/reference/FileContentStore.java,v 1.1 2000/12/05 06:46:50 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/12/05 06:46:50 $
  + * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/reference/FileContentStore.java,v 1.2 2001/01/12 17:43:05 juergen Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/01/12 17:43:05 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -59,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   package slidestore.reference;
   
  @@ -74,11 +74,11 @@
   
   /**
    * Filesystem implementation of ContentStore.
  - * 
  + *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
  -public class FileContentStore extends ServiceImpl 
  +public class FileContentStore extends ServiceImpl
       implements ContentStore {
       
       
  @@ -109,17 +109,17 @@
       
       /**
        * Read parameters.
  -     * 
  -     * @param parameters Hashtable containing the parameters' name 
  +     *
  +     * @param parameters Hashtable containing the parameters' name
        * and associated value
        */
       public synchronized void setParameters(Hashtable parameters)
  -        throws ServiceParameterErrorException, 
  +        throws ServiceParameterErrorException,
           ServiceParameterMissingException {
           // A parameter will tell were serialization files are.
           rootpath = (String) parameters.get("rootpath");
           if (rootpath == null) {
  -            // Default is that files are stored starting in the 
  +            // Default is that files are stored starting in the
               // current directory
               rootpath = "";
           }
  @@ -132,7 +132,7 @@
       
       /**
        * Connects to store.
  -     * 
  +     *
        * @exception VersionException
        */
       public synchronized void connect()
  @@ -142,7 +142,7 @@
       
       /**
        * Disconnects from content store.
  -     * 
  +     *
        * @exception ServiceDisconnectionFailedException
        */
       public synchronized void disconnect()
  @@ -152,8 +152,8 @@
       
       /**
        * Initializes content store.
  -     * 
  -     * @exception ServiceInitializationFailedException Throws an exception 
  +     *
  +     * @exception ServiceInitializationFailedException Throws an exception
        * if the store has already been initialized before
        */
       public synchronized void initialize(NamespaceAccessToken token)
  @@ -170,7 +170,7 @@
       
       /**
        * Deletes content store.
  -     * 
  +     *
        * @exception ServiceResetFailedException
        */
       public void reset()
  @@ -180,11 +180,11 @@
       
       /**
        * This function tells whether or not the service is connected.
  -     * 
  +     *
        * @return boolean true if we are connected
        * @exception ServiceAccessException Service access error
        */
  -    public boolean isConnected() 
  +    public boolean isConnected()
           throws ServiceAccessException {
           return true;
       }
  @@ -192,7 +192,7 @@
       
       /**
        * Does nothing here.
  -     * 
  +     *
        * @exception ServiceAccessException Unspecified service access error
        */
       public synchronized void commit()
  @@ -205,17 +205,17 @@
       
       /**
        * Retrive revision content.
  -     * 
  +     *
        * @param uri Uri
        * @param revisionNumber Node revision number
        */
       public NodeRevisionContent retrieveRevisionContent
  -        (Uri uri, NodeRevisionNumber revisionNumber)
  +        (Uri uri, NodeRevisionDescriptor revisionDescriptor)
           throws ServiceAccessException, RevisionNotFoundException {
           NodeRevisionContent result = null;
           String revisionUri = null;
           if (version)
  -            revisionUri = uri.toString() + "_" + revisionNumber;
  +            revisionUri = uri.toString() + "_" + revisionDescriptor.getRevisionNumber();
           else
               revisionUri = uri.toString();
           try {
  @@ -227,8 +227,8 @@
               result.setContent(reader);
               result.setContent(is);
   	} catch (FileNotFoundException e) {
  -            throw new RevisionNotFoundException(uri.toString(), 
  -                                                revisionNumber);
  +            throw new RevisionNotFoundException(uri.toString(),
  +                                                revisionDescriptor.getRevisionNumber());
           } catch (IOException e) {
               e.printStackTrace();
               throw new ServiceAccessException(this, e.getMessage());
  @@ -240,18 +240,18 @@
       
       /**
        * Create a new revision
  -     * 
  +     *
        * @param uri Uri
        * @param revisionDescriptor Node revision descriptor
        * @param revisionContent Node revision content
        */
       public void createRevisionContent
  -        (Uri uri, NodeRevisionDescriptor revisionDescriptor, 
  +        (Uri uri, NodeRevisionDescriptor revisionDescriptor,
            NodeRevisionContent revisionContent)
           throws ServiceAccessException, RevisionAlreadyExistException {
           String revisionUri = null;
           if (version)
  -            revisionUri = uri.toString() + "_" 
  +            revisionUri = uri.toString() + "_"
                   + revisionDescriptor.getRevisionNumber();
           else
               revisionUri = uri.toString();
  @@ -318,18 +318,18 @@
       
       /**
        * Modify the latest revision of an object.
  -     * 
  +     *
        * @param uri Uri
        * @param revisionDescriptor Node revision descriptor
        * @param revisionContent Node revision content
        */
       public void storeRevisionContent
  -        (Uri uri, NodeRevisionDescriptor revisionDescriptor, 
  +        (Uri uri, NodeRevisionDescriptor revisionDescriptor,
            NodeRevisionContent revisionContent)
           throws ServiceAccessException, RevisionNotFoundException {
           String revisionUri = null;
           if (version)
  -            revisionUri = uri.toString() + "_" 
  +            revisionUri = uri.toString() + "_"
                   + revisionDescriptor.getRevisionNumber();
           else
               revisionUri = uri.toString();
  @@ -396,16 +396,16 @@
       
       /**
        * Remove revision.
  -     * 
  +     *
        * @param uri Uri
        * @param revisionNumber Node revision number
        */
  -    public void removeRevisionContent(Uri uri, 
  -                                      NodeRevisionNumber revisionNumber)
  +    public void removeRevisionContent(Uri uri,
  +                                      NodeRevisionDescriptor revisionDescriptor)
           throws ServiceAccessException {
           String revisionUri = null;
           if (version)
  -            revisionUri = uri.toString() + "_" + revisionNumber;
  +            revisionUri = uri.toString() + "_" + revisionDescriptor.getRevisionNumber();
           else
               revisionUri = uri.toString();