|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.webservices.server.AttachmentManagerServiceImpl
public class AttachmentManagerServiceImpl
Constructor Summary | |
---|---|
AttachmentManagerServiceImpl()
|
Method Summary | |
---|---|
void |
addAllowedType(java.lang.String contentType)
Adds a content type to the list of explicitly allowed types. |
void |
addDisallowedType(java.lang.String contentType)
Adds a content type to the list of explicitly disallowed types. |
java.lang.String[] |
allowedTypes()
Returns a String[] for the list of explicitly allowed types. |
java.lang.String[] |
disallowedTypes()
Returns an Iterator for the list of explicitly disallowed types. |
boolean |
getAllowAllByDefault()
Returns true if in the "allow all content types by default" mode. |
long |
getAttachmentDirectorySize()
Returns the size (in bytes) of the attachment directory on the file system. |
int |
getImagePreviewMaxSize()
Returns the max dimension of generated thumbnails (ie, the max value for the width or height). |
int |
getMaxAttachmentSize()
Returns the maximum size of an individual attachment in kilobytes. |
int |
getMaxAttachmentsPerMessage()
Returns the maximum number of attachments per message. |
long |
getMaxFilesystemCacheSize()
Returns the maximum amount of storage (in bytes) that will be used by the file system cache when database attachment mode is enabled. |
boolean |
isDatabaseModeEnabled()
Returns true if the binary attachment data is stored in the database. |
boolean |
isImagePreviewEnabled()
Returns true if image preview support is enabled. |
boolean |
isImagePreviewRatioEnabled()
Returns true if the aspect ratio of thumbnails should be preserved. |
boolean |
isValidType(java.lang.String contentType)
Returns true if the content type is valid based on the current settings of the allowAllByDefault flag and the allowed and disallowed types list. |
void |
removeAllowedType(java.lang.String contentType)
Removes a content type fromt he list of explicitly allowed types. |
void |
removeDisallowedType(java.lang.String contentType)
Removes a content type from the list of explicitly disallowed types. |
void |
setAllowAllByDefault(boolean allowAllByDefault)
Sets the default allowed content types mode. |
void |
setDatabaseModeEnabled(boolean enabled)
Enables or disables storage of binary attachment data in the database. |
void |
setImagePreviewEnabled(boolean imagePreviewEnabled)
Toggles whether image preview support is enabled. |
void |
setImagePreviewMaxSize(int imagePreviewMaxSize)
Sets the max dimension of generated thumbnails (ie, the max value for the width or height). |
void |
setImagePreviewRatioEnabled(boolean imagePreviewRatioEnabled)
Toggles whether the aspect ratio of thumbnails should be preserved. |
void |
setMaxAttachmentSize(int maxAttachmentSize)
Sets the maximum size of an individual attachment in kilobytes. |
void |
setMaxAttachmentsPerMessage(int maxAttachmentsPerMessage)
Sets the maximum number of attachments per message. |
void |
setMaxFilesystemCacheSize(long maxSize)
Sets the maximum amount of storage (in bytes) that will be used by the file system cache when database attachment mode is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttachmentManagerServiceImpl()
Method Detail |
---|
public boolean isDatabaseModeEnabled()
AttachmentManagerService
When database attachment mode is enabled, attachment data will be cached on the file system in the attachment directory in order to relieve load on the database.
isDatabaseModeEnabled
in interface AttachmentManagerService
public void setDatabaseModeEnabled(boolean enabled) throws UnauthorizedException
AttachmentManagerService
When database attachment mode is enabled, attachment data will be cached on the file system in the attachment directory in order to relieve load on the database.
setDatabaseModeEnabled
in interface AttachmentManagerService
enabled
- true if attachment data should be stored in the database.
UnauthorizedException
- if not a system administrator.public long getAttachmentDirectorySize() throws UnauthorizedException
AttachmentManagerService
The size of the attachment directory is computed asynchronously at system startup. Therefore, when the the size of the directory is not known, this method will return -1.
getAttachmentDirectorySize
in interface AttachmentManagerService
UnauthorizedException
- if not a system administrator.public long getMaxFilesystemCacheSize() throws UnauthorizedException
AttachmentManagerService
getMaxFilesystemCacheSize
in interface AttachmentManagerService
UnauthorizedException
- if not a system administrator.public void setMaxFilesystemCacheSize(long maxSize) throws UnauthorizedException
AttachmentManagerService
setMaxFilesystemCacheSize
in interface AttachmentManagerService
maxSize
- the max size of the file system cache for attachment data (in bytes).
UnauthorizedException
- if not a system administrator.public int getMaxAttachmentSize()
AttachmentManagerService
getMaxAttachmentSize
in interface AttachmentManagerService
public void setMaxAttachmentSize(int maxAttachmentSize) throws UnauthorizedException
AttachmentManagerService
setMaxAttachmentSize
in interface AttachmentManagerService
maxAttachmentSize
- the max size in kilobytes of any single
attachment.
UnauthorizedException
- if not an administrator.public int getMaxAttachmentsPerMessage()
AttachmentManagerService
getMaxAttachmentsPerMessage
in interface AttachmentManagerService
public void setMaxAttachmentsPerMessage(int maxAttachmentsPerMessage) throws UnauthorizedException
AttachmentManagerService
setMaxAttachmentsPerMessage
in interface AttachmentManagerService
maxAttachmentsPerMessage
- the max number of attachments allowed
per message.
UnauthorizedException
- if not an administrator.public boolean isValidType(java.lang.String contentType)
AttachmentManagerService
isValidType
in interface AttachmentManagerService
contentType
- the content type to test.
public void addAllowedType(java.lang.String contentType) throws UnauthorizedException
AttachmentManagerService
addAllowedType
in interface AttachmentManagerService
contentType
- a content type to add to the explicitly allowed types
list.
UnauthorizedException
- if not an administrator.public void removeAllowedType(java.lang.String contentType) throws UnauthorizedException
AttachmentManagerService
removeAllowedType
in interface AttachmentManagerService
contentType
- a content type to remove from the explicitly allowed
types list.
UnauthorizedException
- if not an administrator.public java.lang.String[] allowedTypes()
AttachmentManagerService
allowedTypes
in interface AttachmentManagerService
public void addDisallowedType(java.lang.String contentType) throws UnauthorizedException
AttachmentManagerService
addDisallowedType
in interface AttachmentManagerService
contentType
- a content type to add to the explicitly disallowed
types list.
UnauthorizedException
- if not an administrator.public void removeDisallowedType(java.lang.String contentType) throws UnauthorizedException
AttachmentManagerService
removeDisallowedType
in interface AttachmentManagerService
contentType
- a content type to remove from the explicitly disallowed
types list.
UnauthorizedException
- if not an administrator.public java.lang.String[] disallowedTypes()
AttachmentManagerService
disallowedTypes
in interface AttachmentManagerService
public boolean getAllowAllByDefault()
AttachmentManagerService
getAllowAllByDefault
in interface AttachmentManagerService
public void setAllowAllByDefault(boolean allowAllByDefault) throws UnauthorizedException
AttachmentManagerService
setAllowAllByDefault
in interface AttachmentManagerService
allowAllByDefault
- true if all content types should be
allowed by default.
UnauthorizedException
public boolean isImagePreviewEnabled()
AttachmentManagerService
isImagePreviewEnabled
in interface AttachmentManagerService
public void setImagePreviewEnabled(boolean imagePreviewEnabled) throws UnauthorizedException
AttachmentManagerService
setImagePreviewEnabled
in interface AttachmentManagerService
imagePreviewEnabled
- true if thumbnail support should be enabled.
UnauthorizedException
- if not a system administrator.public int getImagePreviewMaxSize()
AttachmentManagerService
getImagePreviewMaxSize
in interface AttachmentManagerService
public void setImagePreviewMaxSize(int imagePreviewMaxSize) throws UnauthorizedException
AttachmentManagerService
setImagePreviewMaxSize
in interface AttachmentManagerService
imagePreviewMaxSize
- the max dimension of a thumbnail.
UnauthorizedException
- if not a system administrator.public boolean isImagePreviewRatioEnabled()
AttachmentManagerService
isImagePreviewRatioEnabled
in interface AttachmentManagerService
public void setImagePreviewRatioEnabled(boolean imagePreviewRatioEnabled) throws UnauthorizedException
AttachmentManagerService
setImagePreviewRatioEnabled
in interface AttachmentManagerService
imagePreviewRatioEnabled
- true if the aspect ration should be preserved.
UnauthorizedException
- if not a system administrator.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |