public class Attachment extends WikiPage implements Attachment
ALIAS, AUTHOR, CHANGENOTE, DESCRIPTION, REDIRECT, VIEWCOUNT| Constructor and Description |
|---|
Attachment(Engine engine,
String parentPage,
String fileName)
Creates a new attachment.
|
Attachment(WikiEngine engine,
String parentPage,
String fileName)
Deprecated.
kept for compatibility with page/attachment providers not using public API. Use
Attachment(Engine, String, String) instead. |
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Returns the file name of the attachment.
|
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(String name)
Sets the file name of this attachment.
|
String |
toString()
Returns a human-readable, only-debugging-suitable description.
|
clone, compareTo, equals, getAcl, getAttribute, getAttributes, getAuthor, getLastModified, getName, getSize, getVersion, getWiki, hashCode, hasMetadata, invalidateMetadata, removeAttribute, setAcl, setAcl, setAttribute, setAuthor, setHasMetadata, setLastModified, setSize, setVersionfinalize, getClass, notify, notifyAll, wait, wait, waitclone, getAcl, getAttribute, getAttributes, getAuthor, getLastModified, getName, getSize, getVersion, getWiki, hasMetadata, invalidateMetadata, removeAttribute, setAcl, setAttribute, setAuthor, setHasMetadata, setLastModified, setSize, setVersioncompareTopublic Attachment(Engine engine, String parentPage, String fileName)
engine - The Engine which is hosting this attachment.parentPage - The page which will contain this attachment.fileName - The file name for the attachment.@Deprecated public Attachment(WikiEngine engine, String parentPage, String fileName)
Attachment(Engine, String, String) instead.engine - The Engine which is hosting this attachment.parentPage - The page which will contain this attachment.fileName - The file name for the attachment.public String getFileName()
getFileName in interface Attachmentpublic void setFileName(String name)
setFileName in interface Attachmentname - The name of the attachment. Must be a legal file name without the path.public String getParentName()
getParentName in interface Attachmentpublic boolean isCacheable()
isCacheable in interface Attachmentpublic void setCacheable(boolean value)
setCacheable in interface Attachmentvalue - True or false, depending on whether you want this attachment to be cacheable or not.Copyright © 2001-2020 The Apache Software Foundation. All rights reserved.