public class CachingAttachmentProvider extends java.lang.Object implements AttachmentProvider
PROP_STORAGEDIRLATEST_VERSION| Constructor and Description |
|---|
CachingAttachmentProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAttachment(Attachment att) |
void |
deleteVersion(Attachment att) |
java.util.Collection<Attachment> |
findAttachments(QueryItem[] query) |
java.io.InputStream |
getAttachmentData(Attachment att) |
Attachment |
getAttachmentInfo(Page page,
java.lang.String name,
int version) |
java.lang.String |
getProviderInfo()
Gets the provider class name, and cache statistics (misscount and hitcount of the attachment cache).
|
AttachmentProvider |
getRealProvider()
Returns the WikiAttachmentProvider that this caching provider delegates to.
|
java.util.List<Attachment> |
getVersionHistory(Attachment att) |
void |
initialize(Engine engine,
java.util.Properties properties) |
java.util.List<Attachment> |
listAllChanged(java.util.Date timestamp) |
java.util.List<Attachment> |
listAttachments(Page page) |
void |
moveAttachmentsForPage(java.lang.String oldParent,
java.lang.String newParent) |
void |
putAttachmentData(Attachment att,
java.io.InputStream data) |
public CachingAttachmentProvider()
public void initialize(Engine engine, java.util.Properties properties) throws NoRequiredPropertyException, java.io.IOException
initialize in interface WikiProviderNoRequiredPropertyExceptionjava.io.IOExceptionpublic void putAttachmentData(Attachment att, java.io.InputStream data) throws ProviderException, java.io.IOException
putAttachmentData in interface AttachmentProviderProviderExceptionjava.io.IOExceptionpublic java.io.InputStream getAttachmentData(Attachment att) throws ProviderException, java.io.IOException
getAttachmentData in interface AttachmentProviderProviderExceptionjava.io.IOExceptionpublic java.util.List<Attachment> listAttachments(Page page) throws ProviderException
listAttachments in interface AttachmentProviderProviderExceptionpublic java.util.Collection<Attachment> findAttachments(QueryItem[] query)
findAttachments in interface AttachmentProviderpublic java.util.List<Attachment> listAllChanged(java.util.Date timestamp) throws ProviderException
listAllChanged in interface AttachmentProviderProviderExceptionpublic Attachment getAttachmentInfo(Page page, java.lang.String name, int version) throws ProviderException
getAttachmentInfo in interface AttachmentProviderProviderExceptionpublic java.util.List<Attachment> getVersionHistory(Attachment att)
getVersionHistory in interface AttachmentProviderpublic void deleteVersion(Attachment att) throws ProviderException
deleteVersion in interface AttachmentProviderProviderExceptionpublic void deleteAttachment(Attachment att) throws ProviderException
deleteAttachment in interface AttachmentProviderProviderExceptionpublic java.lang.String getProviderInfo()
getProviderInfo in interface WikiProviderpublic AttachmentProvider getRealProvider()
public void moveAttachmentsForPage(java.lang.String oldParent, java.lang.String newParent) throws ProviderException
moveAttachmentsForPage in interface AttachmentProviderProviderExceptionCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.