You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ed...@apache.org on 2003/08/19 15:17:51 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java SiteTree.java

edith       2003/08/19 06:17:51

  Modified:    src/java/org/apache/lenya/cms/publication
                        DefaultSiteTree.java SiteTree.java
  Log:
  Introduction of the save method in the Sitetree interface
  
  Revision  Changes    Path
  1.29      +15 -10    cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java
  
  Index: DefaultSiteTree.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- DefaultSiteTree.java	14 Aug 2003 16:30:53 -0000	1.28
  +++ DefaultSiteTree.java	19 Aug 2003 13:17:51 -0000	1.29
  @@ -541,13 +541,18 @@
           }
       }
   
  -    /**
  -     * Save the DefaultSiteTree.
  -     *
  -     * @throws IOException if the save failed
  -     * @throws TransformerException if the document could not be transformed
  -     */
  -    public void save() throws IOException, TransformerException {
  -        DocumentHelper.writeDocument(document, treefile);
  +    /** (non-Javadoc)
  +	 * @see org.apache.lenya.cms.publication.SiteTree#save()
  +	 */
  +	public void save() throws SiteTreeException {
  +        try {
  +			DocumentHelper.writeDocument(document, treefile);
  +		} catch (TransformerException e) {
  +			throw new SiteTreeException(
  +				"The document  " + document.getLocalName() + " could not be transformed");
  +		} catch (IOException e) {
  +			throw new SiteTreeException(
  +				"The saving of document" + document.getLocalName() + " failed");
  +		}
       }
   }
  
  
  
  1.16      +10 -3     cocoon-lenya/src/java/org/apache/lenya/cms/publication/SiteTree.java
  
  Index: SiteTree.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/SiteTree.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SiteTree.java	25 Jul 2003 16:42:46 -0000	1.15
  +++ SiteTree.java	19 Aug 2003 13:17:51 -0000	1.16
  @@ -179,4 +179,11 @@
   	 * @throws SiteTreeException when an error occurs.
   	 */
   	void importSubtree(SiteTreeNode subtreeRoot, SiteTreeNode newParent, String newid) throws SiteTreeException;
  +
  +	/**
  +	 * Save the SiteTree.
  +	 *
  +	 * @throws SiteTreeException if the saving failed
  +	 */
  +	void save()throws SiteTreeException;
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org