remm        01/04/27 20:45:56

  Modified:    src/share/org/apache/slide/common Namespace.java
  Log:
  - Add a new getUri(SlideToken, String) method in addition to getUri(String),
    which will set the specified SlideToken in the Uri object.
  
  Revision  Changes    Path
  1.29      +24 -8     jakarta-slide/src/share/org/apache/slide/common/Namespace.java
  
  Index: Namespace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Namespace.java    2001/04/03 13:42:37     1.28
  +++ Namespace.java    2001/04/28 03:45:56     1.29
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.28 
2001/04/03 13:42:37 juergen Exp $
  - * $Revision: 1.28 $
  - * $Date: 2001/04/03 13:42:37 $
  + * $Header: 
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.29 
2001/04/28 03:45:56 remm Exp $
  + * $Revision: 1.29 $
  + * $Date: 2001/04/28 03:45:56 $
    *
    * ====================================================================
    *
  @@ -93,7 +93,7 @@
    * Namespace class.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Remy Maucherat</a>
  - * @version $Revision: 1.28 $
  + * @version $Revision: 1.29 $
    */
   public final class Namespace {
       
  @@ -527,18 +527,33 @@
       
       
       /**
  -     * Builds a new uri object to access this namespace.
  +     * Builds a new uri object to access this namespace. This call will 
  +     * return a Uri which doesn't have its token field set. The store should
  +     * accept such Uri as valid, and bypass any check that is made based on the
  +     * state.
        *
        * @param uri Requested Uri
        * @return Uri
        */
       public Uri getUri(String uri) {
  +        return getUri(null, uri);
  +    }
  +    
  +    
  +    /**
  +     * Builds a new uri object to access this namespace.
  +     *
  +     * @param token SlideToken
  +     * @param uri Requested Uri
  +     * @return Uri
  +     */
  +    public Uri getUri(SlideToken token, String uri) {
           
           Uri result = null;
           Object temp = null;
           temp = uriCache.get(uri);
           if (temp == null) {
  -            result = new Uri(this, uri);
  +            result = new Uri(token, this, uri);
               uriCache.put(uri, result);
               if (uriCache.size() > 10000) {
                   clearUriCache();
  @@ -546,13 +561,14 @@
           } else {
               result = (Uri) temp;
               result.reconnectServices();
  +            result.setToken(token);
           }
           
           return result;
           
       }
  -    
  -    
  +
  +
       /**
        * Clear uri cache.
        */
  
  
  

Reply via email to