Package com.atlassian.confluence.pages
Class BlogPost
java.lang.Object
com.atlassian.core.bean.EntityObject
- All Implemented Interfaces:
Searchable,Content,Addressable,ContentTypeAware,HasLinkWikiMarkup,Versioned,RelatableEntity,EditableLabelable,Labelable,ContentConvertible,Spaced,Serializable,Cloneable,Comparable<ContentEntityObject>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringName of the form field used to store the posting date of the blog poststatic final StringFields inherited from class com.atlassian.confluence.core.ContentEntityObject
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DELETED_BY, DELETED_BY_ANON_VALUE, 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_SOURCEFields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendargetCalendarFromDatePath(String datePath) BEFORE USING THIS - consider ifBlogPostReferencebetter suits your needs.Returns theContentIdfor this Blog post.Alias forEntityObject.getCreationDate()getPostingMonth(DateFormatter formatter) Formats month name of the posting date according to given formatter.static StringgetTitleFromDatePath(String datePath) BEFORE USING THIS - consider ifBlogPostReferencebetter suits your needs.getType()An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.booleanstatic CalendartoCalendar(Date date) static StringtoDatePath(Date date) Methods inherited from class com.atlassian.confluence.pages.AbstractPage
convertToHistoricalVersion, generateTitleSlug, generateTitleSlug, getAttachmentsUrlPath, getAttachmentUrlPath, getConfluenceRevision, getEditUrlPath, getIdBasedPageUrl, getLatestVersion, getOriginalVersionPage, getPageLevelComments, getPreviousVersion, getSearchableDependants, getTopLevelComments, getUrlPath, getUrlPath, isValidPageTitle, isValidSpaceKey, isValidTitleLength, remove, setContentPropertiesFromDraft, setOriginalVersionPage, setTitleMethods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject
getNameForComparison, getSpace, getSpaceKey, hashCode, isIndexable, isInSpace, setSpaceMethods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, applyChildVersioningPolicy, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentManager, getAttachmentNamed, getAttachments, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getCollaborativeEditingUuid, getComments, getContainerContent, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getCustomContent, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getRenderedVersionComment, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrashDate, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, toString, trash, trash, trashDependents, wasCreatedByMethods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellingsMethods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersionMethods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierNameMethods inherited from class com.atlassian.core.bean.EntityObject
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.confluence.core.Addressable
getIdMethods inherited from interface com.atlassian.confluence.pages.ContentConvertible
getSelectorMethods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistentMethods inherited from interface com.atlassian.bonnie.Searchable
getId
-
Field Details
-
CONTENT_TYPE
- See Also:
-
POSTING_DAY_FORMAT
- See Also:
-
POSTING_DATE
Name of the form field used to store the posting date of the blog post- See Also:
-
-
Constructor Details
-
BlogPost
public BlogPost()
-
-
Method Details
-
getType
Description copied from class:ContentEntityObjectAn easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.This is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
- Specified by:
getTypein interfaceContentTypeAware- Specified by:
getTypein classContentEntityObject- Returns:
- the content type
-
toCalendar
-
getCalendarFromDatePath
BEFORE USING THIS - consider ifBlogPostReferencebetter suits your needs.- Parameters:
datePath- - should resemble /2005/11/12/aBlogTitle- Returns:
- Calendar representing the date of the blog, useful for a call to pageManager.getBlogPost(spaceKey, title, calendarDay)
-
getTitleFromDatePath
BEFORE USING THIS - consider ifBlogPostReferencebetter suits your needs.- Parameters:
datePath- - should resemble /2010/11/12/aBlogTitle- Returns:
- the title of the blog, if supplied with correct input, otherwise a null
-
getLinkPart
-
getDatePath
-
toDatePath
-
getLinkWikiMarkup
- Specified by:
getLinkWikiMarkupin interfaceHasLinkWikiMarkup- Returns:
- the wiki markup used to link to this content
-
getPostingYear
- Returns:
- A string representing the year of posting date. E.g.: 2017. Note: The string is formatted according to the system locale and timezone.
-
getPostingMonth
- Returns:
- The standalone form of a full month name. E.g.: January. Note: The string is formatted according to the system locale and timezone.
-
getPostingMonth
Formats month name of the posting date according to given formatter.- Parameters:
formatter- The date formatter to use when formatting month name. Ifnull, then default formatter will be used.- Returns:
- Formatted name of the month of the posting date.
-
getPostingMonthNumeric
- Returns:
- A string representing the number of the month of posting date. E.g.: January will be formatted as '01'. Note: The string is formatted according to the system locale and timezone.
-
getPostingDayOfMonth
- Returns:
- A string representing the day of the month of posting date. E.g.: 8th of January will be formatted as '08'. Note: The string is formatted according to the system locale and timezone.
-
getPostingDate
Alias forEntityObject.getCreationDate()- Returns:
- the posting date
-
getPostingCalendarDate
-
getContentTypeObject
- Specified by:
getContentTypeObjectin interfaceContentConvertible- Returns:
- the api ContentType that this ContentConvertible converts to
-
getContentId
Returns theContentIdfor this Blog post.- Specified by:
getContentIdin interfaceContentConvertible- Overrides:
getContentIdin classContentEntityObject- Returns:
- the ContentId representation of this Blog post's id
-
shouldConvertToContent
public boolean shouldConvertToContent()- Specified by:
shouldConvertToContentin interfaceContentConvertible- Returns:
- true if the implementer wants to be part of the core API (default value), false otherwise
-