luetzkendorf    2005/02/25 08:58:31

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        UriHandler.java
  Log:
  two new history path related test methods added
  
  Revision  Changes    Path
  1.38      +25 -0     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/UriHandler.java
  
  Index: UriHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/UriHandler.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- UriHandler.java   29 Dec 2004 16:39:43 -0000      1.37
  +++ UriHandler.java   25 Feb 2005 16:58:31 -0000      1.38
  @@ -590,6 +590,31 @@
       }
       
       /**
  +     * Returns <code>true</code> if this is a collection below the history 
path,
  +     * but not a history. This is relevant only with the 
HistoryCollectionHack
  +     * where we have collections like this: /my/history/path/1/2, that are 
not 
  +     * histories of versions.
  +     */
  +    public boolean isHistoryCollectionUri() {
  +        HistoryPathHandler hpathHandler = 
HistoryPathHandler.getHistoryPathHandler();
  +
  +        if (UriHandler.useHistoryCollectionHack) {
  +            return hpathHandler.isAncestorOf(this) && !isHistoryUri()
  +                    && !isVersionUri();
  +        } else {
  +            return false;
  +        }
  +    }
  +
  +    /**
  +     * Returns <code>true</code> if this is any uri below the history path.
  +     */
  +    public boolean isHistoryRelatedUri() {
  +        HistoryPathHandler hpathHandler = 
HistoryPathHandler.getHistoryPathHandler();
  +        return hpathHandler.isAncestorOf(this);
  +    }
  +    
  +    /**
        * Return true, if this URI determines the workspace path.
        */
       public boolean isWorkspacePathUri() {
  
  
  

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

Reply via email to