public interface Page extends java.lang.Cloneable, java.lang.Comparable<Page>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALIAS
A special variable name for storing a page alias.
|
static java.lang.String |
AUTHOR
A special variable name for storing the author.
|
static java.lang.String |
CHANGENOTE
A special variable name for storing a changenote.
|
static java.lang.String |
DESCRIPTION
"Summary" is a short summary of the page.
|
static java.lang.String |
REDIRECT
A special variable name for storing a redirect note
|
static java.lang.String |
VIEWCOUNT
A special variable name for storing a viewcount.
|
| Modifier and Type | Method and Description |
|---|---|
Page |
clone() |
Acl |
getAcl()
Returns the Acl for this page.
|
<T> T |
getAttribute(java.lang.String key)
A WikiPage may have a number of attributes, which might or might not be available.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns the full attributes Map, in case external code needs to iterate through the attributes.
|
java.lang.String |
getAuthor()
Returns author name, or null, if no author has been defined.
|
java.util.Date |
getLastModified()
Returns the date when this page was last modified.
|
java.lang.String |
getName()
Returns the name of the page.
|
long |
getSize()
Returns the size of the page.
|
int |
getVersion()
Returns the version that this WikiPage instance represents.
|
java.lang.String |
getWiki()
Returns the wiki name for this page
|
boolean |
hasMetadata()
Returns
true if the page has valid metadata; that is, it has been parsed. |
void |
invalidateMetadata()
This method will remove all metadata from the page.
|
<T> T |
removeAttribute(java.lang.String key)
Removes an attribute from the page, if it exists.
|
void |
setAcl(Acl acl)
Sets the Acl for this page.
|
void |
setAttribute(java.lang.String key,
java.lang.Object attribute)
Sets an metadata attribute.
|
void |
setAuthor(java.lang.String author)
Sets the author of the page.
|
void |
setHasMetadata()
Sets the metadata flag to true.
|
void |
setLastModified(java.util.Date date)
Sets the last modification date.
|
void |
setSize(long size)
Sets the size.
|
void |
setVersion(int version)
Sets the page version.
|
static final java.lang.String DESCRIPTION
static final java.lang.String ALIAS
static final java.lang.String REDIRECT
static final java.lang.String AUTHOR
static final java.lang.String CHANGENOTE
static final java.lang.String VIEWCOUNT
java.lang.String getName()
java.util.Date getLastModified()
void setLastModified(java.util.Date date)
date - The datevoid setVersion(int version)
version - The version numberint getVersion()
long getSize()
void setSize(long size)
size - The size of the page.void setAuthor(java.lang.String author)
author - The author name.java.lang.String getAuthor()
java.lang.String getWiki()
void invalidateMetadata()
boolean hasMetadata()
true if the page has valid metadata; that is, it has been parsed. Note that this method is a kludge to
support our pre-3.0 metadata system, and as such will go away with the new API.void setHasMetadata()
<T> T getAttribute(java.lang.String key)
key - The key using which the attribute is fetchedvoid setAttribute(java.lang.String key, java.lang.Object attribute)
key - The key for the attribute used to fetch the attribute later on.attribute - The attribute valuegetAttribute(String)<T> T removeAttribute(java.lang.String key)
key - The key for the attributejava.util.Map<java.lang.String,java.lang.Object> getAttributes()
Acl getAcl()
null, in case there is no Acl defined, or it has not
yet been set by setAcl(Acl).void setAcl(Acl acl)
org.apache.wiki.auth.acl.AclManager#setPermissions(org.apache.wiki.api.core.Page, org.apache.wiki.api.core.Acl).acl - The Acl to setCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.