You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2011/08/03 20:50:24 UTC
svn commit: r1153608 - in
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments:
Part.java impl/AbstractPart.java impl/PartOnFile.java
impl/PartOnMemoryEnhanced.java
Author: veithen
Date: Wed Aug 3 18:50:23 2011
New Revision: 1153608
URL: http://svn.apache.org/viewvc?rev=1153608&view=rev
Log:
AXIOM-350: Stripped a couple of methods from the Part interface that are currently not used.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java?rev=1153608&r1=1153607&r2=1153608&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java Wed Aug 3 18:50:23 2011
@@ -21,9 +21,6 @@ package org.apache.axiom.attachments;
import javax.activation.DataHandler;
import javax.mail.MessagingException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
/**
* Abstract for Part. A Part can be the SOAP Part or an Attachment Part.
@@ -62,32 +59,6 @@ public interface Part {
public String getContentID() throws MessagingException;
/**
- * The part may be backed by a file. If that is the case,
- * this method returns the file name.
- *
- * @return the name of the file
- * @throws MessagingException
- * @deprecated The callers should not no how the part
- * is implemented.
- */
- public String getFileName() throws MessagingException;
-
- /**
- * @return Get the part data as an input stream
- * @throws IOException
- * @throws MessagingException
- */
- public InputStream getInputStream() throws IOException, MessagingException;
-
- /**
- * Add a Header (name, value) to the part
- * @param name
- * @param value
- * @throws MessagingException
- */
- public void addHeader(String name, String value) throws MessagingException;
-
- /**
* Get the value of a specific header
* @param name
* @return value or null
@@ -95,10 +66,4 @@ public interface Part {
*/
public String getHeader(String name) throws MessagingException;
- /**
- * @return Enumeration of javax.mail.Header
- * @throws MessagingException
- */
- public Enumeration getAllHeaders() throws MessagingException;
-
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java?rev=1153608&r1=1153607&r2=1153608&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java Wed Aug 3 18:50:23 2011
@@ -28,9 +28,6 @@ import javax.mail.Header;
import javax.mail.MessagingException;
import javax.mail.internet.HeaderTokenizer;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
import java.util.Hashtable;
/**
@@ -59,24 +56,6 @@ abstract class AbstractPart implements P
}
}
- public void addHeader(String name, String value) {
- if (log.isDebugEnabled()){
- log.debug("addHeader: (" + name + ") value=(" + value +")");
- }
- Header headerObj = new Header(name, value);
-
- // Use the lower case name as the key
- String key = name.toLowerCase();
- headers.put(key, headerObj);
- }
-
- public Enumeration getAllHeaders() throws MessagingException {
- if(log.isDebugEnabled()){
- log.debug("getAllHeaders");
- }
- return headers.elements();
- }
-
public String getHeader(String name) {
String key = name.toLowerCase();
Header header = (Header) headers.get(key);
@@ -144,10 +123,6 @@ abstract class AbstractPart implements P
// The following classes must be implemented by the derived class.
public abstract DataHandler getDataHandler() throws MessagingException;
-
- public abstract String getFileName() throws MessagingException;
-
- public abstract InputStream getInputStream() throws IOException, MessagingException;
public abstract long getSize() throws MessagingException;
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java?rev=1153608&r1=1153607&r2=1153608&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java Wed Aug 3 18:50:23 2011
@@ -69,20 +69,6 @@ public class PartOnFile extends Abstract
public DataHandler getDataHandler() throws MessagingException {
return fileAccessor.getDataHandler(getContentType());
}
-
- /* (non-Javadoc)
- * @see org.apache.axiom.attachments.impl.AbstractPart#getFileName()
- */
- public String getFileName() throws MessagingException {
- return fileAccessor.getFileName();
- }
-
- /* (non-Javadoc)
- * @see org.apache.axiom.attachments.impl.AbstractPart#getInputStream()
- */
- public InputStream getInputStream() throws IOException, MessagingException {
- return fileAccessor.getInputStream();
- }
/* (non-Javadoc)
* @see org.apache.axiom.attachments.impl.AbstractPart#getSize()
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java?rev=1153608&r1=1153607&r2=1153608&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java Wed Aug 3 18:50:23 2011
@@ -60,18 +60,6 @@ public class PartOnMemoryEnhanced extend
DataSource ds = new MyByteArrayDataSource();
return new MyDataHandler(ds);
}
-
- /* (non-Javadoc)
- * @see org.apache.axiom.attachments.impl.AbstractPart#getFileName()
- */
- public String getFileName() throws MessagingException {
- // There is no file name
- return null;
- }
-
- public InputStream getInputStream() throws IOException, MessagingException {
- return new BAAInputStream(data, length);
- }
public long getSize() throws MessagingException {
return length;