ozeigermann    2004/02/20 01:49:00

  Modified:    src/stores/org/apache/slide/store/txfile Tag:
                        SLIDE_2_0_RELEASE_BRANCH XMLResourceDescriptor.java
               src/stores/slidestore/file Tag: SLIDE_2_0_RELEASE_BRANCH
                        UriProperties.java
  Log:
  Fixed problem with locks in tx file store:

  - Owner info now is stored

  - Date format has been changed in order to save dates having years later than 2070.

    Previous to this fix 2072 has been stored as 72 and interpreted as 1972 which made 
fresh locks 

    expired immediately

  

  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.2.2   +6 -4      
jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java
  
  Index: XMLResourceDescriptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- XMLResourceDescriptor.java        5 Feb 2004 16:07:53 -0000       1.5.2.1
  +++ XMLResourceDescriptor.java        20 Feb 2004 09:48:59 -0000      1.5.2.2
  @@ -340,7 +340,9 @@
                   boolean aInheritable = new 
Boolean(aChild.getAttributeValue("inheritance")).booleanValue();
                   boolean aNegative = new 
Boolean(aChild.getAttributeValue("exclusive")).booleanValue();
                   String aLockId = aChild.getAttributeValue("lockId");
  -                locks.addElement(new NodeLock(aLockId, uri, aSubject, aType, 
aDateExpiration, aInheritable, aNegative));
  +                String ownerInfo = aChild.getAttributeValue("owner");
  +
  +                locks.addElement(new NodeLock(aLockId, uri, aSubject, aType, 
aDateExpiration, aInheritable, aNegative, ownerInfo));
               }
           } catch (Exception e) {
               e.printStackTrace();
  
  
  
  No                   revision
  No                   revision
  1.8.2.2   +7 -5      jakarta-slide/src/stores/slidestore/file/UriProperties.java
  
  Index: UriProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/file/UriProperties.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- UriProperties.java        5 Feb 2004 16:07:54 -0000       1.8.2.1
  +++ UriProperties.java        20 Feb 2004 09:48:59 -0000      1.8.2.2
  @@ -65,7 +65,7 @@
       //----------------------------------------
       public UriProperties(String aRootPath,Uri aUri) throws ServiceAccessException {
           super(aRootPath,aUri);
  -        dateFormat=new SimpleDateFormat();
  +        dateFormat=new SimpleDateFormat("MM/dd/yyyy HH:mm:ss Z");
           File aFile=getFile(aUri);
           if (aFile.exists()) {
               init(aFile);
  @@ -210,6 +210,7 @@
               
aElementLock.setAttribute("inheritance",booleanToString(aLock.isInheritable()));
               
aElementLock.setAttribute("exclusive",booleanToString(aLock.isExclusive()));
               aElementLock.setAttribute("lockId",aLock.getLockId());
  +            aElementLock.setAttribute("owner",aLock.getOwnerInfo());
               aElementLocks.addContent(aElementLock);
           }
           return aElementLocks;
  @@ -406,6 +407,7 @@
                   boolean aInheritable=new 
Boolean(aChild.getAttributeValue("inheritance")).booleanValue();
                   boolean aNegative=new 
Boolean(aChild.getAttributeValue("exclusive")).booleanValue();
                   String aLockId=aChild.getAttributeValue("lockId");
  +
                   locks.addElement(
                       new 
NodeLock(aLockId,object.getUri(),aSubject,aType,aDateExpiration,aInheritable,aNegative)
                   );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to