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 oz...@apache.org on 2004/10/18 12:17:03 UTC

cvs commit: jakarta-slide/proposals/wck/src/org/apache/slide/simple/store WebdavStoreAdapter.java BasicWebdavStore.java

ozeigermann    2004/10/18 03:17:03

  Modified:    proposals/wck/src/org/apache/slide/simple/store
                        WebdavStoreAdapter.java BasicWebdavStore.java
  Log:
  Allow specific modification / creation time to override properties
  
  Revision  Changes    Path
  1.5       +15 -8     jakarta-slide/proposals/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java
  
  Index: WebdavStoreAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebdavStoreAdapter.java	13 Oct 2004 22:54:52 -0000	1.4
  +++ WebdavStoreAdapter.java	18 Oct 2004 10:17:03 -0000	1.5
  @@ -572,10 +572,6 @@
                           NodeRevisionDescriptors.MAIN_BRANCH, new Vector(), new Hashtable());
                   if (objectExistsInStore(uri)) {
                       try {
  -                        // this implied information might be overwritten by the
  -                        // real property values
  -                        descriptor.setCreationDate(store.getCreationDate(uri.toString()));
  -                        descriptor.setLastModified(store.getLastModified(uri.toString()));
   
                           Map properties = null;
                           if (bulkPropStore != null) {
  @@ -613,6 +609,17 @@
                                   descriptor.setContentLength(length);
                               }
                           }
  +
  +                        Date creationDate = store.getCreationDate(uri.toString());
  +                        if (creationDate != null) {
  +                            descriptor.setCreationDate(creationDate);
  +                        }
  +
  +                        Date lastModified = store.getLastModified(uri.toString());
  +                        if (lastModified != null) {
  +                            descriptor.setLastModified(lastModified);
  +                        }
  +
                       } catch (ObjectNotFoundException e) {
                           throw new RevisionDescriptorNotFoundException(uri.toString());
                       } catch (AccessDeniedException e) {
  
  
  
  1.3       +10 -6     jakarta-slide/proposals/wck/src/org/apache/slide/simple/store/BasicWebdavStore.java
  
  Index: BasicWebdavStore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/wck/src/org/apache/slide/simple/store/BasicWebdavStore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicWebdavStore.java	13 Oct 2004 20:36:14 -0000	1.2
  +++ BasicWebdavStore.java	18 Oct 2004 10:17:03 -0000	1.3
  @@ -254,7 +254,9 @@
        * 
        * @param uri
        *            URI of the object, i.e. content resource or folder
  -     * @return date of last modification
  +     * @return date of last modification,
  +     *         <code>null</code> declares this value as invalid and asks the
  +     *         adapter to try to set it from the properties if possible
        * @throws ServiceAccessException
        *             if any kind of internal error or any unexpected state occurs
        * @throws AccessDeniedException
  @@ -269,7 +271,9 @@
        * 
        * @param uri
        *            URI of the object, i.e. content resource or folder
  -     * @return date of creation
  +     * @return date of creation,
  +     *         <code>null</code> declares this value as invalid and asks the
  +     *         adapter to try to set it from the properties if possible
        * @throws ServiceAccessException
        *             if any kind of internal error or any unexpected state occurs
        * @throws AccessDeniedException
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org