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 pn...@apache.org on 2003/08/18 08:50:33 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/store AbstractStore.java Store.java

pnever      2003/08/17 23:50:33

  Modified:    src/share/org/apache/slide/store AbstractStore.java
                        Store.java
  Log:
  Prepare for binding
  
  Revision  Changes    Path
  1.32      +20 -5     jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java
  
  Index: AbstractStore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- AbstractStore.java	25 Apr 2002 21:12:27 -0000	1.31
  +++ AbstractStore.java	18 Aug 2003 06:50:33 -0000	1.32
  @@ -587,6 +587,15 @@
           enlist(nodeStore);
           try {
               nodeStore.createObject(uri, tempObject);
  +            if (useBinding()) {
  +                String uuri = tempObject.getUuri();
  +                if (uuri == null) {
  +                    throw new IllegalStateException();
  +                }
  +                object.setUuri(uuri);
  +            } else {
  +                object.setUuri(tempObject.getUri());
  +            }
           } catch (ServiceAccessException e) {
               delist(nodeStore, false);
               throw e;
  @@ -1480,5 +1489,11 @@
           }
       }
       
  -    
  +    /**
  +     * Always returns false. Default implementation for this method
  +     * Stores that support binding should override this method.
  +     */
  +    public boolean useBinding() {
  +        return false;
  +    }
   }
  
  
  
  1.7       +15 -4     jakarta-slide/src/share/org/apache/slide/store/Store.java
  
  Index: Store.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/Store.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Store.java	25 Apr 2002 21:15:13 -0000	1.6
  +++ Store.java	18 Aug 2003 06:50:33 -0000	1.7
  @@ -96,6 +96,13 @@
        */
       String getName();
       
  +    /**
  +     * Get parameter value for specified key
  +     *
  +     * @param    key                 an Object
  +     * @return   an Object
  +     */
  +    Object getParameter( Object key );
       
       /**
        * Set the node store associated with this store.
  @@ -135,5 +142,9 @@
       void setContentStore(ContentStore contentStore);
       
       
  +    /**
  +     * Returns true if binding is supported an enabled for this store
  +     */
  +    boolean useBinding();
   
   }
  
  
  

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