Package org.apache.wiki.api.core
Interface Attachment
-
- All Known Implementing Classes:
Attachment
,DynamicAttachment
public interface Attachment extends Page
Describes an attachment. Attachments are actually derivatives of a WikiPage, since they do actually have a WikiName as well.
-
-
Field Summary
-
Fields inherited from interface org.apache.wiki.api.core.Page
ALIAS, AUTHOR, CHANGENOTE, DESCRIPTION, REDIRECT, VIEWCOUNT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getFileName()
Returns the file name of the attachment.java.lang.String
getParentName()
Returns the name of the parent of this Attachment, i.e. the page which contains this attachment.boolean
isCacheable()
Returns true, if this attachment can be cached by the user agent.void
setCacheable(boolean value)
Sets this attachment to be cacheable or not.void
setFileName(java.lang.String name)
Sets the file name of this attachment.-
Methods inherited from interface org.apache.wiki.api.core.Page
clone, getAcl, getAttribute, getAttributes, getAuthor, getLastModified, getName, getSize, getVersion, getWiki, hasMetadata, invalidateMetadata, removeAttribute, setAcl, setAttribute, setAuthor, setHasMetadata, setLastModified, setSize, setVersion
-
-
-
-
Method Detail
-
getFileName
java.lang.String getFileName()
Returns the file name of the attachment.- Returns:
- A String with the file name.
-
setFileName
void setFileName(java.lang.String name)
Sets the file name of this attachment.- Parameters:
name
- The name of the attachment. Must be a legal file name without the path.
-
getParentName
java.lang.String getParentName()
Returns the name of the parent of this Attachment, i.e. the page which contains this attachment.- Returns:
- String depicting the parent of the attachment.
-
isCacheable
boolean isCacheable()
Returns true, if this attachment can be cached by the user agent. By default attachments are cacheable.- Returns:
- False, if the attachment should not be cached by the user agent.
- Since:
- 2.5.34
-
setCacheable
void setCacheable(boolean value)
Sets this attachment to be cacheable or not. This mostly concerns things like DynamicAttachments, but it may be useful for certain AttachmentProviders as well.- Parameters:
value
- True or false, depending on whether you want this attachment to be cacheable or not.- Since:
- 2.5.34
-
-