james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r894642 - in /james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor: DefaultBodyDescriptor.java MaximalBodyDescriptor.java MutableBodyDescriptor.java
Date Wed, 30 Dec 2009 15:10:10 GMT
Author: bago
Date: Wed Dec 30 15:10:09 2009
New Revision: 894642

URL: http://svn.apache.org/viewvc?rev=894642&view=rev
Log:
Added newChild method to MutableBodyDescriptor and its implementations (part of MIME4J-155)

Modified:
    james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/DefaultBodyDescriptor.java
    james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
    james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MutableBodyDescriptor.java

Modified: james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/DefaultBodyDescriptor.java
URL: http://svn.apache.org/viewvc/james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/DefaultBodyDescriptor.java?rev=894642&r1=894641&r2=894642&view=diff
==============================================================================
--- james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/DefaultBodyDescriptor.java
(original)
+++ james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/DefaultBodyDescriptor.java
Wed Dec 30 15:10:09 2009
@@ -86,6 +86,10 @@
         }
     }
     
+    public MutableBodyDescriptor newChild() {
+		return new DefaultBodyDescriptor(this);
+    }
+    
     /**
      * Should be called for each <code>Content-</code> header field of 
      * a MIME message or part.
@@ -149,7 +153,6 @@
         if (main != null 
                 && ((main.startsWith("multipart/") && b != null) 
                         || !main.startsWith("multipart/"))) {
-            
             mimeType = main;
             this.subType = subtype;
             this.mediaType = type;

Modified: james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
URL: http://svn.apache.org/viewvc/james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java?rev=894642&r1=894641&r2=894642&view=diff
==============================================================================
--- james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
(original)
+++ james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
Wed Dec 30 15:10:09 2009
@@ -103,7 +103,11 @@
         this.contentMD5Raw = null;
         this.isContentMD5Set = false;
     }
-    
+
+    public MutableBodyDescriptor newChild() {
+		return new MaximalBodyDescriptor(this);
+    }
+
     @Override
     public void addField(RawField field) {
         String name = field.getName();

Modified: james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MutableBodyDescriptor.java
URL: http://svn.apache.org/viewvc/james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MutableBodyDescriptor.java?rev=894642&r1=894641&r2=894642&view=diff
==============================================================================
--- james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MutableBodyDescriptor.java
(original)
+++ james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/descriptor/MutableBodyDescriptor.java
Wed Dec 30 15:10:09 2009
@@ -32,5 +32,7 @@
      * @param field the MIME field.
      */
     void addField(RawField field);
+    
+    MutableBodyDescriptor newChild();
 
 }



Mime
View raw message