public abstract class AttachmentFactory
extends java.lang.Object
| Constructor and Description |
|---|
AttachmentFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
addStreamingMediaType(ContentType type)
Add a streaming mediatype.
|
abstract OutgoingAttachment |
createFileAttachment(java.lang.String absoluteFilename,
ContentType contentType)
Creates a new FileAttachment.
|
abstract OutgoingAttachment |
createFileAttachment(java.lang.String absoluteFilename,
java.lang.String contentId,
ContentType contentType)
Creates a new FileAttachment.
|
abstract OutgoingAttachment |
createMemoryAttachment(byte[] bytes,
ContentType contentType)
Creates a new MemoryAttachment.
|
abstract OutgoingAttachment |
createMemoryAttachment(byte[] bytes,
java.lang.String contentId,
ContentType contentType)
Creates a new MemoryAttachment.
|
abstract OutgoingOutputStreamAttachment |
createStreamAttachment(ContentType contentType)
Creates a new OutgoingOutputStreamAttachment.
|
abstract OutgoingAttachment |
createStreamAttachment(java.io.InputStream in,
ContentType contentType)
Creates a new OutgoingInputStreamAttachment.
|
abstract OutgoingAttachment |
createStreamAttachment(java.io.InputStream in,
java.lang.String contentId,
ContentType contentType)
Creates a new OutgoingInputStreamAttachment.
|
abstract OutgoingOutputStreamAttachment |
createStreamAttachment(java.lang.String contentId,
ContentType contentType)
Creates a new OutgoingOutputStreamAttachment.
|
static AttachmentFactory |
getInstance()
Returns an implementation of the attachment factory if available, which allows to handle
incoming and outgoing attachments.If no implementation is loaded yet attemping to load the
DefaultAttachmentFactory . |
abstract Iterator |
getStreamingMediaTypes()
Returns an iterator over all streaming mediatypes.
|
abstract boolean |
isStreamingMediaType(ContentType type)
Returns true if type is streaming mediatype.
|
abstract boolean |
removeStreamingMediaType(ContentType type)
Removes a streaming mediatype.
|
abstract void |
resetStreamingMediaTypes()
Reseted all streaming media types.
|
public static AttachmentFactory getInstance()
DefaultAttachmentFactory .
It is necessary to load the corresponding module for attachment support.
public abstract OutgoingAttachment createFileAttachment(java.lang.String absoluteFilename, ContentType contentType)
absoluteFilename - contentType - public abstract OutgoingAttachment createFileAttachment(java.lang.String absoluteFilename, java.lang.String contentId, ContentType contentType)
absoluteFilename - contentId - contentType - public abstract OutgoingAttachment createMemoryAttachment(byte[] bytes, ContentType contentType)
bytes - contentType - public abstract OutgoingAttachment createMemoryAttachment(byte[] bytes, java.lang.String contentId, ContentType contentType)
bytes - contentId - contentType - public abstract OutgoingAttachment createStreamAttachment(java.io.InputStream in, ContentType contentType)
in - contentType - public abstract OutgoingAttachment createStreamAttachment(java.io.InputStream in, java.lang.String contentId, ContentType contentType)
in - contentId - contentType - public abstract OutgoingOutputStreamAttachment createStreamAttachment(ContentType contentType)
contentType - public abstract OutgoingOutputStreamAttachment createStreamAttachment(java.lang.String contentId, ContentType contentType)
contentId - contentType - public abstract boolean addStreamingMediaType(ContentType type)
type - public abstract boolean removeStreamingMediaType(ContentType type)
type - public abstract boolean isStreamingMediaType(ContentType type)
type - public abstract Iterator getStreamingMediaTypes()
public abstract void resetStreamingMediaTypes()