Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 80 → Rev 81

/xservices/trunk/src/java/net/brutex/xservices/types/AttachmentType.java
20,20 → 20,32
import java.io.IOException;
 
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlMimeType;
 
import net.brutex.xservices.util.BrutexNamespaces;
 
import org.apache.cxf.aegis.type.java5.XmlElement;
import org.apache.cxf.aegis.type.java5.XmlType;
 
 
/**
* Represents a single file based attachment type.
* @author Brian Rosenberger, bru@brutex.de
* @since 0.4.0
*/
@XmlType(name=AttachmentType.XML_NAME, namespace=BrutexNamespaces.WS_XSERVICES)
public class AttachmentType {
 
public static final String XML_NAME="attachment";
private DataHandler content;
private String filename = null;
 
@XmlMimeType("application/octet-stream")
@XmlElement(minOccurs="1")
public void setContent(DataHandler content) {
this.content = content;
}
 
@XmlMimeType("application/octet-stream")
@XmlElement(required=true)
public DataHandler getContent() {
return content;
}