You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/08/28 13:39:58 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DublinCoreProxy.java DublinCore.java

egli        2003/08/28 04:39:58

  Modified:    src/java/org/apache/lenya/cms/publication
                        DublinCoreProxy.java DublinCore.java
  Log:
  Exceptions in the setter methods of DublinCore are no longer silently
  caught, but are now passed on.
  
  Revision  Changes    Path
  1.2       +12 -17    cocoon-lenya/src/java/org/apache/lenya/cms/publication/DublinCoreProxy.java
  
  Index: DublinCoreProxy.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DublinCoreProxy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DublinCoreProxy.java	28 Aug 2003 09:51:53 -0000	1.1
  +++ DublinCoreProxy.java	28 Aug 2003 11:39:58 -0000	1.2
  @@ -80,14 +80,9 @@
        * 
        * @return a real dublin core object
        */
  -    protected DublinCore instance() {
  +    protected DublinCore instance() throws DocumentException {
           if (dcCore == null) {
  -            try {
  -                dcCore = new DublinCoreImpl(this.cmsDocument);
  -            } catch (DocumentException e) {
  -                // TODO Auto-generated catch block
  -                e.printStackTrace();
  -            }
  +            dcCore = new DublinCoreImpl(this.cmsDocument);
           }
           return dcCore;
       }
  @@ -168,7 +163,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setCreator(java.lang.String)
        */
  -    public void setCreator(String creator) {
  +    public void setCreator(String creator) throws DocumentException {
           instance().setCreator(creator);
       }
   
  @@ -176,7 +171,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setDateCreated(java.lang.String)
        */
  -    public void setDateCreated(String dateCreated) {
  +    public void setDateCreated(String dateCreated) throws DocumentException {
           instance().setDateCreated(dateCreated);
       }
   
  @@ -184,7 +179,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setDateIssued(java.lang.String)
        */
  -    public void setDateIssued(String dateIssued) {
  +    public void setDateIssued(String dateIssued) throws DocumentException {
           instance().setDateIssued(dateIssued);
       }
   
  @@ -192,7 +187,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setDescription(java.lang.String)
        */
  -    public void setDescription(String description) {
  +    public void setDescription(String description) throws DocumentException {
           instance().setDescription(description);
       }
   
  @@ -200,7 +195,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setIdentifier(java.lang.String)
        */
  -    public void setIdentifier(String identifier) {
  +    public void setIdentifier(String identifier) throws DocumentException {
           instance().setIdentifier(identifier);
       }
   
  @@ -208,7 +203,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setPublisher(java.lang.String)
        */
  -    public void setPublisher(String publisher) {
  +    public void setPublisher(String publisher) throws DocumentException {
           instance().setPublisher(publisher);
       }
   
  @@ -216,7 +211,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setRights(java.lang.String)
        */
  -    public void setRights(String rights) {
  +    public void setRights(String rights) throws DocumentException {
           instance().setRights(rights);
       }
   
  @@ -224,7 +219,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setSubject(java.lang.String)
        */
  -    public void setSubject(String subject) {
  +    public void setSubject(String subject) throws DocumentException {
           instance().setSubject(subject);
       }
   
  @@ -232,7 +227,7 @@
        *  (non-Javadoc)
        * @see org.apache.lenya.cms.publication.DublinCore#setTitle(java.lang.String)
        */
  -    public void setTitle(String title) {
  +    public void setTitle(String title) throws DocumentException {
           instance().setTitle(title);
       }
   
  
  
  
  1.19      +28 -10    cocoon-lenya/src/java/org/apache/lenya/cms/publication/DublinCore.java
  
  Index: DublinCore.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DublinCore.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DublinCore.java	28 Aug 2003 09:51:53 -0000	1.18
  +++ DublinCore.java	28 Aug 2003 11:39:58 -0000	1.19
  @@ -83,8 +83,10 @@
        * Set the DC creator
        * 
        * @param creator the Creator
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setCreator(String creator);
  +    void setCreator(String creator) throws DocumentException;
   
       /**
        * Get the title
  @@ -99,8 +101,10 @@
        * Set the DC title
        * 
        * @param title the title
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setTitle(String title);
  +    void setTitle(String title) throws DocumentException;
   
       /**
        * Get the description
  @@ -115,8 +119,10 @@
        * Set the DC Description
        * 
        * @param description the description
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setDescription(String description);
  +    void setDescription(String description) throws DocumentException;
   
       /**
        * Get the identifier
  @@ -131,8 +137,10 @@
        * Set the DC Identifier
        * 
        * @param identifier the identifier
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setIdentifier(String identifier);
  +    void setIdentifier(String identifier) throws DocumentException;
   
       /**
        * Get the subject.
  @@ -147,8 +155,10 @@
        * Set the DC Subject
        * 
        * @param subject the subject
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setSubject(String subject);
  +    void setSubject(String subject) throws DocumentException;
   
       /**
        * Get the publisher
  @@ -163,8 +173,10 @@
        * Set the publisher
        * 
        * @param publisher the publisher
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setPublisher(String publisher);
  +    void setPublisher(String publisher) throws DocumentException;
   
       /**
        * Get the date of issue
  @@ -179,8 +191,10 @@
        * Set the date of issue
        * 
        * @param dateIssued the date of issue
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setDateIssued(String dateIssued);
  +    void setDateIssued(String dateIssued) throws DocumentException;
       
       /**
        * Get the date of creation
  @@ -195,8 +209,10 @@
        * Set the date of creation
        * 
        * @param dateCreated the date of creation
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setDateCreated(String dateCreated);
  +    void setDateCreated(String dateCreated) throws DocumentException;
       
       /**
        * Get the rights
  @@ -211,6 +227,8 @@
        * Set the DC Rights
        * 
        * @param rights the rights
  +     * 
  +     * @throws DocumentException if an error occurs
        */
  -    void setRights(String rights);
  +    void setRights(String rights) throws DocumentException;
   }
  
  
  

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