public abstract class AbstractPage extends SpaceContentEntityObject implements HasLinkWikiMarkup
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCEINITIAL_VERSION| Constructor and Description | 
|---|
| AbstractPage() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | convertToHistoricalVersion()Remove all data from the object that does not need to be saved by historical versions. | 
| String | getAttachmentsUrlPath() | 
| String | getAttachmentUrlPath(Attachment attachment)Gets the path relative to Confluence's base URL to view the given attachment in the context of this content
 (for example, highlighted in the content's list of attachments). | 
| String | getConfluenceRevision() | 
| String | getEditUrlPath() | 
| AbstractPage | getLatestVersion()Get the latest, current version of this versioned object. | 
| AbstractPage | getOriginalVersionPage()if this page is a historical version, then this method returns the current/latest version of this page
 if this page is the latest version, then this returns null
 this method name should really be refactored to getCurrentVersionOfPage() | 
| List<Comment> | getPageLevelComments() | 
| int | getPreviousVersion()Convenience method to get the immediately prior version since we can't perform arithmetic in velocity (assume that versions are sequential)
 Method is used in email templates where session is not available. | 
| Collection<com.atlassian.bonnie.Searchable> | getSearchableDependants() | 
| List<Comment> | getTopLevelComments() | 
| String | getUrlPath() | 
| static boolean | isValidPageTitle(String title) | 
| static boolean | isValidTitleLength(String title) | 
| void | remove(PageManager pageManager)Remove this page from the world. | 
| void | setContentPropertiesFromDraft(Draft draft)Deprecated. 
 | 
| void | setOriginalVersionPage(AbstractPage originalVersionPage) | 
| void | setTitle(String title) | 
getNameForComparison, getSpace, getSpaceKey, hashCode, isIndexable, isInSpace, setSpaceaddAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, applyChildVersioningPolicy, applyChildVersioningPolicy, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentManager, getAttachmentNamed, getAttachments, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getCollaborativeEditingUuid, getComments, getContainerContent, getContentId, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getReferralLinks, getRenderedVersionComment, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrackbackLinks, getType, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, removeReferralLink, removeTrackbackLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setReferralLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setTrackbackLinks, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, toString, trash, trashDependents, wasCreatedByaddLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellingsgetVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersiongetCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierNamegetCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDatefinalize, getClass, notify, notifyAll, wait, wait, waitgetLinkWikiMarkupgetIdgetId, isPersistentpublic static boolean isValidPageTitle(String title)
public static boolean isValidTitleLength(String title)
public void setTitle(String title)
setTitle in class ContentEntityObjectpublic void convertToHistoricalVersion()
Versioned
When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.
convertToHistoricalVersion in interface VersionedconvertToHistoricalVersion in class SpaceContentEntityObjectpublic AbstractPage getOriginalVersionPage()
public void setOriginalVersionPage(AbstractPage originalVersionPage)
public int getPreviousVersion()
public void remove(PageManager pageManager)
public Collection<com.atlassian.bonnie.Searchable> getSearchableDependants()
getSearchableDependants in interface com.atlassian.bonnie.SearchablegetSearchableDependants in class ContentEntityObjectpublic String getUrlPath()
getUrlPath in interface AddressablegetUrlPath in class ContentEntityObjectpublic String getEditUrlPath()
public List<Comment> getPageLevelComments()
public String getAttachmentsUrlPath()
getAttachmentsUrlPath in class ContentEntityObjectpublic String getAttachmentUrlPath(Attachment attachment)
ContentEntityObjectAttachment.getUrlPath() instead of this method: if we ever implement
 view pages for individual attachments, that's the method that will be changed to point to them.
 The default implementation just returns the view page for this content.
getAttachmentUrlPath in class ContentEntityObjectattachment - one of this content's attachmentspublic AbstractPage getLatestVersion()
 Note that drafts are a special version of a ContentEntityObject
 so for drafts this method should return the ContentEntityObject
 the drafts points to if it exists and the draft itself otherwise.
getLatestVersion in interface VersionedgetLatestVersion in class AbstractVersionedEntityObjectContentEntityObject.DRAFT@Deprecated public void setContentPropertiesFromDraft(Draft draft)
ContentEntityObject.setContentPropertiesFrom(com.atlassian.confluence.core.ContentEntityObject)ContentProperties of this AbstractPage by performing
 a deep clone of the Draft object's properties.public String getConfluenceRevision()
getConfluenceRevision in class AbstractVersionedEntityObjectCopyright © 2003–2020 Atlassian. All rights reserved.