|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WikiAttachmentProvider
Defines an attachment provider - a class which is capable of saving binary data as attachments.
The difference between this class and WikiPageProvider is that there PageProviders handle Unicode text, whereas we handle binary data. While there are quite a lot of similarities in how we handle things, many providers can really use just one. In addition, since binary files can be really large, we rely on Input/OutputStreams.
Field Summary |
---|
Fields inherited from interface com.ecyrd.jspwiki.WikiProvider |
---|
LATEST_VERSION |
Method Summary | |
---|---|
void |
deleteAttachment(Attachment att)
Removes an entire page from the repository. |
void |
deleteVersion(Attachment att)
Removes a specific version from the repository. |
Collection |
findAttachments(QueryItem[] query)
Finds attachments based on the query. |
InputStream |
getAttachmentData(Attachment att)
Get attachment data. |
Attachment |
getAttachmentInfo(WikiPage page,
String name,
int version)
Returns info about an attachment. |
List |
getVersionHistory(Attachment att)
Returns version history. |
List |
listAllChanged(Date timestamp)
Lists changed attachments since given date. |
Collection |
listAttachments(WikiPage page)
Lists all attachments attached to a page. |
void |
moveAttachmentsForPage(String oldParent,
String newParent)
Move all the attachments for a given page so that they are attached to a new page. |
void |
putAttachmentData(Attachment att,
InputStream data)
Put new attachment data. |
Methods inherited from interface com.ecyrd.jspwiki.WikiProvider |
---|
getProviderInfo, initialize |
Method Detail |
---|
void putAttachmentData(Attachment att, InputStream data) throws ProviderException, IOException
ProviderException
IOException
InputStream getAttachmentData(Attachment att) throws ProviderException, IOException
ProviderException
IOException
Collection listAttachments(WikiPage page) throws ProviderException
ProviderException
Collection findAttachments(QueryItem[] query)
List listAllChanged(Date timestamp) throws ProviderException
This is different from WikiPageProvider, where you basically get a list of all pages, then sort them locally. However, since some providers can be more efficient in locating recently changed files (like any database) than our non-optimized Java code, it makes more sense to fetch the whole list this way.
To get all files, call this with Date(0L);
timestamp
- List all files from this date onward.
ProviderException
Attachment getAttachmentInfo(WikiPage page, String name, int version) throws ProviderException
ProviderException
List getVersionHistory(Attachment att)
void deleteVersion(Attachment att) throws ProviderException
att
- Attachment to be removed. The version field is checked, and thus
only that version is removed.
ProviderException
- If the attachment cannot be removed for some reason.void deleteAttachment(Attachment att) throws ProviderException
att
- Attachment to delete.
ProviderException
- If the page could not be removed for some reason.void moveAttachmentsForPage(String oldParent, String newParent) throws ProviderException
oldParent
- Name of the page we are to move the attachments from.newParent
- Name of the page we are to move the attachments to.
ProviderException
- If the attachments could not be moved for some
reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |