public class AttachmentProperties extends java.lang.Object implements PropertiesHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ATTACHMENT_STORE_POLICY
Attachment store policy in use
Default: AttachmentStore.POLICY_MEM_BUFFER |
static java.lang.String |
PROP_MAX_ATTACHMENT_SIZE
Maximum attachment size in bytes to accept
Default: 16777216 |
static java.lang.String |
PROP_MAX_MEM_BUFFER_SIZE
Maximum size in bytes for which attachment raw data can be kept into memory when using
AttachmentStore.POLICY_MEM_BUFFER. |
static java.lang.String |
PROP_READ_BUFFER_SIZE
Size of buffer to allocate when reading in attachments from a network or file stream.
|
static java.lang.String |
PROP_STORE_PATH
Path to the file system location where temporary attachment files should be stored.
|
static java.lang.String |
PROP_STREAM_BUFFER_SIZE
Size of buffer to allocate when reading in attachments with streaming support, see
InputStreamAttachment and
AttachmentFactory.getStreamingMediaTypes(). |
static java.lang.String |
PROP_STREAMING_MEDIA_TYPES
MIME types to stream when sending as attachments.
|
FALSE, TRUE| Constructor and Description |
|---|
AttachmentProperties() |
| Modifier and Type | Method and Description |
|---|---|
void |
finishedSection(int depth)
This method indicates the PropertiesHandler, that the last section with the given depth has
been read completely.
|
int |
getAttachmentStorePolicy() |
static AttachmentProperties |
getInstance()
Returns instance of the attachment properties handler.
|
long |
getMaxAttachmentSize() |
long |
getMaxMemBufferSize() |
int |
getReadBufferSize() |
java.lang.String |
getStorePath() |
int |
getStreamBufferSize() |
Iterator |
getStreamingMediaTypes() |
void |
setAttachmentStorePolicy(int attachmentStorePolicy) |
void |
setMaxAttachmentSize(long maxAttachmentSize) |
void |
setMaxMemBufferSize(long maxMemBufferSize) |
void |
setProperties(PropertyHeader header,
Property property) |
void |
setReadBufferSize(int readBufferSize) |
void |
setStorePath(java.lang.String storePath) |
void |
setStreamingMediaTypes(DataStructure streamingMediaTypes) |
void |
setStremBufferSize(int streamBufferSize) |
public static final java.lang.String PROP_ATTACHMENT_STORE_POLICY
AttachmentStore.POLICY_MEM_BUFFERpublic static final java.lang.String PROP_MAX_ATTACHMENT_SIZE
public static final java.lang.String PROP_MAX_MEM_BUFFER_SIZE
AttachmentStore.POLICY_MEM_BUFFER. MUST be less than or equal to PROP_MAX_ATTACHMENT_SIZE.public static final java.lang.String PROP_STORE_PATH
public static final java.lang.String PROP_READ_BUFFER_SIZE
public static final java.lang.String PROP_STREAM_BUFFER_SIZE
AttachmentFactory.getStreamingMediaTypes(). public static final java.lang.String PROP_STREAMING_MEDIA_TYPES
public static AttachmentProperties getInstance()
public void setProperties(PropertyHeader header, Property property)
setProperties in interface PropertiesHandlerheader - header of sectionproperty - property within sectionpublic void finishedSection(int depth)
PropertiesHandlerfinishedSection in interface PropertiesHandlerdepth - depth of section.public int getAttachmentStorePolicy()
public void setAttachmentStorePolicy(int attachmentStorePolicy)
attachmentStorePolicy - the attachmentStorePolicy to setpublic long getMaxAttachmentSize()
public void setMaxAttachmentSize(long maxAttachmentSize)
maxAttachmentSize - the maxAttachmentSize to setpublic long getMaxMemBufferSize()
public void setMaxMemBufferSize(long maxMemBufferSize)
maxMemBufferSize - the maxMemBufferSize to setpublic java.lang.String getStorePath()
public void setStorePath(java.lang.String storePath)
storePath - the storePath to setpublic int getReadBufferSize()
public void setReadBufferSize(int readBufferSize)
readBufferSize - the readBufferSize to setpublic int getStreamBufferSize()
public void setStremBufferSize(int streamBufferSize)
streamBufferSize - the streamBufferSize to setpublic Iterator getStreamingMediaTypes()
public void setStreamingMediaTypes(DataStructure streamingMediaTypes)
streamingMediaTypes - the streamingMediaTypes to set